Skip to content

Instantly share code, notes, and snippets.

@craffate
Created October 23, 2021 14:36
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 craffate/b6ff2b0100a562c65dd59a49333af883 to your computer and use it in GitHub Desktop.
Save craffate/b6ff2b0100a562c65dd59a49333af883 to your computer and use it in GitHub Desktop.
Generates a self-signed certificate for localhost
#!/bin/sh
openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=GB/ST=Wonderland/L=Wonderland/O=Alice/CN=localhost" -keyout localhost.key -out localhost.crt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment