Last active
September 26, 2015 05:47
-
-
Save virtualstaticvoid/1048594 to your computer and use it in GitHub Desktop.
Make self-signed SSL certificate for development
This file contains hidden or 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 | |
| # as per http://www.24hourapps.com/2009/02/generate-your-own-free-ssl-certificate.html | |
| # will prompt for passwords and details for certificate creation | |
| # change file name as required | |
| filename=${1:-mycert} | |
| openssl genrsa -des3 -out $filename.key 1024 | |
| openssl req -new -key $filename.key -out $filename.csr | |
| cp $filename.key $filename.original.key | |
| openssl rsa -in $filename.original.key -out $filename.key | |
| openssl x509 -req -days 365 -in $filename.csr -signkey $filename.key -out $filename.crt |
This file contains hidden or 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 | |
| # as per http://superuser.com/a/226229 | |
| # change file name as required | |
| filename=${1:-mycert} | |
| openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 \ | |
| -subj "/OU=Development/O=Development/CN=localhost:3000" \ | |
| -keyout $filename.key \ | |
| -out $filename.crt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment