none
CryptAcquireContext call failed on windows2008, but succeed on windows2008R2 RRS feed

  • Question

  • Hi All,

    My program has a call to one windows API:

    CryptAcquireContext(&m_Provider, _T("keycontainer"), MS_DEF_PROV, PROV_RSA_FULL, CRYPT_MACHINE_KEYSET | CRYPT_SILENT))

    it works fine on windows2008 R2 version, it always return TRUE for me, BUT on a windows2008 version, it failed and GetLastError return 0x8000ffff which tell me a Catastrophic failure (0x8000ffff).

    if i change the last param, use CRYPT_NEWKEYSET instead, it works for me.

    So Why the call with CRYPT_MACHINE_KEYSET on windows 2008 failed?

    Thanks,

    Friday, June 7, 2013 9:10 AM