Skip to content

Instantly share code, notes, and snippets.

@pojntfx
Last active August 1, 2022 09:38
Show Gist options
  • Save pojntfx/3af61a664dbd3d0459cef55d5c4398d2 to your computer and use it in GitHub Desktop.
Save pojntfx/3af61a664dbd3d0459cef55d5c4398d2 to your computer and use it in GitHub Desktop.
Create a self-signed SSL certificate with SAN
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
-keyout server.key -out server.crt -subj "/CN=localhost" \
-addext "subjectAltName=DNS:localhost,DNS:*.webview.localhost,IP:100.64.154.251"
@jenvigo
Copy link

jenvigo commented Feb 19, 2022

what is the ip 100.64.154.251 for?

@pojntfx
Copy link
Author

pojntfx commented Feb 19, 2022

@jenvigo For when you also want the certificate to be valid for an IP address, not only for the domain :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment