title: npm install: request to https://registry.npmjs.org/clone failed, reason: CA certificate key too weak
body: <p>Running this</p>
  <pre><code>$ node -v
  v16.14.0
  
  $ npm --version
  8.3.1
  
  $ npm install --save-dev webpack@1.12.12 --verbose
  </code></pre>
  <p>And I'm getting this error:</p>
  <pre><code>npm verb stack FetchError: request to https://registry.npmjs.org/clone failed, reason: CA certificate key too weak
  npm verb stack     at ClientRequest.&lt;anonymous&gt; (/usr/lib/node_modules/npm/node_modules/minipass-fetch/lib/index.js:110:14)
  npm verb stack     at ClientRequest.emit (node:events:520:28)
  npm verb stack     at TLSSocket.socketErrorListener (node:_http_client:442:9)
  npm verb stack     at TLSSocket.emit (node:events:532:35)
  npm verb stack     at emitErrorNT (node:internal/streams/destroy:157:8)
  npm verb stack     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
  npm verb stack     at processTicksAndRejections (node:internal/process/task_queues:83
  </code></pre>
  <p>I would think that registry.npmjs.org would have a good certificate.  What can I do to resolve this error?  I looked at some other answers, but could not find one for this specific error.</p>
  <p>Some certificate info:<br />
  Issued to: sni.cloudflaressl.com<br />
  Issued by: Cloudflare Inc ECC CA-3<br />
  Valid from: 7/17/2022 to 7/18/2023<br />
  Secure hash algorithm: sha256<br />
  Public key: ECC (256 Bits)</p>
  <p>Putting this in a file and running node at the command line gets me about the same thing:</p>
  <pre><code>require('https').get('https://registry.npmjs.org/', (res)=&gt;{console.log(res.statusCode)})
  </code></pre>
  <p>result:</p>
  <pre><code>node:events:498
        throw er; // Unhandled 'error' event
        ^
  
  Error: CA certificate key too weak
      at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
      at TLSSocket.emit (node:events:520:28)
      at TLSSocket._finishInit (node:_tls_wrap:944:8)
      at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12)
  </code></pre>
  <p>an nslookup of registry.npmjs.org returns  104.16.27.35 and many different IPv6 addresses including 2606:4700::6810:1823</p>