PFXImportCertStore crashes on Win8 RRS feed

  • Question

  • Hi,

    I'm using this code to read from cert store:

    	cdb.cbData = mAuthInfo.nCertDataLenRow; // a pointer to data buffer
    	cdb.pbData = mAuthInfo.btCertData;// buffer length
    	HCERTSTORE store = PFXImportCertStore(&cdb, L"my_password", CRYPT_USER_KEYSET);

    the code works fine on WinXp(32bit), Win7(32bit),  but crashes on Win8(32bit);

    When debugging into the PFXImportCertStore function, I found the PFXImportCertStore calls a LocalFree inside, which causes the crash. the address that being freed points to a wide string: "Microsoft Base Cryptographic Provider v1.0"

    Anyone knows why?


    Thursday, October 17, 2013 9:17 AM

All replies

  • I'm writing a ocx, which is invoked from IE10,  after adding the site to "trusted sites", the PFXImportCertStore works fine now.
    Friday, October 18, 2013 3:51 AM