Created
October 17, 2013 21:18
-
-
Save vandorjw/7032355 to your computer and use it in GitHub Desktop.
Generate a self signed certificate using openssl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
openssl genrsa -aes256 -passout pass:x -out server.pass.key 2048 | |
openssl rsa -passin pass:x -in server.pass.key -out server.key | |
rm server.pass.key | |
openssl req -new -key server.key -out server.csr | |
openssl x509 -req -days 30 -in server.csr -signkey server.key -out server.crt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will create a self-signed public-private key pair.
It is only good for 30days. I strongly discourage using this on a production server as all your users will see the message "This connection is untrusted". However for testing/development it works great.