Skip to content

Commit

Permalink
refactor: implem logs for untrusted chain certs mongo tls
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico-dl05 committed Jan 21, 2025
1 parent 9d304cf commit fad3eca
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Utils/src/ServerCertificateValidator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,15 @@ public static RemoteCertificateValidationCallback ValidationCallback(ILogger
}
else
{
logger.LogInformation("SSL validation failed with errors: {sslPolicyErrors}",
logger.LogInformation("Certificate untrusted: {sslPolicyErrors}",
sslPolicyErrors);
logger.LogInformation("Certificate thumbprint: {thumbprint}",
cert.Thumbprint);
logger.LogInformation("Authority thumbprint: {thumbprint}",
authority.Thumbprint);
logger.LogInformation("Chain thumbprints: {thumbprints}",
string.Join(", ",
chain.ChainElements.Select(x => x.Certificate.Thumbprint)));
}

return isTrusted;
Expand Down

0 comments on commit fad3eca

Please sign in to comment.