easy-ca-cli

command module
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2023 License: MIT Imports: 1 Imported by: 0

README

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

key algorithm support

  • RSA
    • with key size: 10242048
  • ECDSA
    • ecdsa curve: P224P256P384P521
  • ED25591

generate certificate support

  • support certificate authority、middle certificate authority、general tls certificate
  • support certificate chain and private key in pkcs8 format
  • support specified output path

certificate info custom support

  • Subject
    • C、O、OU、CN、SERIALNUMBER、L、ST、POSTALCODE
  • Subject Alternative Name
    • dns names
    • ip addresses
  • valid from and valid for

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 "Jan 1 15:00:00 2022" --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 "Jan 1 15:05:00 2022" --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 "Jan 1 15:10:00 2022" --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

Documentation

Overview

Copyright © 2023 c3b2a <c3b2a@qq.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Directories

Path Synopsis
cmd
gen

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL