Search code examples
javascriptnode.jscryptographycertificate

PKCS#12 (.pfx .p12) generation with node.js on the fly?


I have a certain need to generate them on the fly. While I guess I could use openssl commands to generate files, then read them and delete them, it would be nice if there was a way to do it inside of node.js.

Any suggestions? I checked out certgen but it doesn't have what I'm looking for (plus, it is just calling command line commands and generating files...).


Solution

  • You can use Forge to generate PKCS#12 files in node.js:

    https://github.com/digitalbazaar/forge#pkcs12