0.1.0 • Published 6 years ago

@darkmaper/easyrsa-node v0.1.0

Weekly downloads
-
License
GPLV2
Repository
github
Last release
6 years ago

Easy-RSA Node.js

Build Status

This module is for easier creation of CA and signing certificates with Node.js without create persistent files and oriented to storing in database.

How this works

To generate a new CA is very simple

const EasyRSA = require('@darkmaper/easyrsa-node');

const easyrsa = new EasyRSA({
    country: "US",
    province: "California",
    city: "San Francisco",
    org: "Example Organization",
    email: "example@email.com",
    ou: "Organizationar Unit Example",
    cn: 'ChangeMe',
    digest: 'sha256',
    dn: 'cn_only',
    keySize: 2048,
    caExpire: 3650,
    crlDays: 180,
    certExpire: 825,
    algo: 'rsa'
});

easyrsa.build_ca('testing','password').then((res) => {
    console.log(res.privateKey, res.certificate);
 });
import EasyRSA from '@darkmaper/easyrsa-node';

const easyrsa = new EasyRSA({
    country: "US",
    province: "California",
    city: "San Francisco",
    org: "Example Organization",
    email: "example@email.com",
    ou: "Organizationar Unit Example",
    cn: 'ChangeMe',
    digest: 'sha256',
    dn: 'cn_only',
    keySize: 2048,
    caExpire: 3650,
    crlDays: 180,
    certExpire: 825,
    algo: 'rsa'
});

easyrsa.build_ca('testing','password').then((res) => {
    console.log(res.privateKey, res.certificate);
})

The output is the private key of CA and its certificate.

0.1.1

6 years ago

0.1.0

6 years ago