Skip to content

Instantly share code, notes, and snippets.

@aelindeman
Created October 20, 2017 20:58
Show Gist options
  • Save aelindeman/42680c0fb5e18a71e84125854b084220 to your computer and use it in GitHub Desktop.
Save aelindeman/42680c0fb5e18a71e84125854b084220 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