easycert

command module
v0.0.0-...-4982f92 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

README

easycert

easycert is a lightweight command-line utility for generating and inspecting X.509 certificates. It aims to simplify common certificate management tasks such as creating a certificate authority (CA), issuing certificates, and examining existing certificates.

Installation

go install github.com/fanzy618/easycert@latest

The easycert binary will be installed to your GOBIN (usually $GOPATH/bin).

Global Flags

The following flags are available to all commands:

  • -n, --name – base name of files to read or write (default: ca)
  • -d, --dir – directory where certificates and keys are stored (default: current directory)
  • --cn – common name for the certificate (default: easycert)
  • --orgs – comma-separated list of organizations (default: easycert)
  • --dns – repeatable flag for DNS names
  • --ip – repeatable flag for IP addresses
  • -b – RSA key size in bits (default: 4096)
  • --duration – validity duration for certificates (default: 1y, accepts values like 30d, 12h)

Commands

ca

Generate a self-signed certificate authority.

easycert ca -n root --cn root-ca

This command writes root.pem and root-key.pem to the directory specified by --dir.

cert

Generate a certificate, optionally signed by an existing CA.

# create a certificate signed by the previously generated root
 easycert cert -n cert --cn mysite.com --ca root --dns mysite1.com --dns mysite2.com

If --ca is omitted a new self-signed CA is generated automatically.

show

Display information about a certificate stored on disk.

easycert show -n cert

Example output:

Subject: CN=mysite.com,O=easycert
DNSNames: mysite1.com, mysite2.com
IPAddresses:
NotBefore: 2025-08-07T06:46:02Z
NotAfter: 2026-08-07T06:46:04Z

License

This project is licensed under the Apache 2.0 License.

Documentation

Overview

Copyright © 2020 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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