How to Extract the Private and Public Key From pfx File ?
Install and configure OpenSSL
Extract the key-pair
>openssl pkcs12 -in certificate.pfx -nocerts -nodes -out cert.keyGet the Private Key from the key-pair
>openssl rsa -in cert.key -out cert_private.keyGet the Public Key from key pair
>openssl rsa -in cert.key -pubout -out cert_public.keyNeed to do some modification to the private key -> to pkcs8 format
>openssl pkcs8 -topk8 -inform PEM -in cert_private.key -outform PEM -nocrypt
Copy the output and save it as cert_private_pkcs8.key- Extract Server Certificate chain
No comments