Skip to content

[release/8.0] CertificateContentType fails for PKCS#7 with compatibility switch enabled on Unix #136062

Open

Description

@ViveliDuCh

Build information

Failing test

System.Security.Cryptography.Xml.Tests.KeyInfoX509DataTest.CertificateContentType(contentType: Pkcs7, switchValue: "true")

Failing configurations

Configuration names and individual result links from Build Analysis:

Exception

Excerpt from the linked Linux failure:

Microsoft.DotNet.RemoteExecutor.RemoteExecutionException : Remote process failed with an unhandled exception.

Child exception:
System.Security.Cryptography.CryptographicException: Cannot find the original signer.
   at System.Security.Cryptography.X509Certificates.OpenSslPkcsFormatReader.TryReadPkcs7(...) in /_/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/OpenSslPkcsFormatReader.cs:line 221
   at System.Security.Cryptography.Xml.KeyInfoX509Data.LoadXml(XmlElement element) in /_/src/libraries/System.Security.Cryptography.Xml/src/System/Security/Cryptography/Xml/KeyInfoX509Data.cs:line 265
   at System.Security.Cryptography.Xml.Tests.KeyInfoX509DataTest.AssertCertificateContentType(X509ContentType contentType, Boolean allowNonCertificate) in /_/src/libraries/System.Security.Cryptography.Xml/tests/KeyInfoX509DataTest.cs:line 215

Child arguments:
Pkcs7, true

Observed behavior

The Pkcs7 case with switchValue: "true" fails in the 15 listed Unix configurations. The representative Linux failure reaches KeyInfoX509Data.LoadXml, where certificate import throws CryptographicException: Cannot find the original signer.

Activity

  1. dotnet-policy-service commented on Oct 19, 2026

    @dotnet-policy-service
    Contributor

    Tagging subscribers to this area: @bartonjs, @vcsjones, @dotnet/area-system-security
    See info in area-owners.md if you want to be subscribed.

  2. added a commit that references this issue on Oct 23, 2026
    80c68f4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions