Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tidusete/1c1c6ad187d84335743bb9a26a290b81 to your computer and use it in GitHub Desktop.
Save tidusete/1c1c6ad187d84335743bb9a26a290b81 to your computer and use it in GitHub Desktop.
quickly generate a dhparam and self-signed ssl certificate
#!/bin/sh
echo 'generating dh param'
openssl dhparam -out dhparam 4096
echo 'generating ssl certificate and key'
openssl req -x509 -nodes \
-newkey rsa:4096 -keyout key \
-out cert -sha256 \
-days 1461 \ # 4 years
-subj '/CN=localhost'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment