C#: Log warning when chain or certificate is not provided in the validation.

This commit is contained in:
Michael Nebel
2024-12-10 10:35:48 +01:00
parent 547af6c3c9
commit 86c6df5cbd

View File

@@ -606,6 +606,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
{
if (chain is null || cert is null)
{
logger.LogWarning("Certificate validation trivially failed due to missing chain or certificate.");
return false;
}
chain.ChainPolicy.TrustMode = X509ChainTrustMode.CustomRootTrust;