Error During Cryptacquirecontext For A
Contents |
Studio 2015 products Visual Studio Team Services Visual Studio Code cryptacquirecontext example Visual Studio Dev Essentials Office Office Word/Excel/PowerPoint Microsoft cryptacquirecontext c# Graph Outlook OneDrive/Sharepoint Skype Services Store Cortana Bing Application Insights Languages & platforms cryptacquirecontext fails Xamarin ASP.NET C++ TypeScript .NET - VB, C#, F# Server Windows Server SQL Server BizTalk Server SharePoint Dynamics Programs & communities Students cryptacquirecontexta Startups Forums MSDN Subscriber downloads Sign in Search Microsoft Search Windows Dev Center Windows Dev Center Explore What’s new for Windows 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started
Cryptacquirecontext Crypt_machine_keyset
Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop Get started Design Develop API reference Test and deploy Compatibility Windows IoT Microsoft Edge Windows Holographic Downloads Samples Support Why Windows Dashboard Explore What’s new for Windows 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop Get started Design Develop API reference Test and deploy Compatibility Windows IoT Microsoft Edge Windows Holographic Downloads Samples Support Why Windows Dashboard Cryptography Cryptography Reference Cryptography Functions Cryptography Functions CryptAcquireContext CryptAcquireContext CryptAcquireContext CertAddCertificateContextToStore CertAddCertificateLinkToStore CertAddCRLContextToStore CertAddCRLLinkToStore CertAddCTLContextToStore CertAddCTLLinkToStore CertAddEncodedCertificateToStore CertAddEncodedCertificateToSystemStore CertAddEncodedCRLToStore CertAddEncodedCTLToStore CertAddEnhancedKeyUsageIdentifier CertAddRefServerOcspResponse
Studio 2015 products Visual Studio Team Services Visual Studio Code Visual Studio Dev Essentials Office Office Word/Excel/PowerPoint Microsoft Graph
Cryptacquirecontext Nte_bad_keyset
Outlook OneDrive/Sharepoint Skype Services Store Cortana Bing Application Insights Languages prov_rsa_full & platforms Xamarin ASP.NET C++ TypeScript .NET - VB, C#, F# Server Windows Server SQL Server cryptcreatehash BizTalk Server SharePoint Dynamics Programs & communities Students Startups Forums MSDN Subscriber downloads Sign in Search Microsoft Search Windows Dev Center Windows Dev Center Explore What’s https://msdn.microsoft.com/en-us/library/windows/desktop/aa379886(v=vs.85).aspx new for Windows 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop Get started Design Develop API reference Test and deploy Compatibility https://msdn.microsoft.com/en-us/library/windows/desktop/aa382375(v=vs.85).aspx Windows IoT Microsoft Edge Windows Holographic Downloads Samples Support Why Windows Dashboard Explore What’s new for Windows 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop Get started Design Develop API reference Test and deploy Compatibility Windows IoT Microsoft Edge Windows Holographic Downloads Samples Support Why Windows Dashboard Cryptography Using Cryptography Acquiring a Cryptographic Context and Generating Keys Acquiring a Cryptographic Context and Generating Keys Example C Program: Using CryptAcquireContext Example C Program: Using CryptAcquireContext Example C Program: Using CryptAcquireContext Example C Program: Creating a Key Container and Generating Keys Example C Program: Using CryptAcquireContext Example C Program: Enumerating CSP Providers and Provider Types Example C Program: Deriving a Session Key from a Password Example C Program: Duplicating a Session Key Example C Program: Importin
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company http://stackoverflow.com/questions/29996467/cryptacquirecontext-fails-with-return-code-0x8009000b-nte-bad-key-state-but Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up CryptAcquireContext() fails with return code 0x8009000B NTE_BAD_KEY_STATE - But user password has not changed up vote 2 down vote favorite 1 My error during company has a program compiled in vb6 which requires an encrypted license code to be validated before the software can be used. Recently, a client called saying the license code was failing to validate and the program was locked. After some investigation, I discovered the code was failing on a call to CryptAcquireContext with an error code 0x8009000B (NTE_BAD_KEY_STATE). The Microsoft support page for CryptAcquireContext states that this error means "the user password has error during cryptacquirecontext changed since the private keys were encrypted" The client recently had problems with his computer, so he installed a new solid state drive and re-installed Win7. However, he is sure that his user password has not changed, nor has the Server password (User computers contain a shortcut that points to an executable on the server, no other users are experiencing this problem). After searching through some Microsoft forums, it is clear that others have experienced this error (also having the same password), and that in every case it is highly sporadic and often unique to one computer in a system of machines using the same program. Every case I reviewed resulted in a dead end; Microsoft has been very unhelpful with this bug and I have exhausted my research capabilities on google. Here is the code snippet that is failing. I apologize for my lack of knowledge in this particular area, the class our program uses for encrypt/decryption comes from an open source project (cCrypt Class Module - Kevin Wilson) If CryptAcquireContext(lngCryptProv, 0, p_CSP_String, p_CSP_Type, 0) = 0 Then ' If there is no default key container then create one using Flags field' CheckGetLastError Err.LastDllError, Return_ErrNum, Return_ErrDesc, "CryptAcquireContext", False If Return_ErrNum = -2146893802 Then Return_ErrNum = 0 Return_ErrDesc = "" If CryptAcquireContext(lngCryptProv, 0, p_CSP_String, p_CSP_Type, CRYPT_NEWKEYSET) = 0 Then CheckGetLastError Err.Last