Skip to content

c3b2a7/easy-ca-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Easy CA CLI

GitHub GitHub Workflow Status GitHub go.mod Go version GitHub release (latest by date)

A fast, simple and easy-to-use certificate generator.

Overview

  1. multiple key algorithms

    • RSA
      • key size: 10242048
    • ECDSA
      • ecdsa curve: P224P256P384P521
    • ED25591
  2. multiple generation strategies

    • support generate certificate authority、middle certificate authority and general tls certificate
    • support generate certificate chain and private key in pkcs8 format
    • support specified output path
  3. customizing certificate information

    • subject
      • C、O、OU、CN、SERIALNUMBER、L、ST、POSTALCODE
    • subject alternative name
      • dns names
      • ip addresses
    • validity time

Usage

Provider gen ca and gen tls commands for certificate generation, run help for more information about a command and its flags.

easy-ca-cli help

Examples

1、Generate a certificate authority with specified subject info、valid time and output path with ecdsa algorithm.

easy-ca-cli gen ca --ecdsa --ecdsa-curve P512 \
 --subject "/C=CN/O=Easy CA/OU=IT Dept./CN=Easy CA Root" \
 --start-date "2022-01-01 15:00:00" --days 3650 \
 --out-key ca_key.pem --out-cert ca_cert.pem

2、Generate a middle certificate authority using the certificate authority generated above

easy-ca-cli gen ca --ecdsa --ecdsa-curve P384 \
 --subject "/C=CN/O=Easy CA/OU=IT Dept./CN=Easy CA Authority R1" \
 --start-date "2022-01-01 15:05:00" --days 1800 \
 --issuer-key ca_key.pem --issuer-cert ca_cert.pem \
 --out-key mca_key.pem --out-cert mca_cert.chain.pem

3、Generate a TLS certificate using the certificate authority generated above

easy-ca-cli gen tls --rsa --rsa-keysize 2048 \
  --subject "/C=CN/O=Easy CA/OU=IT Dept./CN=easy-ca.com" \
  --host "easy-ca.com,www.easy-ca.com,cli.easy-ca.com" \
  --start-date "2022-01-01 15:10:00" --days 365 \
  --issuer-key mca_key.pem --issuer-cert mca_cert.chain.pem \
  --out-key easyca_key.pem --out-cert easyca_cert.chain.pem

Dependencies

LICENSE

Easy CA CLI is released under the MIT license. See LICENSE