鍵入下列指令,將 Solaris 加密架構增加至配置目錄中的網路安全服務 (NSS)
$ cd <install-dir>/<instance-dir>/lib/modutil -dbdir <install-dir>/<instance-dir>/config -nocertdb -add "scf" -libfile /usr/lib/libpkcs11.so -mechanisms RSA
使用下列指令驗證註冊:
$cd <install-dir>/<instance-dir>/lib/modutil -dbdir <install-dir>/<instance-dir>/config -nocertdb -list
Listing of PKCS #11 Modules
1. NSS Internal PKCS #11 Module
slots: 2 slots attached
status: loaded
slot: NSS Internal Cryptographic Services
token: NSS Generic Crypto Services
slot: NSS User Private Key and Certificate Services
token: NSS Certificate DB
2. scf
library name: /usr/lib/libpkcs11.so
slots: 1 slot attached
status: loaded
slot: Sun Crypto Softtoken
token: Sun Software PKCS#11 softtoken
3. Root Certs
library name: libnssckbi.so
slots: There are no slots attached to this module
status: Not loaded
如需有關建立伺服器憑證的更多資訊,請參閱請求憑證
若憑證位於 NSS 資料庫中,您可以使用下列 pk12util 指令進行匯出或匯入:
$pk12util -o server.pk12 -d . -n <server-cert>
$pk12util -i server.pk12 -d . -h "Sun Software PKCS#11 softtoken"
根據預設,certutil/pk12util 會搜尋資料庫中的 cert8.db 與 key3.db。請將 -P 增加為使用替代名稱 https-instance-hostname-cert8.db 與 https-instance-hostname-key3.db 之 Web 伺服器的前綴。