title: Converting Windows PRIVATEKEYBLOB to Qt's QSslKey
body: <p>I am working on an Qt application(Windows Service) which uses SSL encryption.</p>
  
  <p>I need to access the certificate and associated private key from the Windows Certificate Store and pass it to my QSslSocket using setLocalCertificate and setPrivateKey which accepts QSslCertificate and QSslKey respectively.</p>
  
  <p>I am able to get the certificate from the store and set it to QsslSocket using the Windows API '(CertOpenStore, CertFindCertificateInStore). Now as I have the certificate I need to extract its private key and set to ssl socket. I am using CryptAcquireCertificatePrivateKey, CryptGetUserKey and CryptExportKey Windows API in the same order, which gives me a Microsoft PRIVATEKEYBLOB and now I need to convert it to a format that QSslKey understands.</p>
  
  <p>How do i do that?</p>