@@ -8223,6 +8223,12 @@ determine_tls_extensions() {
82238223 "$SSL_NATIVE" && using_sockets=false
82248224
82258225 if "$using_sockets"; then
8226+ # 01 max_fragment_length, RFC 6066
8227+ # 02 client_certificate_url, RFC 6066
8228+ # 04 truncated_hmac, RFC 6066
8229+ # signed_certificate_timestamp, RFC 6962
8230+ # encrypt_then_mac, RFC 7366
8231+ # extended_master_secret, RFC 7627
82268232 tls_extensions="00,01,00,01,02, 00,02,00,00, 00,04,00,00, 00,12,00,00, 00,16,00,00, 00,17,00,00"
82278233 if [[ -z $STARTTLS ]]; then
82288234 for alpn_proto in $ALPN_PROTOs; do
@@ -10407,6 +10413,7 @@ certificate_info() {
1040710413 return $ret
1040810414}
1040910415
10416+
1041010417run_server_defaults() {
1041110418 local ciph newhostcert sni
1041210419 local match_found
@@ -10421,6 +10428,7 @@ run_server_defaults() {
1042110428 local -a -i success
1042210429 local cn_nosni cn_sni sans_nosni sans_sni san tls_extensions extn client_auth_ca
1042310430 local using_sockets=true
10431+ local spaces=" "
1042410432
1042510433 "$SSL_NATIVE" && using_sockets=false
1042610434
@@ -10677,7 +10685,7 @@ run_server_defaults() {
1067710685 pr_headlineln " Testing server defaults (Server Hello) "
1067810686 outln
1067910687
10680- pr_bold " TLS extensions (standard) "
10688+ pr_bold " TLS extensions "
1068110689 if [[ ${#TLS_EXTENSIONS[*]} -eq 0 ]]; then
1068210690 outln "(none)"
1068310691 fileout "TLS_extensions" "INFO" "(none)"
@@ -10702,6 +10710,28 @@ run_server_defaults() {
1070210710 outln "$tls_extensions"
1070310711 fi
1070410712
10713+ # We want to check whether the (for >=TLS 1.2) mandatory "extended master secret" extension is supported by
10714+ # the server. Otherwise it would violate RFC 9325 https://www.rfc-editor.org/rfc/rfc9325#section-3.5
10715+ # and cause connection problems.
10716+ jsonID="TLS_misses_extension_23"
10717+ if [[ $(has_server_protocol "tls1_2") -eq 1 ]] && [[ $(has_server_protocol "tls1_3") -eq 1 ]] ; then
10718+ :
10719+ elif [[ $tls_extensions =~ \#23 ]]; then
10720+ # Was the last handshake >= TLS 1.2 ?
10721+ if grep -qE 'Protocol.*(TLSv1.3|TLSv1.2)' $TEMPDIR/$NODEIP.parse_tls_serverhello.txt ; then
10722+ fileout "$jsonID" "INFO" "Extended master secret extension detected"
10723+ debugme outln "${spaces}Extended master secret extension detected"
10724+ else
10725+ out "$spaces"
10726+ prln_warning "Fixme: Server supports TLS 1.2 or 1.3 but last ServerHello was < TLS 1.2"
10727+ fileout "$jsonID" "WARN" "Server supports TLS 1.2 or 1.3 but last ServerHello was < TLS 1.2"
10728+ fi
10729+ else
10730+ out "$spaces"
10731+ prln_svrty_medium "No extended master secret extension, violates RFC 9325 & may cause connection problems"
10732+ fileout "$jsonID" "MEDIUM" "No extended master secret extension, violates RFC 9325 & may cause connection problems"
10733+ fi
10734+
1070510735 pr_bold " Session Ticket RFC 5077 hint "
1070610736 jsonID="TLS_session_ticket"
1070710737 if [[ -z "$sessticket_lifetime_hint" ]]; then
@@ -10923,6 +10953,7 @@ run_server_defaults() {
1092310953 return $ret
1092410954}
1092510955
10956+
1092610957get_session_ticket_lifetime_from_serverhello() {
1092710958 awk '/session ticket.*lifetime/ { print $(NF-1) "$1" }'
1092810959}
0 commit comments