Skip to content

Instantly share code, notes, and snippets.

@josfaber
Last active January 29, 2022 11:00
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 josfaber/06b6ffe027023bcb8ca096afa3b6b009 to your computer and use it in GitHub Desktop.
Save josfaber/06b6ffe027023bcb8ca096afa3b6b009 to your computer and use it in GitHub Desktop.
Self signed certificate
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
-keyout selfsigned.key -out selfsigned.crt -extensions san -config \
<(echo "[req]";
echo distinguished_name=req;
echo "[san]";
echo subjectAltName=DNS:localhost,DNS:example.net,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