Skip to content

3 out of 27 Unit Tests are failing on Windows 7, but run ok on Windows 10 #36

@jlewis666

Description

@jlewis666

Hi,

The following 3 tests are failing on Windows 7, but run ok on Windows 10:

  1. ImportExportRsaPrivateKeyPublicKeyPairPem()
  2. ImportExportSingleChainedECPrivateKeyPublicKeyPairPem()
  3. 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.

  1. 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

  1. 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

  1. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions