github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/helper/tlsutil/testdata/README.md (about) 1 # Nomad Test Certificate 2 3 Using [cfssl 1.2.0](https://github.com/cloudflare/cfssl) 4 5 | File | Description | 6 |---------------------|---------------------------| 7 | `ca.pem` | CA certificate | 8 | `ca-key.pem` | CA Key | 9 | `nomad-foo.pem` | Nomad cert for foo region | 10 | `nomad-foo-key.pem` | Nomad key for foo region | 11 | `ca-bad.pem` | CA cert for bad region | 12 | `ca-key-bad.pem` | CA key for bad region | 13 | `nomad-bad.pem` | Nomad cert for bad region | 14 | `nomad-bad-key.pem` | Nomad key for bad region | 15 | `global-*.pem` | For global region | 16 17 ## Generating self-signed certs 18 ```sh 19 # Write defaults and update 20 cfssl print-defaults csr > ca-csr.json 21 cfssl print-defaults config > ca-config.json 22 23 # Generate CA certificate and key 24 cfssl gencert -config ca-config.json -initca ca-csr.json | cfssljson -bare ca - 25 26 # Generate Nomad certificate and key 27 cfssl gencert -ca ca.pem -ca-key ca-key.pem -config ca-config.json nomad-foo-csr.json | cfssljson -bare nomad-foo 28 29 # Generate bad region CA and certificate 30 cfssl gencert -config ca-config.json -initca ca-bad-csr.json | cfssljson -bare ca-bad - 31 cfssl gencert -ca ca-bad.pem -ca-key ca-bad-key.pem -config ca-config.json nomad-bad-csr.json | cfssljson -bare nomad-bad 32 ```