Created
March 23, 2017 16:47
-
-
Save nkmathew/126694c5246749bb2dd751eb9c7fde4d to your computer and use it in GitHub Desktop.
Self-signed localhost openssl certificate
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
#!/usr/bin/env bash | |
# Generates a self-signed localhost certificate. Don't forget to restart the browser | |
# if it doesn't work the first time(certificate caching) | |
sitename=$1 | |
openssl req -config openssl.cnf -x509 -nodes -sha256 -days 365 -newkey rsa:2048 -keyout $sitename.key -out $sitename.crt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment