node-https-hsm
Nodejs's native https is a wrap of OpenSSL. If you want to use HSM(hardware security module), you need to use openSSL's SetEngine
function and you need to write C code.
This lib is based on node-forge (A pure JS implementation of TLS via Nodejs net.socket
). You can make Certificate Signature by RSA in JS. This in a very common use in bank's USBkey.
Tested in Node v8.9.3
install
npm install https-hsm
API
/** * HTTPS Request, call hardware security module to make Certificate Signature * @param * @property * @property * @property * @property * @property * @property * @property * @property * @property * @property */module
Example
const fs = const httpsHSM = httpsHSM
Notice
the original node-forge
current does not support Tls v1.2 but this lib does and I had made PR to it.Once node-forge support Tls v1.2 I will use original node-forge