Skip to content

[7.0] [Android] Test failure in X509Certificates.Tests.PfxTests - Algorithm 'RC2' is not supported on this platform #88747

Closed
@carlossanlop

Description

@carlossanlop

Error Blob

{
  "ErrorMessage": "Algorithm 'RC2' is not supported on this platform",
  "BuildRetry": false,
  "ErrorPattern": "",
  "ExcludeConsoleLog": false
}

Reproduction Steps

07-12 04:41:05.016 11331 11351 I DOTNET  : Failed tests:
07-12 04:41:05.037 11331 11351 I DOTNET  : 1) 	[FAIL] System.Security.Cryptography.X509Certificates.Tests.PfxTests.TestIterationCounter   Test name: System.Security.Cryptography.X509Certificates.Tests.PfxTests.TestIterationCounter(name: "Pkcs12MacosKeychainCreated", usesPbes2: False, blob: [48, 130, 9, 182, 2, ...], iterationCount: 4097)   Test case: System.Security.Cryptography.X509Certificates.Tests.PfxTests.TestIterationCounter
07-12 04:41:05.037 11331 11351 I DOTNET  :    Assembly:  [System.Security.Cryptography.X509Certificates.Tests, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
07-12 04:41:05.037 11331 11351 I DOTNET  :    Exception messages: System.Exception : There's an error on certificate Pkcs12MacosKeychainCreated, see inner exception for details
07-12 04:41:05.037 11331 11351 I DOTNET  : ---- System.PlatformNotSupportedException : Algorithm 'RC2' is not supported on this platform.   Exception stack traces:    at System.Security.Cryptography.X509Certificates.Tests.PfxTests.TestIterationCounter(String name, Boolean usesPbes2, Byte[] blob, Int32 iterationCount) in /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/PfxTests.cs:line 487
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, Span`1 args, BindingFlags invokeAttr)
07-12 04:41:05.037 11331 11351 I DOTNET  : ----- Inner Stack Trace -----
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.PasswordBasedEncryption.CreateRC2()
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.PasswordBasedEncryption.Decrypt(AlgorithmIdentifierAsn& algorithmIdentifier, ReadOnlySpan`1 password, ReadOnlySpan`1 passwordBytes, ReadOnlySpan`1 encryptedData, Span`1 destination)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.Asn1.Pkcs12.PfxAsn.DecryptContentInfo(ContentInfoAsn contentInfo, UInt32& iterations)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.Asn1.Pkcs12.PfxAsn.CountTotalIterations()
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate.GetIterationCount(ReadOnlySpan`1 pkcs12)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.PfxTests.TestIterationCounter(String name, Boolean usesPbes2, Byte[] blob, Int32 iterationCount) in /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/PfxTests.cs:line 482
07-12 04:41:05.037 11331 11351 I DOTNET  :    Execution time: 0.0396158
07-12 04:41:05.037 11331 11351 I DOTNET  : 2) 	[FAIL] System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2.Import_IterationCounLimitNotExceeded_Succeeds   Test name: System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2.Import_IterationCounLimitNotExceeded_Succeeds(name: "Pkcs12MacosKeychainCreated", usesPbes2: False, blob: [48, 130, 9, 182, 2, ...], iterationCount: 4097)   Test case: System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2.Import_IterationCounLimitNotExceeded_Succeeds
07-12 04:41:05.037 11331 11351 I DOTNET  :    Assembly:  [System.Security.Cryptography.X509Certificates.Tests, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
07-12 04:41:05.037 11331 11351 I DOTNET  :    Exception messages: System.Security.Cryptography.CryptographicException : PKCS12 (PFX) without a supplied password has exceeded maximum allowed iterations. See https://go.microsoft.com/fwlink/?linkid=2233907 for more information.
07-12 04:41:05.037 11331 11351 I DOTNET  : ---- System.PlatformNotSupportedException : Algorithm 'RC2' is not supported on this platform.   Exception stack traces:    at System.Security.Cryptography.X509Certificates.X509Certificate.EnforceIterationCountLimit(ReadOnlySpan`1 pkcs12, Boolean readingFromFile, Boolean passwordProvided)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.AndroidCertificatePal.FromBlob(ReadOnlySpan`1 rawData, SafePasswordHandle password, Boolean readingFromFile, X509KeyStorageFlags keyStorageFlags)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.AndroidCertificatePal.FromBlob(ReadOnlySpan`1 rawData, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.CertificatePal.FromBlob(ReadOnlySpan`1 rawData, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(ReadOnlySpan`1 data)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(Byte[] data)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(Byte[] rawData)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2.Import(Byte[] blob) in /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/PfxIterationCountTests.X509Certificate2.cs:line 9
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests.Import_IterationCounLimitNotExceeded_Succeeds(String name, Boolean usesPbes2, Byte[] blob, Int64 iterationCount) in /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/PfxIterationCountTests.cs:line 34
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, Span`1 args, BindingFlags invokeAttr)
07-12 04:41:05.037 11331 11351 I DOTNET  : ----- Inner Stack Trace -----
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.PasswordBasedEncryption.CreateRC2()
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.PasswordBasedEncryption.Decrypt(AlgorithmIdentifierAsn& algorithmIdentifier, ReadOnlySpan`1 password, ReadOnlySpan`1 passwordBytes, ReadOnlySpan`1 encryptedData, Span`1 destination)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.Asn1.Pkcs12.PfxAsn.DecryptContentInfo(ContentInfoAsn contentInfo, UInt32& iterations)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.Asn1.Pkcs12.PfxAsn.CountTotalIterations()
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate.GetIterationCount(ReadOnlySpan`1 pkcs12)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate.EnforceIterationCountLimit(ReadOnlySpan`1 pkcs12, Boolean readingFromFile, Boolean passwordProvided)
07-12 04:41:05.037 11331 11351 I DOTNET  :    Execution time: 0.0029499
07-12 04:41:05.037 11331 11351 I DOTNET  : 3) 	[FAIL] System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.Import_IterationCounLimitNotExceeded_Succeeds   Test name: System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.Import_IterationCounLimitNotExceeded_Succeeds(name: "Pkcs12MacosKeychainCreated", usesPbes2: False, blob: [48, 130, 9, 182, 2, ...], iterationCount: 4097)   Test case: System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.Import_IterationCounLimitNotExceeded_Succeeds
07-12 04:41:05.037 11331 11351 I DOTNET  :    Assembly:  [System.Security.Cryptography.X509Certificates.Tests, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
07-12 04:41:05.037 11331 11351 I DOTNET  :    Exception messages: System.Security.Cryptography.CryptographicException : PKCS12 (PFX) without a supplied password has exceeded maximum allowed iterations. See https://go.microsoft.com/fwlink/?linkid=2233907 for more information.
07-12 04:41:05.037 11331 11351 I DOTNET  : ---- System.PlatformNotSupportedException : Algorithm 'RC2' is not supported on this platform.   Exception stack traces:    at System.Security.Cryptography.X509Certificates.X509Certificate.EnforceIterationCountLimit(ReadOnlySpan`1 pkcs12, Boolean readingFromFile, Boolean passwordProvided)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.StorePal.FromBlob(ReadOnlySpan`1 rawData, SafePasswordHandle password, Boolean readingFromFile, X509KeyStorageFlags keyStorageFlags)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.StorePal.FromBlob(ReadOnlySpan`1 rawData, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate2Collection.Import(ReadOnlySpan`1 rawData)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate2Collection.Import(Byte[] rawData)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.Import(Byte[] blob) in /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/PfxIterationCountTests.X509Certificate2Collection.cs:line 11
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests.Import_IterationCounLimitNotExceeded_Succeeds(String name, Boolean usesPbes2, Byte[] blob, Int64 iterationCount) in /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/PfxIterationCountTests.cs:line 34
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, Span`1 args, BindingFlags invokeAttr)
07-12 04:41:05.037 11331 11351 I DOTNET  : ----- Inner Stack Trace -----
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.PasswordBasedEncryption.CreateRC2()
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.PasswordBasedEncryption.Decrypt(AlgorithmIdentifierAsn& algorithmIdentifier, ReadOnlySpan`1 password, ReadOnlySpan`1 passwordBytes, ReadOnlySpan`1 encryptedData, Span`1 destination)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.Asn1.Pkcs12.PfxAsn.DecryptContentInfo(ContentInfoAsn contentInfo, UInt32& iterations)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.Asn1.Pkcs12.PfxAsn.CountTotalIterations()
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate.GetIterationCount(ReadOnlySpan`1 pkcs12)
07-12 04:41:05.037 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate.EnforceIterationCountLimit(ReadOnlySpan`1 pkcs12, Boolean readingFromFile, Boolean passwordProvided)
07-12 04:41:05.037 11331 11351 I DOTNET  :    Execution time: 0.0006872
07-12 04:41:05.038 11331 11351 I DOTNET  : 4) 	[FAIL] System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate.Import_IterationCounLimitNotExceeded_Succeeds   Test name: System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate.Import_IterationCounLimitNotExceeded_Succeeds(name: "Pkcs12MacosKeychainCreated", usesPbes2: False, blob: [48, 130, 9, 182, 2, ...], iterationCount: 4097)   Test case: System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate.Import_IterationCounLimitNotExceeded_Succeeds
07-12 04:41:05.038 11331 11351 I DOTNET  :    Assembly:  [System.Security.Cryptography.X509Certificates.Tests, Version=7.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
07-12 04:41:05.038 11331 11351 I DOTNET  :    Exception messages: System.Security.Cryptography.CryptographicException : PKCS12 (PFX) without a supplied password has exceeded maximum allowed iterations. See https://go.microsoft.com/fwlink/?linkid=2233907 for more information.
07-12 04:41:05.038 11331 11351 I DOTNET  : ---- System.PlatformNotSupportedException : Algorithm 'RC2' is not supported on this platform.   Exception stack traces:    at System.Security.Cryptography.X509Certificates.X509Certificate.EnforceIterationCountLimit(ReadOnlySpan`1 pkcs12, Boolean readingFromFile, Boolean passwordProvided)
07-12 04:41:05.038 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.AndroidCertificatePal.FromBlob(ReadOnlySpan`1 rawData, SafePasswordHandle password, Boolean readingFromFile, X509KeyStorageFlags keyStorageFlags)
07-12 04:41:05.038 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.AndroidCertificatePal.FromBlob(ReadOnlySpan`1 rawData, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
07-12 04:41:05.038 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.CertificatePal.FromBlob(ReadOnlySpan`1 rawData, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
07-12 04:41:05.038 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(ReadOnlySpan`1 data)
07-12 04:41:05.038 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(Byte[] data)
07-12 04:41:05.038 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate.Import(Byte[] blob) in /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/PfxIterationCountTests.X509Certificate.cs:line 9
07-12 04:41:05.038 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests.Import_IterationCounLimitNotExceeded_Succeeds(String name, Boolean usesPbes2, Byte[] blob, Int64 iterationCount) in /_/src/libraries/System.Security.Cryptography.X509Certificates/tests/PfxIterationCountTests.cs:line 34
07-12 04:41:05.038 11331 11351 I DOTNET  :    at System.Reflection.MethodInvoker.InterpretedInvoke(Object obj, Span`1 args, BindingFlags invokeAttr)
07-12 04:41:05.038 11331 11351 I DOTNET  : ----- Inner Stack Trace -----
07-12 04:41:05.038 11331 11351 I DOTNET  :    at System.Security.Cryptography.PasswordBasedEncryption.CreateRC2()
07-12 04:41:05.038 11331 11351 I DOTNET  :    at System.Security.Cryptography.PasswordBasedEncryption.Decrypt(AlgorithmIdentifierAsn& algorithmIdentifier, ReadOnlySpan`1 password, ReadOnlySpan`1 passwordBytes, ReadOnlySpan`1 encryptedData, Span`1 destination)
07-12 04:41:05.038 11331 11351 I DOTNET  :    at System.Security.Cryptography.Asn1.Pkcs12.PfxAsn.DecryptContentInfo(ContentInfoAsn contentInfo, UInt32& iterations)
07-12 04:41:05.038 11331 11351 I DOTNET  :    at System.Security.Cryptography.Asn1.Pkcs12.PfxAsn.CountTotalIterations()
07-12 04:41:05.038 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate.GetIterationCount(ReadOnlySpan`1 pkcs12)
07-12 04:41:05.038 11331 11351 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate.EnforceIterationCountLimit(ReadOnlySpan`1 pkcs12, Boolean readingFromFile, Boolean passwordProvided)
07-12 04:41:05.038 11331 11351 I DOTNET  :    Execution time: 0.0007288
07-12 04:41:05.044 11331 11351 D DOTNET  : assembly_preload_hook: System.Xml.ReaderWriter  /data/user/0/net.dot.System.Security.Cryptography.X509Certificates.Tests/files

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=336356
Error message validated: Algorithm 'RC2' is not supported on this platform
Result validation: ❌ Known issue did not match with the provided build.
Validation performed at: 7/12/2023 4:33:41 PM UTC

Report

Build Definition Test Pull Request
338475 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword #87319
338204 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword
338111 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword #88811
338000 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword #87319
337945 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword #87319
337765 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword #88787
337634 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword
337208 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword #88722
337182 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword #87319
336543 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword #88633
336542 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword
336405 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword #88714
334799 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword #88611
336279 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword #87319
335920 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword
335676 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword #88687
335349 dotnet/runtime System.Security.Cryptography.X509Certificates.Tests.PfxIterationCountTests_X509Certificate2Collection.ExportedPfxWithNullPassword_DecryptReturnsValidPaddingWithEmptyPassword #88655

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 17 17

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions