Convert certificate pfx into crt and key
With openssl teh following command extract the key pair:
openssl pkcs12 -in keypair.pfx -out keypair.pem
At first, we are prompted for pfx container password and after the password we want for the generated pem file.
To extract the public key:
openssl x509 -in keypair.pem -out public.crt
To extract the private key, we are prompted for the pem password.
openssl rsa -in keypair.pem -out private.key
Daniel Simao 18:03, 10 August 2019 (EDT)