Search code examples
node.jsopenssl

How do I access OpenSSL using Node.js?


I want to use some OpenSSL functionality from Node.js which is not provided using Node's crypto module, e.g. create a CSR.

The only solution I currently have is using a child process to run the openssl command line utility, but this is not the ideal solution as you are dependent on certain paths, ...

Is there a better way to do this?


Solution

  • If you want to generate it on linux or mac you can use https://github.com/andris9/pem

    If you want to do it own windows you can use openssl binaries.

    Of course in both cases child process has been used. I think that's the only way you can get it