Skip to content

Commit 740069d

Browse files
authored
Fix | Suppress CodeQL X509RevocationMode warning. (#2432)
1 parent 74084b0 commit 740069d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/VirtualSecureModeEnclaveProviderBase.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ private bool VerifyHealthReportAgainstRootCertificate(X509Certificate2Collection
252252
chain.ChainPolicy.ExtraStore.Add(cert);
253253
}
254254

255+
// An Always Encrypted-enabled driver doesn't verify an expiration date or a certificate authority chain.
256+
// A certificate is simply used as a key pair consisting of a public and private key. This is by design.
257+
258+
// CodeQL [SM00395] By design. Always Encrypted certificates should not be checked.
255259
chain.ChainPolicy.RevocationMode = X509RevocationMode.NoCheck;
256260

257261
if (!chain.Build(healthReportCert))

0 commit comments

Comments
 (0)