Skip to content

Instantly share code, notes, and snippets.

@nuxero
Last active June 5, 2020 17:03
Show Gist options
  • Save nuxero/542d079a444bf67569f29b266fb24436 to your computer and use it in GitHub Desktop.
Save nuxero/542d079a444bf67569f29b266fb24436 to your computer and use it in GitHub Desktop.
A script for generate self signed certs
openssl req -x509 -out localhost.crt -keyout localhost.key \
-newkey rsa:2048 -nodes -sha256 \
-subj '/CN=localhost' -extensions EXT -config <( \
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment