Hi, Recently, during xsec tests on w2k I have noticed that on some workstations WinCAPICryptoProvider(provDSSName, provRSAName) fails on second CryptAquireContext( if (!CryptAcquireContext(&m_provRSA,NULL, provRSAName, PROV_RSA_AES, CRYPT_VERIFYCONTEXT)) ). And the most straneg things is, that GetLastError() return 0. So, I have to change : if( (error == NTE_PROV_TYPE_NOT_DEF) || ( error == NTE_PROV_TYPE_NO_MATCH) ) { into: if( (error == NTE_PROV_TYPE_NOT_DEF) || ( error == NTE_PROV_TYPE_NO_MATCH) || ( error==0) ) {
After this everything works perfectly. And here is the question: is it a bug in xsec or have I done something wrong? (In my application I call WinCAPICryptoProvider with "Microsoft Strong Cryptographic Provider" as provRSAName. Regards, andrzeJ