forked from jsha/minica
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.md.sh
executable file
·69 lines (52 loc) · 1.91 KB
/
README.md.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
cat << 'EOF'
# `minica2` v1.0.0
* © 2016–2022 Jacob Hoffman-Andrews, Fredrick R. Brennan <copypaste@kittens.ph>, and Minica(2) Project Authors
Minica2 is a simple CA intended for use in situations where the CA operator
also operates each host where a certificate will be used. It automatically
generates both a key and a certificate when asked to produce a certificate.
It does not offer OCSP or CRL services. Minica2 is appropriate, for instance,
for generating certificates for RPC systems or microservices.
On first run, minica2 will generate a keypair and a root certificate in the
current directory, and will reuse that same keypair and root certificate
unless they are deleted.
On each run, minica2 will generate a new keypair and sign an end-entity (leaf)
certificate for that keypair. The certificate will contain a list of DNS names
and/or IP addresses from the command line flags. The key and certificate are
placed in a new directory whose name is chosen as the first domain name from
the certificate, or the first IP address if no domain names are present. It
will not overwrite existing keys or certificates.
The certificate will have a validity of 2 years and 30 days.
## Installation
First, install the [Go tools](https://golang.org/dl/) and set up your `$GOPATH`.
Then, run:
`go install github.com/ctrlcctrlv/minica2.go@latest`
If you prefer to compile manually:
```bash
cd # $HOME/Workspace
git clone https://github.com/ctrlcctrlv/minica2.go.git
cd minica2.go
make install
```
Mac OS users could alternatively use Homebrew: `brew install minica2`
## Example usage
```
# Generate a root key and cert in minica2-key.pem, and minica2.pem, then
# generate and sign an end-entity key and cert, storing them in ./foo.com/
$ minica2 --domain foo.com
# Wildcard
$ minica2 --domain '*.foo.com'
```
## Usage
```
EOF
2>&1 minica2 --help
cat << 'EOF'
```
## License
```
EOF
cat LICENSE.txt
cat << 'EOF'
```
EOF