title: Understanding OpenSSL Steps for Converting .pem file to .pfx
body: <p>I am developing a plugin using Crossrider and needed a Code Signing Certificate as part of that process. In so doing I took the following actions</p>
  
  <ol>
  <li><p>Followed GoDaddy's instructions for generating a CSR as shown <a href="http://support.godaddy.com/help/article/7282/generating-a-certificate-signing-request-for-code-signing-certificates" rel="nofollow">here</a></p></li>
  <li><p>Sent the CSR &amp; private key to the client and asked them to purchase the CSC which they did</p></li>
  <li><p>Client sent me the .pem and .spc file from GoDaddy</p></li>
  <li><p>I used OpenSSL to convert the .pem file to a .pfx which Crossrider requires</p>
  
  <p><code>OpenSSL&gt; pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.pem</code></p></li>
  <li><p>When OpenSSL requested that I "Enter Export Password" I used the same password as when generating the CSR.</p></li>
  <li><p>I uploaded the .pfx file to Crossrider and supplied the same password again</p></li>
  </ol>
  
  <p>Crossrider is saying the file or password are not valid. Have I made any mistakes or missed something in the above steps?</p>
  
  <p><strong>UPDATE</strong>: 04/30 4:45 PST</p>
  
  <p>The .pem file from GoDaddy already shows four <code>-----BEGIN CERTIFICATE-----</code> and <code>-----END CERTIFICATE-----</code> groups so it seems they did the chaining? I was able to import the .pfx file I generated into KeyChain Access on OSX and it shows up with our company name and as issued by GoDaddy with all of the details.</p>
  
  <p>When I run openssl verify this is what I get...</p>
  
  <pre><code>OpenSSL&gt; verify certificate.pem 
  certificate.pem: /C=US/O=The Go Daddy Group, Inc./OU=Go Daddy Class 2 Certification Authority
  error 18 at 0 depth lookup:self signed certificate
  OK
  </code></pre>
  
  <p>I'm pretty lost so please offer any suggestions. I can post whatever info to help solve.</p>