title: Converting private key in windows store to PEM (for OpenSSL)
body: <p>I want to get a private key from windows store and convert it to PEM in order to use it in OpenSSL.
  I've been looking for a way to do that for a few hours!</p>
  
  <ul>
  <li>I use CertFindCertificateInStore() to get CERT_CONTEXT (which I know it contains the private key using the search parameter).</li>
  <li>Next, I used CryptAcquireCertificatePrivateKey() to get HCRYPTPROV (just because of the name of the function).</li>
  <li>Now, I use CryptGetUserKey() to get HCRYPTKEY (just because it sounds right...?!)</li>
  </ul>
  
  <p>But now I'm stuck again.</p>
  
  <p>I think this is security by obscurity done by Microsoft to make sure we will never be able to get private keys.</p>