MSCRYPTO: How to import RSA key from pkcs#12 into Microsoft Enhanced RSA and AES CSP?

Posted by lsh123 on Stack Overflow See other posts from Stack Overflow or by lsh123
Published on 2010-04-24T23:27:31Z Indexed on 2010/04/24 23:33 UTC
Read the original article Hit count: 276

Filed under:
|

According to the MSDN (http://msdn.microsoft.com/en-us/library/aa387314%28v=VS.85%29.aspx) the PFXImportCertStore function imports the cert/key into Base CSP (MS_STRONG_PROV) or Enhanced CSP (MS_ENHANCED_PROV). However, to use RSA/SHA2 signatures, I need to import the key into the Enhanced RSA and AES CSP (MS_ENH_RSA_AES_PROV) and I can't find a way to do it. The documentation mentions "provider name" from the PFX packet, but I can't find any way to set it for a pkcs12 file generated by a 3rd party (e.g. OpenSSL).

Thank you in advance.

© Stack Overflow or respective owner

Related posts about Windows

Related posts about crypto