You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: testssl.sh
+42-40Lines changed: 42 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -11,17 +11,16 @@
11
11
# Stable version https://testssl.sh
12
12
# File bugs at GitHub https://github.com/testssl/testssl.sh/issues
13
13
#
14
-
# Project lead and initiator: Dirk Wetter, copyleft: 2007-today, contributions so far see CREDITS.md
15
-
# Main contributions from David Cooper
16
-
# Project lead and initiator: Dirk Wetter, copyleft: 2007-today.
14
+
# Project lead and initiator: Dirk Wetter, copyleft: 2007-today, contributions so far
15
+
# see CREDITS.md .
17
16
# Main contributions from David Cooper. Further contributors see CREDITS.md .
18
17
#
19
-
# License: GPLv2, see https://opensource.org/licenses/gpl-2.0.php and
20
-
# accompanying license "LICENSE.txt". Redistribution + modification under this
21
-
# license permitted.
18
+
# License: GPLv2, see https://opensource.org/licenses/gpl-2.0.php and accompanying
19
+
# license "LICENSE.txt". Redistribution + modification under this license permitted.
20
+
#
22
21
# If you enclose this program or parts of it in your software, it has to be
23
22
# accompanied by the same license (see link). Do not violate the license.
24
-
# If you do not agree to these terms, do not use it in the first place!
23
+
# If you do not agree to these terms, do not use testssl.sh in the first place!
25
24
#
26
25
# OpenSSL, which is being used and maybe distributed via one of this projects'
27
26
# web sites, is subject to their licensing: https://www.openssl.org/source/license.txt
@@ -30,18 +29,19 @@
30
29
# Terms of Use' (v2.2), see https://www.ssllabs.com/downloads/Qualys_SSL_Labs_Terms_of_Use.pdf,
31
30
# stating a CC BY 3.0 US license: https://creativecommons.org/licenses/by/3.0/us/
32
31
#
33
-
# Please note: USAGE WITHOUT ANY WARRANTY, THE SOFTWARE IS PROVIDED "AS IS".
34
-
# USE IT AT your OWN RISK!
35
-
# Seriously! The threat is you run this code on your computer and untrusted input e.g.
36
-
# could be supplied from a server you are querying.
32
+
# Please note:
33
+
# USAGE WITHOUT ANY WARRANTY, THE SOFTWARE IS PROVIDED "AS IS". USE IT AT your OWN RISK!
34
+
#
35
+
# The threat is you run this code on your computer and untrusted input could be supplied from
36
+
# a server you are testing.
37
37
#
38
38
# HISTORY:
39
39
# Back in 2006 it all started with a few openssl commands...
40
40
# That's because openssl is a such a good swiss army knife (see e.g.
41
41
# https://wiki.openssl.org/index.php/Command_Line_Utilities) that it was difficult to resist
42
42
# wrapping some shell commands around it, which I used for my pen tests. This is how
43
43
# everything started.
44
-
# Now it has grown up, it has bash socket support for most features, which has been basically
44
+
# Testssl.sh has grown up, it has bash socket support for most features, which has been basically
45
45
# replacing more and more functions of OpenSSL and some sockets functions serve as some kind
46
46
# of central functions.
47
47
#
@@ -89,7 +89,7 @@ declare -r ALLOK=0 # All is fine
89
89
90
90
91
91
[ -z "${BASH_VERSINFO[0]}" ] && printf "\n\033[1;35m Please make sure you're using \"bash\"! Bye...\033[m\n\n" >&2 && exit $ERR_BASH
92
-
[ $(kill -l | grep -c SIG) -eq 0 ] && printf "\n\033[1;35m Please make sure you're calling me without leading \"sh\"! Bye...\033[m\n\n" >&2 && exit $ERR_BASH
92
+
if ! kill -l | grep -q SIG ; then printf "\n\033[1;35m Please make sure you're calling me not as \"/bin/sh\"! Bye...\033[m\n\n" >&2 ; exit $ERR_BASH; fi
93
93
[ ${BASH_VERSINFO[0]} -lt 3 ] && printf "\n\033[1;35m Minimum requirement is bash 3.2. You have $BASH_VERSION \033[m\n\n" >&2 && exit $ERR_BASH
94
94
[ ${BASH_VERSINFO[0]} -le 3 ] && [ ${BASH_VERSINFO[1]} -le 1 ] && printf "\n\033[1;35m Minimum requirement is bash 3.2. You have $BASH_VERSION \033[m\n\n" >&2 && exit $ERR_BASH
local fs_offered=false ecdhe_offered=false ffdhe_offered=false
10927
10929
local fs_tls13_offered=false fs_tls12_offered=false
10928
-
local protos_to_try proto hexc dash fs_cipher sslvers auth mac export curve dhlen
10930
+
local protos_to_try proto hexc dash fs_cipher sslvers auth mac exprt curve dhlen
10929
10931
local -a hexcode normalized_hexcode ciph rfc_ciph kx enc ciphers_found sigalg ossl_supported
10930
10932
# generated from 'kEECDH:kEDH:!aNULL:!eNULL:!DES:!3DES:!RC4' with openssl 1.0.2i and openssl 1.1.0
10931
10933
local fs_cipher_list="DHE-DSS-AES128-GCM-SHA256:DHE-DSS-AES128-SHA256:DHE-DSS-AES128-SHA:DHE-DSS-AES256-GCM-SHA384:DHE-DSS-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-DSS-CAMELLIA128-SHA256:DHE-DSS-CAMELLIA128-SHA:DHE-DSS-CAMELLIA256-SHA256:DHE-DSS-CAMELLIA256-SHA:DHE-DSS-SEED-SHA:DHE-RSA-AES128-CCM8:DHE-RSA-AES128-CCM:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-CCM8:DHE-RSA-AES256-CCM:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-CAMELLIA128-SHA256:DHE-RSA-CAMELLIA128-SHA:DHE-RSA-CAMELLIA256-SHA256:DHE-RSA-CAMELLIA256-SHA:DHE-RSA-CHACHA20-POLY1305-OLD:DHE-RSA-CHACHA20-POLY1305:DHE-RSA-SEED-SHA:ECDHE-ECDSA-AES128-CCM8:ECDHE-ECDSA-AES128-CCM:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES256-CCM8:ECDHE-ECDSA-AES256-CCM:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-CAMELLIA128-SHA256:ECDHE-ECDSA-CAMELLIA256-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305-OLD:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-CAMELLIA128-SHA256:ECDHE-RSA-CAMELLIA256-SHA384:ECDHE-RSA-CHACHA20-POLY1305-OLD:ECDHE-RSA-CHACHA20-POLY1305"
@@ -10998,7 +11000,7 @@ run_fs() {
10998
11000
fi
10999
11001
done
11000
11002
else
11001
-
while read -r hexc dash ciph[nr_supported_ciphers] sslvers kx[nr_supported_ciphers] auth enc[nr_supported_ciphers] mac export; do
11003
+
while read -r hexc dash ciph[nr_supported_ciphers] sslvers kx[nr_supported_ciphers] auth enc[nr_supported_ciphers] mac exprt; do
0 commit comments