-
Star
(250)
You must be signed in to star a gist -
Fork
(97)
You must be signed in to fork a gist
-
-
Save tadast/9932075 to your computer and use it in GitHub Desktop.
Revisions
-
tadast renamed this gist
Apr 2, 2014 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # 1) Create your private key (any password will do, we remove it below) $ cd ~/.ssh $ openssl genrsa -des3 -out server.orig.key 2048 @@ -33,15 +33,15 @@ $ openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt $ echo "127.0.0.1 localhost.ssl" | sudo tee -a /private/etc/hosts # 6) Boot puma $ puma -b 'ssl://127.0.0.1:3000?key=/Users/tadas/.ssh/server.key&cert=/Users/tadas/.ssh/server.crt' # 7) Add server.crt as trusted !!SYSTEM!! (not login) cert in the mac osx keychain # Open keychain tool, drag .crt file to system, and trust everything. # Notes: # 1) Https traffic and http traffic can't be served from the same process. If you want # both you need to start two instances on different ports. # # -
trcarden revised this gist
Aug 8, 2012 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -37,8 +37,8 @@ $ echo "127.0.0.1 localhost.ssl" | sudo tee -a /private/etc/hosts $ thin start --ssl --ssl-verify --ssl-key-file server.key --ssl-cert-file server.crt # 7) Add server.crt as trusted !!SYSTEM!! (not login) cert in the mac osx keychain # Open keychain tool, drag .crt file to system, and trust everything. # Notes: # 1) Https traffic and http traffic can't be served from the same thin process. If you want -
trcarden revised this gist
Aug 8, 2012 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -25,6 +25,10 @@ Common Name: localhost.ssl ... # 4) Generate self signed ssl certificate $ openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt # 5) Finally Add localhost.ssl to your hosts file $ echo "127.0.0.1 localhost.ssl" | sudo tee -a /private/etc/hosts -
trcarden revised this gist
Aug 8, 2012 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -31,9 +31,10 @@ $ echo "127.0.0.1 localhost.ssl" | sudo tee -a /private/etc/hosts # 6) Boot thin $ thin start --ssl --ssl-verify --ssl-key-file server.key --ssl-cert-file server.crt # 7) Add server.crt as trusted cert in mac osx keychain # Simply navigate to your .crt file and double click, in the keychain tool it opens trust everything. # Notes: # 1) Https traffic and http traffic can't be served from the same thin process. If you want -
trcarden revised this gist
Aug 8, 2012 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -19,6 +19,7 @@ $ openssl req -new -key server.key -out server.csr # (has to do with non internal domain names ... which sadly can be # avoided with a domain name with a "." in the middle of it somewhere) Country Name (2 letter code) [AU]: ... Common Name: localhost.ssl ... @@ -38,4 +39,4 @@ $ thin start --ssl --ssl-verify --ssl-key-file certs/server.key --ssl-cert-file # 1) Https traffic and http traffic can't be served from the same thin process. If you want # both you need to start two instances on different ports. # # -
trcarden revised this gist
Aug 8, 2012 . 1 changed file with 11 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,17 @@ # SSL self signed localhost for rails start to finish, no red warnings. # 1) Create your private key (any password will do, we remove it below) $ openssl genrsa -des3 -out server.orig.key 2048 # 2) Remove the password $ openssl rsa -in server.orig.key -out server.key # 3) Generate the csr (Certificate signing request) (Details are important!) $ openssl req -new -key server.key -out server.csr # IMPORTANT @@ -21,11 +24,13 @@ Common Name: localhost.ssl ... # 5) Finally Add localhost.ssl to your hosts file $ echo "127.0.0.1 localhost.ssl" | sudo tee -a /private/etc/hosts # 6) Boot thin $ thin start --ssl --ssl-verify --ssl-key-file certs/server.key --ssl-cert-file certs/server.crt 7) Add server.crt as trusted cert in mac osx keychain -
trcarden renamed this gist
Aug 8, 2012 . 1 changed file with 11 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,17 @@ # SSL self signed localhost for rails start to finish, no red warnings. 1) Create your private key (any password will do, we remove it below) $ openssl genrsa -des3 -out server.orig.key 2048 2) Remove the password $ openssl rsa -in server.orig.key -out server.key 3) Generate the csr (Certificate signing request) (Details are important!) $ openssl req -new -key server.key -out server.csr # IMPORTANT # MUST have localhost.ssl as the common name to keep browsers happy # (has to do with non internal domain names ... which sadly can be # avoided with a domain name with a "." in the middle of it somewhere) @@ -17,12 +20,15 @@ $ openssl req -new -key server.key -out server.csr Common Name: localhost.ssl ... 5) Finally Add localhost.ssl to your hosts file $ echo "127.0.0.1 localhost.ssl" | sudo tee -a /private/etc/hosts 6) Boot thin thin start --ssl --ssl-verify --ssl-key-file certs/server.key --ssl-cert-file certs/server.crt 7) Add server.crt as trusted cert in mac osx keychain # Notes: # 1) Https traffic and http traffic can't be served from the same thin process. If you want # both you need to start two instances on different ports. -
trcarden created this gist
Aug 8, 2012 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ # SSL self signed localhost for rails start to finish, no red warnings. # Create your private key (any password will do, we remove it below) $ openssl genrsa -des3 -out server.orig.key 2048 # Remove the password $ openssl rsa -in server.orig.key -out server.key # Generate the csr (Certificate signing request) (Details are important!) $ openssl req -new -key server.key -out server.csr # MUST have localhost.ssl as the common name to keep browsers happy # (has to do with non internal domain names ... which sadly can be # avoided with a domain name with a "." in the middle of it somewhere) ... Common Name: localhost.ssl ... Finally Add localhost.ssl to your hosts file $ echo "127.0.0.1 localhost.ssl" | sudo tee -a /private/etc/hosts # Boot thin thin start --ssl --ssl-verify --ssl-key-file certs/server.key --ssl-cert-file certs/server.crt # Notes: # 1) Https traffic and http traffic can't be served from the same thin process. If you want # both you need to start two instances on different ports. # #