26

I have a .p12 file, I can also transfer it to a .pem file, but how to transfer it as a .key file?

Arkana
  • 2,831
  • 20
  • 35
Rico Chan
  • 2,226
  • 2
  • 25
  • 32

2 Answers2

51

openssl pkcs12 -in out.p12 -nodes -out private.key -nocerts

openssl will ask you for a password, then store the unencrypted private key into the file private.key

Documentation: https://www.openssl.org/docs/man1.1.0/apps/pkcs12.html

user1516873
  • 5,060
  • 2
  • 37
  • 56
0

openssl pkcs12 -info -in INFILE.p12 -nodes

You will then be prompted for the PKCS#12 file’s password:

Enter Import Password:

Naga
  • 1