Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1501

Node.js mTLS authentication using Windows Certificate Store

$
0
0

Normally for mTLS HTTP requests in Node.js, you do the following:

const fs = require('fs');const https = require('https');const req = https.request(  {    hostname: 'server.com',    port: 443,    path: '/',    method: 'GET',    cert: fs.readFileSync('client.crt'),    key: fs.readFileSync('client.key'),    ca: fs.readFileSync('server-ca.crt')  },  res => {    res.on('data', function(data) {      // Process response...    });  });req.end();

Is there a way to auto-populate the client certificate/key (client.crt and client.key) from the Windows Certificate Store without having to explicitly access them and pass them to this API (using some low level Windows API). This can especially be useful when the certificate key is not exportable.


Viewing all articles
Browse latest Browse all 1501

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>