node-cert-generator

1.0.1 • Public • Published

node-cert-generator

Generate self-signed certs with Promise.

Options

const CertGenerator = require('node-cert-generator')
const options = {
    keyPair: 2048,
    rootPath: '' // default to ./node_modules/node-cert-generator/cert
}
const certGenerator  = new CertGenerator (options)

Usage

const certGenerator  = new CertGenerator (options)

certGenerator.getRootCA().then(rootCA => {
    // do something...
})

certGenerator.getHostCAKey(host).then(hostKey => {
    // do something...
})

Methods

getRootCA

no params, return with object

{
    cert,
    publicKey,
    privateKey
}

getRootCAKey

no params, return with root publicKey.

getRootCACert

no params, return with root Cert.

getHostCAKey

params: hostName: String, return with host privateKey.

getHostCACert

params: hostName: String, return with host Cert.

Readme

Keywords

none

Package Sidebar

Install

npm i node-cert-generator

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

10.3 kB

Total Files

6

Last publish

Collaborators

  • bacbin