mirror of
https://github.com/mozilla/cipherscan.git
synced 2024-11-22 22:33:40 +01:00
Extract the list of TLS versions to test into an array.
This commit is contained in:
parent
3107661b7c
commit
1828183e3f
11
cipherscan
11
cipherscan
@ -456,6 +456,14 @@ parse_openssl_output() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TLS_VERSIONS_TO_TEST=(
|
||||||
|
'-ssl2'
|
||||||
|
'-ssl3'
|
||||||
|
'-tls1'
|
||||||
|
'-tls1_1'
|
||||||
|
'-tls1_2'
|
||||||
|
)
|
||||||
|
|
||||||
# Connect to a target host with the selected ciphersuite
|
# Connect to a target host with the selected ciphersuite
|
||||||
test_cipher_on_target() {
|
test_cipher_on_target() {
|
||||||
local sslcommand="$*"
|
local sslcommand="$*"
|
||||||
@ -465,8 +473,7 @@ test_cipher_on_target() {
|
|||||||
pfs=""
|
pfs=""
|
||||||
previous_cipher=""
|
previous_cipher=""
|
||||||
certificates=""
|
certificates=""
|
||||||
for tls_version in "-ssl2" "-ssl3" "-tls1" "-tls1_1" "-tls1_2"
|
for tls_version in "${TLS_VERSIONS_TO_TEST[@]}"; do
|
||||||
do
|
|
||||||
# sslv2 client hello doesn't support SNI extension
|
# sslv2 client hello doesn't support SNI extension
|
||||||
# in SSLv3 mode OpenSSL just ignores the setting so it's ok
|
# in SSLv3 mode OpenSSL just ignores the setting so it's ok
|
||||||
# -status exception is ignored in SSLv2, go figure
|
# -status exception is ignored in SSLv2, go figure
|
||||||
|
Loading…
Reference in New Issue
Block a user