Skip to content

Instantly share code, notes, and snippets.

@jwreagor
Last active May 22, 2018 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwreagor/8516537ecaac33d3bbd77781893855aa to your computer and use it in GitHub Desktop.
Save jwreagor/8516537ecaac33d3bbd77781893855aa to your computer and use it in GitHub Desktop.
openssl genrsa -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt -subj "/C=US/ST=Washington/L=Seattle/O=Test/OU=Test/CN=localhost:8888"
openssl genrsa -out server.key 4096
openssl req -new -sha256 -key server.key -out server.csr -subj "/C=US/ST=Washington/L=Seattle/O=Test/OU=Server/CN=stackable.dev" -reqexts SAN -config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:localhost,DNS:127.0.0.1,DNS:*.stackable.dev,DNS:stackable.dev"))
# openssl req -new -sha256 -key server.key -out server.csr -subj "/C=US/ST=Washington/L=Seattle/O=Test/OU=Server/CN=localhost:8888"
openssl x509 -req -days 365 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.crt
openssl rsa -in server.key -out server.key
openssl genrsa -out client.key 4096
openssl req -new -key -sha256 client.key -out client.csr -subj "/C=US/ST=Washington/L=Seattle/O=Test/OU=Client/CN=localhost:8888"
openssl x509 -req -days 365 -in client.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out client.crt
openssl rsa -in client.key -out client.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment