title: converting .cer to .pem returns error 'unable to load certificate'
body: <p>I got an email containing a cert, it looked something like:</p>
  <blockquote>
  <p>-----BEGIN CERTIFICATE-----</p>
  <p>MIIHE...</p>
  <p>-----END CERTIFICATE-----</p>
  </blockquote>
  <p>I copy/pasted that into notepad and saved it as a .cer file.</p>
  <p>What I need now is a .pfx file using this cert. From what I gather I need to first convert my .cer to a .pem.</p>
  <p>I tried converting my .cer to a .pem but that only gave error:</p>
  <blockquote>
  <p>OpenSSL&gt; x509 -inform der -in
  C:\Users\xxx\Desktop\cert.cer -out certificate.pem</p>
  <p>unable to load certificate 7320:error:0D0680A8:asn1 encoding
  routines:ASN1_CHECK_TLEN:wrong tag:.\crypto\asn1\tasn_dec.c:1315:
  7320:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested
  asn1 error:.\crypto\asn1\tasn_dec.c:379:Type=X509</p>
  </blockquote>
  <p>I read some answers that also say just changing .cer to .pem is enough, but for me that does not seem to work at all.</p>