Title: [c++] WinCAPICryptoProvider class

Berin,

        If you take a look into beginning of WinCAPICryptoProvider.cpp file ( http://cvs.apache.org/viewcvs.cgi/xml-security/c/src/enc/WinCAPI/WinCAPICryptoProvider.cpp?rev=1.15&view=markup ), you will notice this line:

if (!CryptAcquireContext(&m_provApacheKeyStore,
                s_xsecKeyStoreName,
                provRSAName,
                m_provRSAType,
                CRYPT_MACHINE_KEYSET))

        Well, the problem is that when some user doesn't have admin rights s/he can't acquire CRYPT_MACHINE_KEYSET and initialzation of XSEC fails (XSEC exception is thrown). Perhaps we should use m_provRSA instead of m_provApacheKeyStore in WinCAPICryptoProvider class or use some other flag than CRYPT_MACHINE_KEYSET for m_provApacheKeyStore.

More info in the MSDN about CRYPT_MACHINE_KEYSET:

http://msdn.microsoft.com/library/default.asp?url="">

http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B238187

Best regards,
Milan

Reply via email to