Last active
January 27, 2021 07:36
-
-
Save nblagoev/efb11b708887e5ed965a34787ec98086 to your computer and use it in GitHub Desktop.
Create self-signed certificate
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 req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \ | |
-keyout example.key -out example.crt -subj "/CN=example.com" \ | |
-addext "subjectAltName=DNS:example.com,DNS:www.example.net,IP:10.0.0.1" | |
openssl req -x509 -newkey rsa:4096 -sha256 -days 1825 -nodes \ | |
-keyout example.key -out example.crt -extensions san -config \ | |
<(echo "[req]"; | |
echo distinguished_name=req; | |
echo "[san]"; | |
echo subjectAltName=DNS:example.com,DNS:www.example.net,IP:10.0.0.1 | |
) \ | |
-subj "/CN=example.com" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment