Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key not valid for use in specified state #24

Open
hope4555 opened this issue Sep 1, 2019 · 0 comments
Open

Key not valid for use in specified state #24

hope4555 opened this issue Sep 1, 2019 · 0 comments

Comments

@hope4555
Copy link

hope4555 commented Sep 1, 2019

Hello
Was working for us for a long while
After the last windows update we get this:

could not create pfx file: System.Security.Cryptography.CryptographicException: Key not valid for use in specified state.

at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer)
at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle)
at System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()
at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)
at System.Security.Cryptography.RSACryptoServiceProvider..ctor(CspParameters parameters)
at Oocx.Asn1PKCS.PKCS12.Pkcs12.CreatePfxFile(RSAParameters key, String pathToCertificate, String password, String pathToPfx) in C:\projects\acme-net\src\Oocx.Asn1PKCS\PKCS12\Pkcs12.cs:line 16
at Oocx.ACME.Console.AcmeProcess.SaveCertificateWithPrivateKey(String domain, RSAParameters key, String certificatePath) in C:\projects\acme-net\src\Oocx.ACME.Console\AcmeProcess.cs:line 93

Ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant