Skip to content

Commit

Permalink
adds flag IgnoreCertificateAuthority
Browse files Browse the repository at this point in the history
  • Loading branch information
rido-min committed Oct 31, 2023
1 parent 4e785ae commit 9ec4346
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal static bool ValidateChain(MqttClientCertificateValidationEventArgs cvAr
cvArgs.Chain.ChainPolicy.CustomTrustStore.AddRange(caChain);
Trace.TraceWarning("Validating TLS with chain:\n\t" + string.Join("\n\t",cvArgs.Chain.ChainPolicy.CustomTrustStore.Select(c => c.Subject)));

cvArgs.Chain.ChainPolicy.VerificationFlags = X509VerificationFlags.IgnoreEndRevocationUnknown;
cvArgs.Chain.ChainPolicy.VerificationFlags = X509VerificationFlags.IgnoreEndRevocationUnknown | X509VerificationFlags.IgnoreCertificateAuthorityRevocationUnknown;
Trace.TraceWarning($"Chain validation configured with verification flags:\n\t{cvArgs.Chain.ChainPolicy.VerificationFlags}");

chainValidated = cvArgs.Chain.Build(new X509Certificate2(cvArgs.Certificate));
Expand Down

0 comments on commit 9ec4346

Please sign in to comment.