title: Convert private key from der to pem
body: <p>I have a private and public key in der format which i'm trying to convert into .pem format in order to extract the text between <code>-----BEGIN CERTIFICATE-----</code> and <code>-----END CERTIFICATE-----</code>.I've already achieved that for the public key, but for the private key i get the following error.</p>
  
  <pre><code>openssl rsa -noout -text -in priv.der
  </code></pre>
  
  <p>but i get an error <code>8536</code> with the private key with the message <code>unable to load certificate</code>.Why is that?
  <a href="https://i.stack.imgur.com/7Q3sM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7Q3sM.png" alt="enter image description here"></a></p>