Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 05fbed1

Browse files
committedOct 18, 2024·
Revert "Conformance-breaking: Keep the stricter rules"
This reverts commit ac11a81.
1 parent 0f9f0cb commit 05fbed1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎Src/Fido2/Extensions/CryptoUtils.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static bool ValidateTrustChain(X509Certificate2[] trustPath, X509Certific
6161
// 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
6262

6363
// We have the same singular root cert in trustpath and it is in attestationRootCertificates
64-
if (trustPath.Length == 1 && trustPath[0].Subject.Equals(trustPath[0].Issuer, StringComparison.Ordinal))
64+
if (trustPath.Length == 1)
6565
{
6666
foreach (X509Certificate2 cert in attestationRootCertificates)
6767
{

‎Test/CryptoUtilsTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public void TestValidateTrustChainSubAnchor()
6666

6767
Assert.False(0 == attestationRootCertificates[0].Issuer.CompareTo(attestationRootCertificates[0].Subject));
6868
Assert.True(CryptoUtils.ValidateTrustChain(trustPath, attestationRootCertificates));
69-
Assert.False(CryptoUtils.ValidateTrustChain(trustPath, trustPath));
70-
Assert.False(CryptoUtils.ValidateTrustChain(attestationRootCertificates, attestationRootCertificates));
69+
Assert.True(CryptoUtils.ValidateTrustChain(trustPath, trustPath));
70+
Assert.True(CryptoUtils.ValidateTrustChain(attestationRootCertificates, attestationRootCertificates));
7171
Assert.False(CryptoUtils.ValidateTrustChain(attestationRootCertificates, trustPath));
7272
}
7373

0 commit comments

Comments
 (0)
Please sign in to comment.