Open hope4555 opened 5 years ago
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?
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?