title: Creating RSA Private Key from PFX (PKCS #12) file
body: <p>I'm trying to get a private RSA key from a pkcs #12 file.</p>
  
  <p>I've tried running the standard</p>
  
  <pre><code>openssl pkcs12 -nocerts -out priv.pem -in domain.com.pfx
  </code></pre>
  
  <p>However this results in a key file like the one below:</p>
  
  <pre><code>Bag Attributes
  Microsoft Local Key set: &lt;No Values&gt;
  localKeyID: 01 00 00 00 
  friendlyName: xxxxxxxx
  Microsoft CSP Name: Microsoft RSA SChannel Cryptographic Provider
  Key Attributes
  X509v3 Key Usage: 10
  -----BEGIN ENCRYPTED PRIVATE KEY-----
  </code></pre>
  
  <p>The server that I need to put it into canot handle the key file, and when I look at the examples data I see a file like below</p>
  
  <pre><code>-----BEGIN RSA PRIVATE KEY-----
  Proc-Type: 4,ENCRYPTED
  DEK-Info: DES-EDE3-CBC,2CF27DD60B8BB3FF
  </code></pre>
  
  <p>And of cause the key is present in both files.
  However it seems the server will only accept RSA Private key file, and it seems to me like the output I get is a X509v3 file, any one know how to get this to an RSA Private key file?</p>