Skip to content

Commit

Permalink
Merge pull request #18246 from michaelnebel/csharp/fixwarnings
Browse files Browse the repository at this point in the history
C#: Fix some new compiler warnings
  • Loading branch information
michaelnebel authored Dec 12, 2024
2 parents 5d18e23 + 684c80c commit a52a549
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions csharp/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"isRoot": true,
"tools": {
"paket": {
"version": "9.0.1",
"version": "9.0.2",
"commands": [
"paket"
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,16 @@ private bool IsFeedReachable(string feed, int timeoutMilliSeconds, int tryCount,
{
httpClientHandler.ServerCertificateCustomValidationCallback = (message, cert, chain, _) =>
{
if (chain is null || cert is null)
{
var msg = cert is null && chain is null
? "certificate and chain"
: chain is null
? "chain"
: "certificate";
logger.LogWarning($"Dependabot proxy certificate validation failed due to missing {msg}");
return false;
}
chain.ChainPolicy.TrustMode = X509ChainTrustMode.CustomRootTrust;
chain.ChainPolicy.CustomTrustStore.Add(this.dependabotProxy.Certificate);
return chain.Build(cert);
Expand Down
10 changes: 5 additions & 5 deletions csharp/paket.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a52a549

Please sign in to comment.