Skip to content

[Android][arm] Algorithm 'RC2' not supported on Android causing failures in X509Certificates tests #104030

Closed
@matouskozak

Description

@matouskozak

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=720816
Build error leg or test failing: System.Security.Cryptography.Tests
Affected CI: android-arm/arm64 Release AllSubsets_Mono (runtime-extra-platforms)
Commits range: c5e8f83...6effb8f

Stack trace example:

06-26 06:00:17.267 27417 28325 I DOTNET  : 1) 	[FAIL] System.Security.Cryptography.X509Certificates.Tests.PfxTests.ReadECDsaPrivateKey_BrainpoolP160r1_Pfx   Test name: System.Security.Cryptography.X509Certificates.Tests.PfxTests.ReadECDsaPrivateKey_BrainpoolP160r1_Pfx(pfxData: [48, 130, 3, 208, 2, ┬╖┬╖┬╖])   Test case: System.Security.Cryptography.X509Certificates.Tests.PfxTests.ReadECDsaPrivateKey_BrainpoolP160r1_Pfx
06-26 06:00:17.267 27417 28325 I DOTNET  :    Assembly:  [System.Security.Cryptography.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
06-26 06:00:17.267 27417 28325 I DOTNET  :    Exception messages: System.PlatformNotSupportedException : Algorithm 'RC2' is not supported on this platform.   Exception stack traces:    at System.Security.Cryptography.PasswordBasedEncryption.CreateRC2()
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.PasswordBasedEncryption.Decrypt(AlgorithmIdentifierAsn& algorithmIdentifier, ReadOnlySpan`1 password, ReadOnlySpan`1 passwordBytes, ReadOnlySpan`1 encryptedData, Span`1 destination)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509CertificateLoader.BagState.DecryptSafeContents(AlgorithmIdentifierAsn& algorithmIdentifier, ReadOnlySpan`1 passwordSpan, ReadOnlySpan`1 encryptedContent)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509CertificateLoader.DecryptSafeContents(ContentInfoAsn safeContentsAsn, Pkcs12LoaderLimits loaderLimits, ReadOnlySpan`1 passwordSpan, BagState& bagState, Nullable`1& workRemaining)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509CertificateLoader.ReadCertsAndKeys(BagState& bagState, ReadOnlyMemory`1 data, ReadOnlySpan`1& password, Pkcs12LoaderLimits loaderLimits)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509CertificateLoader.LoadPkcs12(ReadOnlyMemory`1 data, ReadOnlySpan`1 password, X509KeyStorageFlags keyStorageFlags, Pkcs12LoaderLimits loaderLimits)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509CertificateLoader.LoadPkcs12Pal(ReadOnlySpan`1 data, ReadOnlySpan`1 password, X509KeyStorageFlags keyStorageFlags, Pkcs12LoaderLimits loaderLimits)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.AndroidCertificatePal.FromBlob(ReadOnlySpan`1 rawData, SafePasswordHandle password, Boolean readingFromFile, X509KeyStorageFlags keyStorageFlags)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.AndroidCertificatePal.FromBlob(ReadOnlySpan`1 rawData, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.CertificatePal.FromBlob(ReadOnlySpan`1 rawData, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(Byte[] rawData, String password, X509KeyStorageFlags keyStorageFlags)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(Byte[] rawData, String password)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(Byte[] rawData, String password)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.PfxTests.ReadECDsaPrivateKey_BrainpoolP160r1_Pfx(Byte[] pfxData) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/PfxTests.cs:line 314
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
06-26 06:00:17.267 27417 28325 I DOTNET  :    Execution time: 0.0208223
06-26 06:00:17.267 27417 28325 I DOTNET  : 2) 	[FAIL] System.Security.Cryptography.X509Certificates.Tests.PfxTests.ReadECDsaPrivateKey_BrainpoolP160r1_Pfx   Test name: System.Security.Cryptography.X509Certificates.Tests.PfxTests.ReadECDsaPrivateKey_BrainpoolP160r1_Pfx(pfxData: [48, 130, 5, 1, 2, ┬╖┬╖┬╖])   Test case: System.Security.Cryptography.X509Certificates.Tests.PfxTests.ReadECDsaPrivateKey_BrainpoolP160r1_Pfx
06-26 06:00:17.267 27417 28325 I DOTNET  :    Assembly:  [System.Security.Cryptography.Tests, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]
06-26 06:00:17.267 27417 28325 I DOTNET  :    Exception messages: System.PlatformNotSupportedException : Algorithm 'RC2' is not supported on this platform.   Exception stack traces:    at System.Security.Cryptography.PasswordBasedEncryption.CreateRC2()
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.PasswordBasedEncryption.Decrypt(AlgorithmIdentifierAsn& algorithmIdentifier, ReadOnlySpan`1 password, ReadOnlySpan`1 passwordBytes, ReadOnlySpan`1 encryptedData, Span`1 destination)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509CertificateLoader.BagState.DecryptSafeContents(AlgorithmIdentifierAsn& algorithmIdentifier, ReadOnlySpan`1 passwordSpan, ReadOnlySpan`1 encryptedContent)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509CertificateLoader.DecryptSafeContents(ContentInfoAsn safeContentsAsn, Pkcs12LoaderLimits loaderLimits, ReadOnlySpan`1 passwordSpan, BagState& bagState, Nullable`1& workRemaining)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509CertificateLoader.ReadCertsAndKeys(BagState& bagState, ReadOnlyMemory`1 data, ReadOnlySpan`1& password, Pkcs12LoaderLimits loaderLimits)
06-26 06:00:17.267 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509CertificateLoader.LoadPkcs12(ReadOnlyMemory`1 data, ReadOnlySpan`1 password, X509KeyStorageFlags keyStorageFlags, Pkcs12LoaderLimits loaderLimits)
06-26 06:00:17.268 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509CertificateLoader.LoadPkcs12Pal(ReadOnlySpan`1 data, ReadOnlySpan`1 password, X509KeyStorageFlags keyStorageFlags, Pkcs12LoaderLimits loaderLimits)
06-26 06:00:17.268 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.AndroidCertificatePal.FromBlob(ReadOnlySpan`1 rawData, SafePasswordHandle password, Boolean readingFromFile, X509KeyStorageFlags keyStorageFlags)
06-26 06:00:17.268 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.AndroidCertificatePal.FromBlob(ReadOnlySpan`1 rawData, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
06-26 06:00:17.268 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.CertificatePal.FromBlob(ReadOnlySpan`1 rawData, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
06-26 06:00:17.268 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(Byte[] rawData, String password, X509KeyStorageFlags keyStorageFlags)
06-26 06:00:17.268 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(Byte[] rawData, String password)
06-26 06:00:17.268 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(Byte[] rawData, String password)
06-26 06:00:17.268 27417 28325 I DOTNET  :    at System.Security.Cryptography.X509Certificates.Tests.PfxTests.ReadECDsaPrivateKey_BrainpoolP160r1_Pfx(Byte[] pfxData) in /_/src/libraries/System.Security.Cryptography/tests/X509Certificates/PfxTests.cs:line 314
06-26 06:00:17.268 27417 28325 I DOTNET  :    at System.Object.InvokeStub_PfxTests.ReadECDsaPrivateKey_BrainpoolP160r1_Pfx(Object , Span`1 )
06-26 06:00:17.268 27417 28325 I DOTNET  :    at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

Error Message

Fill the error message using step by step known issues guidance.

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

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=720816
Error message validated: [System.PlatformNotSupportedException : Algorithm 'RC2' is not supported on this platform.]
Result validation: ❌ Known issue did not match with the provided build.
Validation performed at: 6/26/2024 1:18:57 PM UTC

Report

Summary

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions