title: How to read private key buffer from windows certificate store using nodejs?
body: <p>I am new to Javascript and I have the following code where I need to pass the private key buffer and ceritificate buffer data.</p>
  
  <pre><code>    var mqttOptions = {
              clientId: '100',
              key: fs.readFileSync('C:/Users/wssClientTest/client.key'),
              cert: fs.readFileSync('C:/Users/wssClientTest/client.crt'),
              ca: fs.readFileSync('C:/Users/wssClientTest/ca.crt'),
              secureProtocol: 'TLSv1_method',
              rejectUnauthorized: false,
              protocolId: 'MQIsdp',
              protocolVersion: 3,
              passphrase: 'edgenode',
              keepAlive: 10000,
              clean: false,
              reconnectPeriod: '1000',
              will: willMessage
          };
  </code></pre>
  
  <p>Here I am passing the key and certificate buffer data from files. I want to append the private key into the certificate and install the certificate in windows certificate store. If I do that, how can I read the certificate from the windows certificate store and get the private key from it? Please assist with some example.</p>