title: Exception in extension code: "CERT_HAS_EXPIRED" error when rejectUnauthorized: false for the agent
body: <p>With the update to VS Code Version: 1.55.0 I see following new behavior:
  If I send an POST https request to a server with expired certificate like</p>
  <pre><code>const agent = https.Agent({rejectUnauthorized: false};
  const response = await fetch('https://some-expired-cert-server.com/request', {
    method: 'POST',
    body: {},
    headers,
    agent: agent});
  </code></pre>
  <p>I get an exception &quot;request to <a href="https://some-expired-cert-server.com/request" rel="nofollow noreferrer">https://some-expired-cert-server.com/request</a> failed, reason: certificate has expired&quot;</p>
  <p>Expected behavior (or what happened before the update to vscode 1.55.0) is that no exception should happen when rejectUnauthorized: false.</p>
  <p>Possible workaround is to put:
  <code>process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; </code> in the code, but according to many posts this is not advisable.</p>
  <p>(I posted that before in vscode github, but was directed here)</p>
  <p>Is that something I need to update on the extension side?</p>