mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
C#: Introduce null checks in the NugetPackageRestorer.
This commit is contained in:
@@ -604,6 +604,10 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
{
|
||||
httpClientHandler.ServerCertificateCustomValidationCallback = (message, cert, chain, _) =>
|
||||
{
|
||||
if (chain is null || cert is null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
chain.ChainPolicy.TrustMode = X509ChainTrustMode.CustomRootTrust;
|
||||
chain.ChainPolicy.CustomTrustStore.Add(this.dependabotProxy.Certificate);
|
||||
return chain.Build(cert);
|
||||
|
||||
Reference in New Issue
Block a user