0

Can .pem certificate file have an encrypted certificate and an encrypted private key?

e.g. Bag Attributes

-----BEGIN ENCRYPTED CERTIFICATE-----

-----END ENCRYPTED CERTIFICATE-----

-----BEGIN ENCRYPTED PRIVATE KEY-----
-----END ENCRYPTED PRIVATE KEY-----

is this format possible?

  • "Bag Attributes"? That's not a PEM thing. Are you confusing it with PKCS#12? – grawity Aug 10 '18 at 10:06
1

While it's possible to debate the exact definition of the PEM standard, the nearest formal definition of the it is RFC 7468. You won't find -----BEGIN ENCRYPTED CERTIFICATE----- in there. Also, why encrypt a certificate when it's a public document?

Therefore, the answer to your question is - "no".

However, with unencrypted certificates it's a "yes". The following is acceptable:

-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----

-----BEGIN ENCRYPTED PRIVATE KEY-----

-----END ENCRYPTED PRIVATE KEY-----

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.