In the constructor of WinCAPICryptoProvider, the first call to CryptAcquiryContext fails with NTE_BAD_KEYSET. After that, the constructor tries to create one with NEW_KEYSET, which fails with NTE_EXISTS. (?????)
> -----Original Message----- > From: Milan Tomic [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 18, 2005 10:19 AM > To: security-dev@xml.apache.org > Subject: RE: Problem with WinCAPICryptoProvider > > > > // Try to create > > if (!CryptAcquireContext(&m_provApacheKeyStore, > > s_xsecKeyStoreName, > > provRSAName, > > m_provRSAType, > > dwFlags | CRYPT_NEWKEYSET)) { > > throw XSECException(XSECException::InternalError, > > "WinCAPICryptoProvider() - Error obtaining generating > > internal key store for PROV_RSA_FULL"); } > > Above code is used only during encryption. If you are not using the > encryption, you don't need it. Just comment it and your app will work. > > But this work around will not help us in discovering what the real > problem was. What is the code returned by GetLastError()? >