====== Extraer certificado ======
Clave privada:
openssl pkcs12 -nocerts -in certificado.pfx -out privada.key
Enter Import Password:
MAC verified OK
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:
Lo exporta con contraseña:
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQILFir/NbOHJACAggA
MBQGCCqGSIb3DQMHBAidM8a4rnDOrQSCBMjCX8wEM2YSubkiN4LpMKBE0t54Xghg
jkNzVep8NnhnQYtZvSLjLJUFeSn3pz4UDVUbpGH9StzvlVpPIbM06+0eex1Pa1LV
RruaW9syrm60LuTeWj4QZVgMtmOMBtvYH6hO5635NWfJ0TgA6FVholSLnsZ7T3+1
ZGkcquDL+3pb8QNRMTKxWrTQFMqP3JR+tfkMQcXme4lhXv2qje7wq4QAg8SKBfKe
+2o=
-----END ENCRYPTED PRIVATE KEY-----
Para quitarle la contraseña:
openssl rsa -out privada_NOKEY.key -in privada.key
-----BEGIN RSA PRIVATE KEY-----
MIIEowIBAAKCAQEAlIDAtwYEh0SXYEJcIHxFUSI/qj2RzYusPcZnMbzs7nfL3uq7
2Rb9RdI4JcIlGr8WGXDNFj6xIYu30VchXQ33zJuLkyOHyi5Hsiy9FslKnmTOOY5q
PgowtGjUSGSnzWL4kVbTpKokALWDCMwqm+UV6XQxrJXg51/DWHqgjnqAJcyeaj3K
+nRWuwKBgAk8/Ms6rVn1UIiozelF4IY4Su18tqaBS9ri2ILnbU5K7RISfhJfc/FQ
f743M15B4O2WOgsoJ21NtKmEV75XqU6wlKruSvAaHHdHAQBbLWq28WtMG2gMo1WP
qQrsKQEwoa6K9he52vZz8UNLSWSiqVbcTC3ThTWYmti0E20R/H+Q
-----END RSA PRIVATE KEY-----
Clave pública:
openssl pkcs12 -clcerts -nokeys -in certificado.pfx -out publica.cer
Enter Import Password:
MAC verified OK