-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathset-tls-google-browser
40 lines (34 loc) · 1.47 KB
/
set-tls-google-browser
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
#set -vx
#
# Disable SSLv3 in Google Browser for OSX - test at https://poodletest.com
#
# by Olivetti @electroplax
# https://github.com/Olivetti/Disable-SSLv3-in-Google-Browser-for-OSX
### seems not working
# https://code.google.com/p/chromium/issues/detail?id=71511
#
# defaults write org.chromium.chromium org.chromium.ssl.ssl2 -bool no
# defaults write org.chromium.chromium org.chromium.ssl.ssl3 -bool no
# defaults write org.chromium.chromium org.chromium.ssl.tls1 -bool yes
#
# defaults write com.google.chrome org.chromium.ssl.ssl2 -bool no
# defaults write com.google.chrome org.chromium.ssl.ssl3 -bool no
# defaults write com.google.chrome org.chromium.ssl.tls1 -bool yes
#
# #defaults write com.apple.security.revocation CRLStyle None
# #defaults write com.apple.security.revocation OCSPStye None
###
#open -a "$prg" --args --ssl-version-min=tls1
[[ "$1" = "-h" ]] && echo "Syntax: ${0##*/} [-h]" && exit 1
[[ -x "$0.bin" ]] && "$0.bin" --ssl-version-min=tls1 "$@" && exit
prg[0]="/Applications/Chromium.app/Contents/MacOS/Chromium"
prg[1]="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
for file in "${prg[@]}"
do
[[ -x "$file" ]] && file "$file" | grep 'Mach-O' &>/dev/null && \
{ echo -e "--- \e[31mPreparing ${file##*/}\e[0m ---" && \
mv "$file" "$file.bin" && cp "$0" "$file" && chmod 755 "$file" && \
echo -e "--- \e[32mDone modifying ${file##*/}\e[0m ---\n" || \
echo -e "--- \e[31mFailed modifying ${file##*/}\e[0m ---\n"; }
done