Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enter PEM pass phrase when converting PKCS#12 certificate into PEM

I am using OpenSSL to convert my "me.p12" to PEM. When I generate "me.p12", I set a password for it. The "me.p12" contains a private key and a certificate.

When I convert it to PEM, I run command:

openssl pkcs12 -in me.p12 -out me.pem

Then, it asked me for Import Password:

Enter Import Password:
MAC verified OK

I entered the password I set to "me.p12", it was verified OK. But next, it ask me:

Enter PEM pass phrase:

I have no idea what is that? When I generate "me.p12" I haven't set any other password. So, what is that? How to figure this out?

like image 483
Leem.fin Avatar asked Nov 03 '16 10:11

Leem.fin


People also ask

What is my PEM pass phrase?

A passphrase is a word or phrase that protects private key files. It prevents unauthorized users from encrypting them. Usually it's just the secret encryption/decryption key used for Ciphers. To change the passphrase you simply have to read it with the old pass-phrase and write it again, specifying the new pass-phrase.

Is a PEM file pkcs12?

PEM certificates are not supported, they must be converted to PKCS#12 (PFX/P12) format.

What is pkcs12 password?

The PKCS #12 password is used to protect private data in the PKCS #12 file. This password is required to import the file. The user then telephones the recipient and provides the PKCS #12 password.


1 Answers

"Enter PEM pass phrase" because openssl doesn't want to output private key in clear text. The password is used to output encrypted private key

Below command can be used to output private key in clear text. No password is then asked.

openssl pkcs12 -nodes -in me.p12 -out me.pem
like image 109
dsbajna Avatar answered Oct 23 '22 02:10

dsbajna