How to get PrivateKey, PublicKey, Cert ID:

0. Prepare cert.pfx and its password, verify_sign_acp.cer

1. Get Private Key
$ openssl pkcs12 -in cert.pfx  -nocerts -nodes | openssl rsa -out private_key.pem

2. Public key is verify_sign_acp.cer

3. Get Cert ID
$ openssl pkcs12 -in cert.pfx -clcerts -nokeys | openssl x509 -serial -noout // result hex eg: XXXXXXXXXX
visit https://lokielse.github.io/hex2dec //Convert hex to decimal online
 
posted @ 2017-11-24 16:00  wangxusummer  阅读(244)  评论(0编辑  收藏  举报