Created
May 7, 2017 10:06
-
-
Save macintoshhelper/ad901defc48f8e125408c1312626be7d to your computer and use it in GitHub Desktop.
Initialise fake SSL certificate for localhost
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
openssl genrsa -out key.pem 2048 | |
openssl req -new -key key.pem -out csr.pem -subj "/C=US/ST=None/L=None/O=None/CN=localhost" | |
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem | |
rm csr.pem | |
mkdir keys | |
mv cert.pem keys/cert.pem | |
mv key.pem keys/key.pem | |
echo 'keys/' >> .gitignore |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment