Hi,
The following 3 tests are failing on Windows 7, but run ok on Windows 10:
- ImportExportRsaPrivateKeyPublicKeyPairPem()
- ImportExportSingleChainedECPrivateKeyPublicKeyPairPem()
- ImportExportECPrivateKeyPublicKeyPairPem()
They are all failing with the Excepton:
"Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The specified network password is not correct."
Is there some further preparation to run these Tests successfully on Windows 7, some code changes required, or is this a known limitation of ASPNetCore on Windows 7 (e.g. rather like no .NET ALPN support in Win7)?
Exception stack trace details are listed below.
- ImportExportRsaPrivateKeyPublicKeyPairPem
CertificateManagerTests.ImportExportTests.ImportExportRsaPrivateKeyPublicKeyPairPem
Source: ImportExportTests.cs line 165
Duration: 204 ms
Message:
Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The specified network password is not correct.
Stack Trace:
CertificatePal.FilterPFXStore(Byte[] rawData, SafePasswordHandle password, PfxCertStoreFlags pfxCertStoreFlags)
CertificatePal.FromBlobOrFile(Byte[] rawData, String fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
X509Certificate.ctor(Byte[] rawData, String password, X509KeyStorageFlags keyStorageFlags)
X509Certificate2.ctor(Byte[] rawData, String password)
PemDecoder.CreateCertificateWithPrivateKey(X509Certificate2 certificate, AsymmetricAlgorithm privateKey, String password) line 151
ImportExportCertificate.CreateCertificateWithPrivateKey(X509Certificate2 certificate, AsymmetricAlgorithm privateKey, String password) line 193
ImportExportTests.ImportExportRsaPrivateKeyPublicKeyPairPem() line 182
- ImportExportSingleChainedECPrivateKeyPublicKeyPairPem
CertificateManagerTests.ImportExportTests.ImportExportSingleChainedECPrivateKeyPublicKeyPairPem
Source: ImportExportTests.cs line 220
Duration: 154 ms
Message:
Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The specified network password is not correct.
Stack Trace:
CertificatePal.FilterPFXStore(Byte[] rawData, SafePasswordHandle password, PfxCertStoreFlags pfxCertStoreFlags)
CertificatePal.FromBlobOrFile(Byte[] rawData, String fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
X509Certificate.ctor(Byte[] data)
X509Certificate2.ctor(Byte[] rawData)
PemDecoder.CreateCertificateWithPrivateKey(X509Certificate2 certificate, AsymmetricAlgorithm privateKey, String password) line 146
ImportExportCertificate.CreateCertificateWithPrivateKey(X509Certificate2 certificate, AsymmetricAlgorithm privateKey, String password) line 193
ImportExportTests.ImportExportSingleChainedECPrivateKeyPublicKeyPairPem() line 236
- ImportExportECPrivateKeyPublicKeyPairPem
CertificateManagerTests.ImportExportTests.ImportExportECPrivateKeyPublicKeyPairPem
Source: ImportExportTests.cs line 192
Duration: 129 ms
Message:
Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException : The specified network password is not correct.
Stack Trace:
CertificatePal.FilterPFXStore(Byte[] rawData, SafePasswordHandle password, PfxCertStoreFlags pfxCertStoreFlags)
CertificatePal.FromBlobOrFile(Byte[] rawData, String fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
X509Certificate.ctor(Byte[] rawData, String password, X509KeyStorageFlags keyStorageFlags)
X509Certificate2.ctor(Byte[] rawData, String password)
PemDecoder.CreateCertificateWithPrivateKey(X509Certificate2 certificate, AsymmetricAlgorithm privateKey, String password) line 151
ImportExportCertificate.CreateCertificateWithPrivateKey(X509Certificate2 certificate, AsymmetricAlgorithm privateKey, String password) line 193
ImportExportTests.ImportExportECPrivateKeyPublicKeyPairPem() line 208