Skip to content

Conformance fix: Remove trustpath subject-issuer comparison #555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Src/Fido2/Extensions/CryptoUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static bool ValidateTrustChain(X509Certificate2[] trustPath, X509Certific
// Let's check the simplest case first. If subject and issuer are the same, and the attestation cert is in the list, that's all the validation we need

// We have the same singular root cert in trustpath and it is in attestationRootCertificates
if (trustPath.Length == 1 && trustPath[0].Subject.Equals(trustPath[0].Issuer, StringComparison.Ordinal))
if (trustPath.Length == 1)
{
foreach (X509Certificate2 cert in attestationRootCertificates)
{
Expand Down
4 changes: 2 additions & 2 deletions Tests/Fido2.Tests/CryptoUtilsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public void TestValidateTrustChainSubAnchor()

Assert.False(0 == attestationRootCertificates[0].Issuer.CompareTo(attestationRootCertificates[0].Subject));
Assert.True(CryptoUtils.ValidateTrustChain(trustPath, attestationRootCertificates));
Assert.False(CryptoUtils.ValidateTrustChain(trustPath, trustPath));
Assert.False(CryptoUtils.ValidateTrustChain(attestationRootCertificates, attestationRootCertificates));
Assert.True(CryptoUtils.ValidateTrustChain(trustPath, trustPath));
Assert.True(CryptoUtils.ValidateTrustChain(attestationRootCertificates, attestationRootCertificates));
Assert.False(CryptoUtils.ValidateTrustChain(attestationRootCertificates, trustPath));
}

Expand Down
Loading