title: Local DevOps build agent fails on NuGet restore with "certificate has expired"
body: <p>We have a local DevOps server + local build agents. And some pipelines have recently started to go haywire, when attempting to get NuGets from the DevOps itself.</p>
  <p>The log doesn't really tell me much (two NuGet sources are used: nuget.org public and the local DevOps server artifacts)...</p>
  <pre><code>Starting: Restore NuGet packages
  ==============================================================================
  Task         : .NET Core
  Description  : Build, test, package, or publish a dotnet application, or run a custom dotnet command
  Version      : 2.174.0
  Author       : Microsoft Corporation
  Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/dotnet-core-cli
  ==============================================================================
  C:\Windows\system32\chcp.com 65001
  Active code page: 65001
  Info: .NET Core SDK/runtime 2.2 and 3.0 are now End of Life(EOL) and have been removed from all hosted agents. If you're using these SDK/runtimes on hosted agents, kindly upgrade to newer versions which are not EOL, or else use UseDotNet task to install the required version.
  SYSTEMVSSCONNECTION exists true
  ##[warning]certificate has expired
  ##[warning]certificate has expired
  ##[error]Error: certificate has expired
  ##[error]Packages failed to restore
  Info: Azure Pipelines hosted agents have been updated to contain .Net Core 3.x (3.1) SDK/Runtime along with 2.1. Unless you have locked down a SDK version for your project(s), 3.x SDK might be picked up which might have breaking behavior as compared to previous versions. 
  Some commonly encountered changes are: 
  If you're using `Publish` command with -o or --Output argument, you will see that the output folder is now being created at root directory rather than Project File's directory. To learn about more such changes and troubleshoot, refer here: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli?view=azure-devops#troubleshooting
  Finishing: Restore NuGet packages
  </code></pre>
  <p>Indeed, there was a small problem with the DevOps certificate which has since been updated, but the error persists. Our DevOps actually has two certificates, depending on how you connect to it - locally it serves a certificate from our own CA (which is trusted, and still valid) and externally our firewall acts as reverse proxy and supplies a Let's Encrypt certificate.</p>
  <p>AFAIK Let's Encrypt CA has changed on 2021-10-01, which would coincide with the issues we're seeing, but I'm not sure how that's helpful in actually resolving the issue.</p>
  <p>Any idea what could be going on here?</p>