How can I create a PEM file from an SSL certificate?
These are the files that I have available:
.crt
server.csr
server.key
asn.1deropensslpemssl
How can I create a PEM file from an SSL certificate?
These are the files that I have available:
.crt
server.csr
server.key
Best Answer
Your keys may already be in PEM format, but just named with .crt or .key.
If the file's content begins with
-----BEGIN
and you can read it in a text editor:The file uses base64, which is readable in ASCII, not binary format. The certificate is already in PEM format. Just change the extension to .pem.
If the file is in binary:
For the server.crt, you would use
For server.key, use
openssl rsa
in place ofopenssl x509
.The server.key is likely your private key, and the .crt file is the returned, signed, x509 certificate.
If this is for a Web server and you cannot specify loading a separate private and public key:
You may need to concatenate the two files. For this use:
I would recommend naming files with "includesprivatekey" to help you manage the permissions you keep with this file.