Skip to content

Create Self-signed CA certificate for development use and issue server or client certificates, generated using openssl

License

Notifications You must be signed in to change notification settings

waitingsong/node-myca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

myca

Create my CA center, generate a self signed x509 certificate, issue server certificate from node.js via openssl. Multiple center supported. RSA, EC(P-256, P-384) supported.

GitHub tag License ci codecov Conventional Commits lerna

安装全局依赖

npm i -g c8 lerna rollup tsx

Installing

npm install --save myca

CLI

  • myca-cli

  • Installing by npm i -g myca-cli

  • Command help

    • myca
    • myca initca -h
    • myca issue -h
  • Example

    myca initca --days=10950 --alg=ec --pass=capass \
      --cn="Root CA" --ou="waitingsong.com" --o="waitingsong" --l="CD" --c=CN \
    myca issue --kind=server --days=3650 --pass=mypass \
      --cn="waitingsong.com" --o="waitingsong" --c=CN --caKeyPass=capass \
      --centerName=default --alg=ec \
      --ips="127.0.0.1, 192.168.0.1" \
      --SAN="localhost" 
    myca issue --kind=client --days=3650 --pass=mypass \
      --cn="client" --o="it" --c=CN --caKeyPass=capss \
      --centerName=default --alg=ec 

Usage

  • Initialize default center
    import { initDefaultCenter } from 'myca'
    
    await initDefaultCenter()

Packages

Package Version
myca main-svg
myca-cli cli-svg

License

MIT

Languages