I have .cer
certificate which is not readable using text editor. I need to convert it to .pem
and .crt
in order to upgrade files on the server.
As I can see .crt
file begins with -----BEGIN CERTIFICATE-----
.pem
file begins with -----BEGIN RSA PRIVATE KEY-----
Can I get both or these files from .cer
file or do I need something else?
.crt
and .cer
files contain certificates, encoded as binary DER or ascii PEM
.pem
files can contain certificates or keys
See http://www.gtopia.org/blog/2010/02/der-vs-crt-vs-cer-vs-pem-certificates/
You can convert a binary .cer
to .pem
encoding the content in base64 and adding -----BEGIN CERTIFICATE-----
header and END CERTIFICATE
footer, but to get a -----BEGIN RSA PRIVATE KEY-----
you will need a file with a private key. Typically .key
file
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.