openssl - DER and PEM convert

DER and PEM are formats used in X509 and other certificates to store Public, Private Keys and other related information. OpenSSL provides a lot of features for manipulating PEM and DER certificates. We can use OpenSSL to convert DER to PEM format and vice versa.

 

 

X509 Certificates are popular especially in web sites and Operating systems. X509 certificates also stored in DER or PEM format. We can use OpenSSL to convert an X509 certificate from DER format to PEM format with the following command.

 

 

$ openssl x509 -inform DER -outform PEM -text -in mykey.der -out mykey.pem

 

$ openssl x509 -inform PEM -outform DER -text -in mykey.pem -out mykey.der

 

 
posted @ 2021-10-25 11:09  xman888  阅读(72)  评论(0编辑  收藏  举报