How can I create a .p12 or .pfx file without a private key?

前端 未结 1 1763
既然无缘
既然无缘 2020-12-13 04:40

I\'m trying to create a .p12 file that does not contain a valid identity (public key / private key pair) in order to test my app\'s certificate import functionality. Is it p

1条回答
  •  有刺的猬
    2020-12-13 05:20

    There is a very handy GUI tool written in java called portecle which you can use for creation of an empty PKCS#12 keystore and also for an import of the certificate without the private key into the PKCS#12 keystore - this functionality is available under "Import trusted certificate (Ctrl-T)" button.

    However if you insist on using OpenSSL you can use this command:

    openssl pkcs12 -export -nokeys -in certificate.cer -out pkcs12.pfx
    

    0 讨论(0)
提交回复
热议问题