Skip to content

Instantly share code, notes, and snippets.

@arbabnazar
Created September 1, 2021 09:47
Show Gist options
  • Save arbabnazar/8345bf5c73fd851652d509f8813cd641 to your computer and use it in GitHub Desktop.
Save arbabnazar/8345bf5c73fd851652d509f8813cd641 to your computer and use it in GitHub Desktop.
openssl req -x509 -out localhost.crt -keyout localhost.key \
-newkey rsa:2048 -nodes -sha256 -days 1024 \
-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