Skip to content

Instantly share code, notes, and snippets.

@shyim
Created January 3, 2018 08:49
Show Gist options
  • Save shyim/5785988ed5b2ba8979a15f045ad25534 to your computer and use it in GitHub Desktop.
Save shyim/5785988ed5b2ba8979a15f045ad25534 to your computer and use it in GitHub Desktop.
self signed ssl cert using custom ca
openssl genrsa -out ca.key 2048
openssl req -new -x509 -sha256 -days 20000 -key ca.key -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=Acme Root CA" -out ca.crt
openssl req -newkey rsa:2048 -nodes -keyout server.key -subj "/C=CN/ST=GD/L=SZ/O=Acme, Inc./CN=*.somersets.de" -out server.csr
openssl x509 -req -sha256 -extfile <(printf "subjectAltName=DNS:dev.somersets.de") -days 365 -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment