PeculiarVentures / PKI.js

PKI.js is a pure JavaScript library implementing the formats that are used in PKI applications (signing, encryption, certificate requests, OCSP and TSP requests/responses). It is built on WebCrypto (Web Cryptography API) and requires no plug-ins.
http://pkijs.org
Other
1.25k stars 204 forks source link

Usage in Node.js #330

Closed a-i-to closed 2 years ago

a-i-to commented 2 years ago

I'd like to use pki.js on the server side (node.js). We do not expect to run it in a browser.

Main usage:

  1. Generating a key pair and issuing a certificate
  2. CMS sign and verify

Question 1: Is such usage correct? Question 2 Is it a good idea to use node-webcrypto-ossl even if it is not for testing purposes? Question 3 Are there any other limitations in the node environment?

rmhrisk commented 2 years ago
  1. This is fine
  2. Lastest node has webcrypto
  3. No
a-i-to commented 2 years ago

Thanks. I am going to use LTS (v14.17.5), so I will use the external library for a while.

microshine commented 2 years ago

Use @peculiar/webcrypto for NodeJS v14. It uses NodeJS Crypto API and doesn't require C++