title: Convert DER to PEM, no key part in the resulting file
body: <p>I have converted a CER/DER certificate with something like this:  </p>
  
  <pre><code>openssl x509 -inform der -in hostname.cer -out hostname.pem
  </code></pre>
  
  <p>The resulting PEM file contains just:</p>
  
  <pre><code>-----BEGIN CERTIFICATE-----
  ... contents here.. 
  -----END CERTIFICATE-----
  </code></pre>
  
  <p>But it does not contain the key part, is that normal? So I cannot use it in PHP/SOAPClient because it won't connect to the host.</p>
  
  <p>On the other hand, I have successfuly converted PFX/P12 format to PEM and the resulting file contains both certificate and key. But in the above case of the DER format certificate it doesn't.</p>
  
  <p>What I used to convert the PFX to PEM was:</p>
  
  <pre><code>openssl pkcs12 -in ALEXANDRU_CATALIN.pfx -clcerts -nokeys -out ALEXANDRU_CATALIN_mycert.pem
  openssl pkcs12 -in ALEXANDRU_CATALIN.pfx -nocerts -nodes -out ALEXANDRU_CATALIN_mykey.pem
  </code></pre>
  
  <p>And then join contents of both files into one called <code>bundle.pem</code>. This worked, I ended with a file with bot certificate and key and it connects vía SOAP to the API but as I say the DER to PEM doesn't give me a certificate that will work.</p>
  
  <p>Any ideas on this? Am I missing something? Is the DER format not containing the key? Do I need something else?</p>