title: No certificate matches private key - OpenSSL
body: <p>I spent all day trying to convert a .pem  file to a .p12, with no sucess.
  Can you help me, please?</p>
  
  <p>That's how i have been doing:
  1) openssl genrsa -out mykey.key 2048</p>
  
  <p>2) openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest -subj "/(...), CN=(...), C=(..)"</p>
  
  <p>3) openssl x509 -in ios_development.cer -inform DER -out developer_identity.pem -outform PEM</p>
  
  <p>4) openssl pkcs12 -export -inkey mykey.key -in developer_identity.pem -out ios_development.p12</p>
  
  <p>Result: No certificate matches private key (in step 4)</p>
  
  <p>Can you help me?
  Thank you!</p>