title: Unable to create .pem file from .p12 (private key + public key)
body: <p>I am trying to create <code>.pem</code> file from <code>.p12</code> file with below command,</p>
  
  <pre><code>openssl x509 -inform der -in Certificates.p12 -out Certificates.pem
  </code></pre>
  
  <p>But getting below error:</p>
  
  <pre><code>4412094060:error:0DFFF0A8:asn1 encoding routines:CRYPTO_internal:wrong tag:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.260.1/libressl-2.6/crypto/asn1/tasn_dec.c:1125:
  4412094060:error:0DFFF03A:asn1 encoding routines:CRYPTO_internal:nested asn1 error:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.260.1/libressl-2.6/crypto/asn1/tasn_dec.c:306:Type=X509_CINF
  4412094060:error:0DFFF03A:asn1 encoding routines:CRYPTO_internal:nested asn1 error:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.260.1/libressl-2.6/crypto/asn1/tasn_dec.c:627:Field=cert_info, Type=X509
  </code></pre>
  
  <p><strong>Any idea how to resolve it?</strong></p>