diff --git a/Src/Fido2/Metadata/ConformanceMetadataRepository.cs b/Src/Fido2/Metadata/ConformanceMetadataRepository.cs index 415be3ff..bdcab384 100644 --- a/Src/Fido2/Metadata/ConformanceMetadataRepository.cs +++ b/Src/Fido2/Metadata/ConformanceMetadataRepository.cs @@ -213,10 +213,8 @@ public async Task DeserializeAndValidateBlob(string rawBLOB if (rootCert.Thumbprint.Equals(certChain.ChainElements[^1].Certificate.Thumbprint, StringComparison.Ordinal) && // and that the number of elements in the chain accounts for what was in x5c plus the root we added certChain.ChainElements.Count == (x5cRawKeys.Length + 1) && - // and that the root cert has exactly one status listed against it - certChain.ChainElements[^1].ChainElementStatus.Length == 1 && - // and that that status is a status of exactly UntrustedRoot - certChain.ChainElements[^1].ChainElementStatus[0].Status == X509ChainStatusFlags.UntrustedRoot) + // and that the root cert has exactly one status with the value of UntrustedRoot + certChain.ChainElements[^1].ChainElementStatus is [ { Status: X509ChainStatusFlags.UntrustedRoot } ]) { // if we are good so far, that is a good sign certChainIsValid = true; diff --git a/Src/Fido2/Metadata/Fido2MetadataServiceRepository.cs b/Src/Fido2/Metadata/Fido2MetadataServiceRepository.cs index 10458ef6..414015bd 100644 --- a/Src/Fido2/Metadata/Fido2MetadataServiceRepository.cs +++ b/Src/Fido2/Metadata/Fido2MetadataServiceRepository.cs @@ -184,10 +184,8 @@ private async Task DeserializeAndValidateBlobAsync(string r if (rootCert.Thumbprint == certChain.ChainElements[^1].Certificate.Thumbprint && // and that the number of elements in the chain accounts for what was in x5c plus the root we added certChain.ChainElements.Count == (x5cRawKeys.Length + 1) && - // and that the root cert has exactly one status listed against it - certChain.ChainElements[^1].ChainElementStatus.Length == 1 && - // and that that status is a status of exactly UntrustedRoot - certChain.ChainElements[^1].ChainElementStatus[0].Status == X509ChainStatusFlags.UntrustedRoot) + // and that the root cert has exactly one status with the value of UntrustedRoot + certChain.ChainElements[^1].ChainElementStatus is [ { Status: X509ChainStatusFlags.UntrustedRoot } ]) { // if we are good so far, that is a good sign certChainIsValid = true;