Run the pkcs12 command to parse the existing PKCS12 certificate and export a certificate containing public keys of it:
openssl pkcs12 -in PlcCertificate.p12 -out PlcCertificatePublic.crt -nokeys
- Explanation of the parameters provided in the command line:
- openssl pkcs12 : the command for executing OpenSSL to parse content of a PKCS12 certificate.
- -in PlcCertificate.p12 : the file "PlcCertificate.p12" is taken as input to read the PKCS12 certificate content from.
- -out PlcCertificatePublic.crt : the output file "PlcCertificatePublic.crt" is generated to store the certificate content with the public key.
- -nokeys : No private keys will be output.
-
Execution of the command will cause a prompt asking for the password of the given PKCS12 certificate. This is the password which is decided in the 4th step of Generating the certificate via batch script.
-
Detailed documentation about the
openssl pkcs12command can be found in the OpenSSL documentation for PKCS12 parameter.