Skip to content

Commit bc2ea32

Browse files
author
David Cooper
authored
Support OpenSSL 3.0.1-dev and 3.1.0-dev
Same as #2040, but for the 3.0 branch.
1 parent d43fa50 commit bc2ea32

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

testssl.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,7 +1807,7 @@ check_revocation_ocsp() {
18071807
if [[ "$OSSL_NAME" =~ LibreSSL ]]; then
18081808
host_header="-header Host ${host_header}"
18091809
elif [[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR == 1.1.0* ]] || [[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR == 1.1.1* ]] || \
1810-
[[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR == 3.0.0* ]]; then
1810+
[[ $OSSL_VER_MAJOR == 3 ]]; then
18111811
host_header="-header Host=${host_header}"
18121812
else
18131813
host_header="-header Host ${host_header}"
@@ -4039,7 +4039,7 @@ ciphers_by_strength() {
40394039
ossl_ciphers_proto=""
40404040
elif [[ "$proto" == -ssl2 ]] || [[ "$proto" == -ssl3 ]] || \
40414041
[[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR == 1.1.0* ]] || [[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR == 1.1.1* ]] || \
4042-
[[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR == 3.0.0* ]]; then
4042+
[[ $OSSL_VER_MAJOR == 3 ]]; then
40434043
ossl_ciphers_proto="$proto"
40444044
else
40454045
ossl_ciphers_proto="-tls1"
@@ -6168,7 +6168,7 @@ sub_session_resumption() {
61686168
return 7
61696169
fi
61706170
if "$byID" && [[ ! "$OSSL_NAME" =~ LibreSSL ]] && \
6171-
( [[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR == 1.1.1* ]] || [[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR == 3.0.0* ]] ) && \
6171+
( [[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR == 1.1.1* ]] || [[ $OSSL_VER_MAJOR == 3 ]] ) && \
61726172
[[ ! -s "$sess_data" ]]; then
61736173
# it seems OpenSSL indicates no Session ID resumption by just not generating output
61746174
debugme echo -n "No session resumption byID (empty file)"
@@ -10957,7 +10957,7 @@ hmac() {
1095710957
local key="$2" text="$3" output
1095810958
local -i ret
1095910959

10960-
if [[ ! "$OSSL_NAME" =~ LibreSSL ]] && [[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR == 3.0.0* ]]; then
10960+
if [[ ! "$OSSL_NAME" =~ LibreSSL ]] && [[ $OSSL_VER_MAJOR == 3 ]]; then
1096110961
output="$(asciihex_to_binary "$text" | $OPENSSL mac -macopt digest:"${hash_fn/-/}" -macopt hexkey:"$key" HMAC 2>/dev/null)"
1096210962
ret=$?
1096310963
tm_out "$(strip_lf "$output")"
@@ -13018,7 +13018,7 @@ generate_key_share_extension() {
1301813018
[[ "$OSSL_NAME" =~ LibreSSL ]] && continue
1301913019
if [[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR != 1.1.0* ]] && \
1302013020
[[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR != 1.1.1* ]] && \
13021-
[[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR != 3.0.0* ]]; then
13021+
[[ $OSSL_VER_MAJOR != 3 ]]; then
1302213022
continue
1302313023
fi
1302413024
fi
@@ -13030,7 +13030,7 @@ generate_key_share_extension() {
1303013030
if [[ $i -gt 12 ]] && [[ $group -eq 30 ]] && [[ "$2" == all ]]; then
1303113031
[[ "$OSSL_NAME" =~ LibreSSL ]] && continue
1303213032
if [[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR != 1.1.1* ]] && \
13033-
[[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR != 3.0.0* ]]; then
13033+
[[ $OSSL_VER_MAJOR != 3 ]]; then
1303413034
continue
1303513035
fi
1303613036
fi
@@ -13197,7 +13197,7 @@ prepare_tls_clienthello() {
1319713197
# Supported Groups Extension
1319813198
if [[ ! "$process_full" =~ all ]] || ( [[ ! "$OSSL_NAME" =~ LibreSSL ]] && \
1319913199
( [[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR == 1.1.1* ]] || \
13200-
[[ $OSSL_VER_MAJOR.$OSSL_VER_MINOR == 3.0.0* ]] ) ); then
13200+
[[ $OSSL_VER_MAJOR == 3 ]] ) ); then
1320113201
extension_supported_groups="
1320213202
00,0a, # Type: Supported Groups, see RFC 8446
1320313203
00,10, 00,0e, # lengths
@@ -17062,7 +17062,7 @@ find_openssl_binary() {
1706217062

1706317063
# see #190, reverting logic: unless otherwise proved openssl has no dh bits
1706417064
case "$OSSL_VER_MAJOR.$OSSL_VER_MINOR" in
17065-
1.0.2|1.1.0|1.1.1|3.0.0) HAS_DH_BITS=true ;;
17065+
1.0.2|1.1.0|1.1.1|3*) HAS_DH_BITS=true ;;
1706617066
esac
1706717067
if [[ "$OSSL_NAME" =~ LibreSSL ]]; then
1706817068
[[ ${OSSL_VER//./} -ge 210 ]] && HAS_DH_BITS=true

0 commit comments

Comments
 (0)