https://github.com/pittst3r/certgen
Docker container for generating self-signed CA and leaf X.509 certificates for internal services
https://github.com/pittst3r/certgen
certificate certificate-rotation docker ssl tls x509
Last synced: about 2 months ago
JSON representation
Docker container for generating self-signed CA and leaf X.509 certificates for internal services
- Host: GitHub
- URL: https://github.com/pittst3r/certgen
- Owner: pittst3r
- License: mit
- Created: 2021-05-29T21:36:10.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-05-30T05:02:16.000Z (about 5 years ago)
- Last Synced: 2025-01-29T19:49:08.171Z (over 1 year ago)
- Topics: certificate, certificate-rotation, docker, ssl, tls, x509
- Language: Shell
- Homepage: https://hub.docker.com/r/pittst3r/certgen
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# certgen
Docker image for generating self-signed CA and leaf X.509 certificates. For
internal/private use only; self-signed certificates should not be exposed
publicly because they cannot be verified and trusted by a third-party.
## Usage
```shell
certgen COMMAND [OPTIONS] [ARGUMENTS]
```
### Examples
```shell
docker run -v $PWD/certs:/certs pittst3r/certgen ca foo-ca
docker run -v $PWD/certs:/certs pittst3r/certgen leaf foo-ca bar-baz
openssl verify -CAfile certs/foo-ca.crt certs/bar-baz.crt
# > certs/bar-baz.crt: OK
```
### Commands
#### `ca`
Generate a self-signed root CA certificate and private key.
##### Arguments
1. The Common Name of the CA, which will also be used as the cert and key file
names (less the extension); IMPORTANT: this name cannot be shared by any of
the certificates you create with this root certificate
##### Options
- `--ttl `: (default: `3650`) Number of days for which the certificate
will be valid
- `--mode `: (default: `0600`) Sets the mode of the files
#### `leaf`
Generate a leaf certificate using the given CA certificate/key.
##### Arguments
1. The Common Name of the CA certificate
2. The Common Name of this certificate, which will also be used as the cert and
key file names (less the extension)
##### Options
- `--ttl `: (default: `30`) Number of days for which the certificate
will be valid
- `--mode `: (default: `0600`) Sets the mode of the files