github.com/diptanu/nomad@v0.5.7-0.20170516172507-d72e86cbe3d9/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 16 ## Generating self-signed certs 17 ```sh 18 # Write defaults and update 19 cfssl print-defaults csr > ca-csr.json 20 cfssl print-defaults config > ca-config.json 21 22 # Generate CA certificate and key 23 cfssl gencert -config ca-config.json -initca ca-csr.json | cfssljson -bare ca - 24 25 # Generate Nomad certificate and key 26 cfssl gencert -ca ca.pem -ca-key ca-key.pem -config ca-config.json nomad-foo-csr.json | cfssljson -bare nomad-foo 27 28 # Generate bad region CA and certificate 29 cfssl gencert -config ca-config.json -initca ca-bad-csr.json | cfssljson -bare ca-bad - 30 cfssl gencert -ca ca-bad.pem -ca-key ca-bad-key.pem -config ca-config.json nomad-bad-csr.json | cfssljson -bare nomad-bad 31 ```