DEV Community

thomasborgogno
thomasborgogno

Posted on

Help: Trying to read the Private Key from Windows Certificate Store for Mutual Authentication

Dear Node Dev members,
I am currently working on establishing a secure connection with mutual authentication for my application, and I am seeking guidance on reading the private key from the Windows Certificate Store.

Context: I am building a node app that should be able to read the current user CA certificate from his local machine and its private key in order to make Soap calls to an external service in https with mutual authentication.
At this stage, the requirement is to retrieve the private key from the Windows Certificate Store. However, I anticipate a future need to extend this functionality to also read from the certificate store on Mac systems.

I tried various packages, successfully identifying the correct certificate, but I couldn't retrieve the private key.
I would greatly appreciate your guidance or code snippets to help me navigate through this process.

Thank you in advance for your time and assistance, best regards,
Thomas

Top comments (0)