Forked from wolph/whitelist_ssl_certificates_chrome.sh
Last active
November 29, 2017 18:28
-
-
Save beevelop/cf60f88292ad76b0e1bc37ed688c07b4 to your computer and use it in GitHub Desktop.
Revisions
-
beevelop revised this gist
Nov 29, 2017 . 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 @@ -1,5 +1,5 @@ # Whitelist SSL > This script allows you to whitelist / accept / trust your self-signed / custom / invalid certificate by putting it into your Keychain. This is helpful to convince your favorite browser (Chrome or Opera) to not give a shit about its issuer or whatever. ## Quick start ```sh @@ -25,6 +25,7 @@ This script has been successfully tested on - Opera Developer 51.0.2781.0 - Should inform you about „reduced security due to a local, non-public certificate”. - Firefox Developer Edition 58.0b7 (64-bit) didn't gave a fuck about my Kechain. - See https://www.bounca.org/tutorials/install_root_certificate.html#browser-firefox ## Todo - [ ] Make the port configurable via `$2`. -
beevelop revised this gist
Nov 29, 2017 . 1 changed file with 1 addition 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 @@ -1,4 +1,5 @@ # Whitelist SSL > This script allows you to whitelist / accept / trust your self-signed / custom / invalid certificate by putting it into your Keychain. This is helpful to convince your favorite browser (Chrome or Opera) to not give a shit about its issuer, whatever. ## Quick start ```sh -
beevelop revised this gist
Nov 29, 2017 . 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 @@ -14,10 +14,10 @@ chmod +x whitelist_ssl.sh ./whitelist_ssl.sh <URL> ``` ## Changes from Wolph's original implementation - Use `trustAsRoot` (instead of `trustRoot`) in order to automatically enable Always trust. ## Should it work? This script has been successfully tested on - macOS Sierra 10.12.6 - Google Chrome Version 63.0.3239.59 (Official Build) beta (64-bit) -
beevelop revised this gist
Nov 29, 2017 . 1 changed file with 18 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 @@ -1,5 +1,19 @@ # Whitelist SSL ## Quick start ```sh git clone https://gist.github.com/beevelop/cf60f88292ad76b0e1bc37ed688c07b4 whiteliste_ssl cd whiteliste_ssl chmod +x whitelist_ssl.sh ./whitelist_ssl.sh https://my-self-signed-domain.foobar/whatever/ ``` ## Usage ``` # URL gets sanitized and can contain the full path ./whitelist_ssl.sh <URL> ``` ### Changes from Wolph's original implementation - Use `trustAsRoot` (instead of `trustRoot`) in order to automatically enable Always trust. @@ -9,4 +23,7 @@ This script has been successfully tested on - Google Chrome Version 63.0.3239.59 (Official Build) beta (64-bit) - Opera Developer 51.0.2781.0 - Should inform you about „reduced security due to a local, non-public certificate”. - Firefox Developer Edition 58.0b7 (64-bit) didn't gave a fuck about my Kechain. ## Todo - [ ] Make the port configurable via `$2`. -
beevelop revised this gist
Nov 29, 2017 . 2 changed files with 13 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 @@ -0,0 +1,12 @@ # Whitelist SSL ### Changes from Wolph's original implementation - Use `trustAsRoot` (instead of `trustRoot`) in order to automatically enable Always trust. ### Should it work? This script has been successfully tested on - macOS Sierra 10.12.6 - Google Chrome Version 63.0.3239.59 (Official Build) beta (64-bit) - Opera Developer 51.0.2781.0 - Should inform you about „reduced security due to a local, non-public certificate”. - Firefox Developer Edition 58.0b7 (64-bit) didn't gave a fuck about my Kechain. 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 @@ -7,7 +7,7 @@ if [[ "$HOST" =~ .*\..* ]]; then echo -n | openssl s_client -connect $HOST:443 -servername $HOST \ | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' \ | tee "/tmp/$HOST.cert" sudo security add-trusted-cert -d -r trustAsRoot \ -k "/Library/Keychains/System.keychain" "/tmp/$HOST.cert" rm -v "/tmp/$HOST.cert" else -
wolph revised this gist
May 2, 2015 . 1 changed file with 9 additions and 7 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,16 @@ #!/usr/bin/env bash -e HOST=$(echo "$1" | sed -E -e 's/https?:\/\///' -e 's/\/.*//') if [[ "$HOST" =~ .*\..* ]]; then echo "Adding certificate for $HOST" echo -n | openssl s_client -connect $HOST:443 -servername $HOST \ | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' \ | tee "/tmp/$HOST.cert" sudo security add-trusted-cert -d -r trustRoot \ -k "/Library/Keychains/System.keychain" "/tmp/$HOST.cert" rm -v "/tmp/$HOST.cert" else echo "Usage: $0 www.site.name" echo "http:// and such will be stripped automatically" fi -
wolph created this gist
Mar 1, 2015 .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,14 @@ #!/usr/bin/env bash -e SERVERNAME=$(echo "$1" | sed -E -e 's/https?:\/\///' -e 's/\/.*//') echo "$SERVERNAME" if [[ "$SERVERNAME" =~ .*\..* ]]; then echo "Adding certificate for $SERVERNAME" echo -n | openssl s_client -connect $SERVERNAME:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | tee /tmp/$SERVERNAME.cert sudo security add-trusted-cert -d -r trustRoot -k "/Library/Keychains/System.keychain" /tmp/$SERVERNAME.cert else echo "Usage: $0 www.site.name" echo "http:// and such will be stripped automatically" fi