Skip to content

Commit

Permalink
Fix | Suppress CodeQL X509RevocationMode warning. (dotnet#2432)
Browse files Browse the repository at this point in the history
  • Loading branch information
arellegue authored and dauinsight committed May 17, 2024
1 parent 87f4a6e commit d20f231
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ private bool VerifyHealthReportAgainstRootCertificate(X509Certificate2Collection
chain.ChainPolicy.ExtraStore.Add(cert);
}

// An Always Encrypted-enabled driver doesn't verify an expiration date or a certificate authority chain.
// A certificate is simply used as a key pair consisting of a public and private key. This is by design.

// CodeQL [SM00395] By design. Always Encrypted certificates should not be checked.
chain.ChainPolicy.RevocationMode = X509RevocationMode.NoCheck;

if (!chain.Build(healthReportCert))
Expand Down

0 comments on commit d20f231

Please sign in to comment.