Created
August 16, 2017 18:00
-
-
Save RishiKulshreshtha/3e88fe938bdb4f9b0909e17cbaec9137 to your computer and use it in GitHub Desktop.
HTTPS on MAMP
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 req -new -nodes -newkey rsa:2048 -subj '/C=IN/ST=MH/L=Pune/O=Organisation/OU=Development/[email protected]/CN=localhost/subjectAltName=DNS.1=192.168.0.1/' -keyout server.key -out server.csr | |
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt | |
cp server.key server.tmp | |
openssl rsa -in server.tmp -out server.key | |
cp server.crt /Applications/MAMP/conf/apache | |
cp server.key /Applications/MAMP/conf/apache | |
// | |
openssl req -new -sha256 \ | |
-key server.key \ | |
-subj "/C=IN/ST=MH/L=Pune/O=Organisation/OU=Development/[email protected]/CN=localhost" \ | |
-reqexts SAN \ | |
-config <(cat /etc/ssl/openssl.cnf \ | |
<(printf "\n[SAN]\nsubjectAltName=DNS:localhost,DNS:192.168.0.1")) \ | |
-out server.csr | |
openssl req -new -sha256 -key server.key -subj "/C=IN/ST=MH/L=Pune/O=Organisation/OU=Development/[email protected]" -reqexts SAN -config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:localhost,DNS:192.168.0.1")) -out server.csr | |
// | |
openssl req -new -sha256 -key server.key -subj "/C=IN/ST=MH/L=Pune/O=Organisation/OU=Development/[email protected]" -out server.csr -extfile v3.ext | |
openssl req -x509 -newkey rsa:2048 -out MyCompanyCA.cer -outform PEM -keyout MyCompanyCA.pvk -days 10000 -verbose -config MyCompanyCA.cnf -nodes -sha256 -subj "/CN=Globant" | |
openssl req -newkey rsa:2048 -keyout MyCompanyLocalhost.pvk -out MyCompanyLocalhost.req -subj /CN=localhost -sha256 -nodes | |
openssl x509 -req -CA MyCompanyCA.cer -CAkey MyCompanyCA.pvk -in MyCompanyLocalhost.req -out MyCompanyLocalhost.cer -days 10000 -extfile MyCompanyLocalhost.ext -sha256 -set_serial 0x1111 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment