Convert a certificate between binary DER encoding and textual PEM encoding

openssl x509

  • OpenSSL command to manage X.509 certificates.
    More information: <https://www.openssl.org/docs/manmaster/man1/openssl-x509.html>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

openssl x509 -inform {{der}} -outform {{pem}} -in {{original_certificate_file}} -out {{converted_certificate_file}}

click the source code to copy install openssl x509 on any operating system with command-not-found.com