通过使用 pktool(1M) 实用程序,用户可以验证程序是否已成功创建证书和密钥对。
$ pktool list objtype=both Enter pin for Sun Software PKCS#11 softtoken : Found 1 certificates. 1. (X.509 certificate) Label: admin@example.com ID: 09:ac:7f:1a:01:f7:fc:a9:1a:cd:fd:8f:d4:92:4c:25:bf:b1:97:fe Subject: C=US, ST=CA, L=Menlo Park, O=Foobar Inc., OU=Foobar IT Office, CN=admin@example.com Issuer: C=US, ST=CA, L=Menlo Park, O=Foobar Inc., OU=Foobar IT Office, CN=admin@example.com Serial: 0x452BF693 X509v3 Subject Alternative Name: email:admin@example.com Found 1 keys. Key #1 - RSA private key: admin@example.com