title: How to generate a PKCS12 (.p12) from a .SPC (code signing certificate) and .PKCS12 (private key)?
body: <p>I have a code-signing certificate (SPC) file from GoDaddy. The file was generated from an existing private key:</p>
  
  <pre><code>-----BEGIN RSA PRIVATE KEY-----
  MIIEpAIBAAKCAQEAvcG2SEalg9pvkTvtMI8cZg07tVA0RuK7LeGlFdk1smXgqrsH
  .... snipped ....
  MURwR0FXgNAuFNQ0yBNFNW2+o9uBceLuCSUalgi4pQw1uBmP5QkUYA==
  -----END RSA PRIVATE KEY-----
  </code></pre>
  
  <p>I generated a certificate signing request and sent this to GoDaddy:</p>
  
  <pre><code>-----BEGIN CERTIFICATE REQUEST-----
  MIICiDCCAXACAQAwQzFBMD8GCSqGSIb3DQEJARYyYXBwbGVAdGVrNC1uZXdtZWRp
  .... snipped ....
  nJwd9pSDPuYaNHl33N1BJkXFusG7ta0D6UjisA==
  -----END CERTIFICATE REQUEST-----
  </code></pre>
  
  <p>GoDaddy then returned me an SPC file. My research shows that typically you'd have a SPC/PVK pair but obviously my private key isn't of PVK type.
  I've tried several methods (pvkimprt, pvk2pfx, openssl, keytool) but can't seem to convert my key to PVK type or my SPC to a PKCS12 type independently without both the certificate (SPC) and private key being in a single key-store.</p>
  
  <p>The command that I appear to need to do this in one step is:
      openssl pkcs12 -in cert_from_godaddy.spc -inkey private.key -export -out full_code_signing_chain.pkcs12</p>
  
  <p>However, running that I just get:
      Loading 'screen' into random state - done
      No certificate matches private key</p>
  
  <p>But, the certificate (SPC) is for the private key. What am I doing wrong?!</p>
  
  <p>Background: I'm trying to generate a .p12 file sign an Adobe AIR application</p>