Created
January 3, 2018 08:49
-
-
Save shyim/5785988ed5b2ba8979a15f045ad25534 to your computer and use it in GitHub Desktop.
self signed ssl cert using custom ca
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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