@@ -20480,17 +20480,11 @@ find_openssl_binary() {
2048020480 case "$OSSL_VER_MAJOR.$OSSL_VER_MINOR" in
2048120481 1.0.2|1.1.0|1.1.1|3.*) HAS_DH_BITS=true ;;
2048220482 esac
20483- if [[ "$OSSL_NAME" =~ LibreSSL ]]; then
20484- [[ ${OSSL_VER//./} -ge 210 ]] && HAS_DH_BITS=true
20485- if "$SSL_NATIVE"; then
20486- outln
20487- pr_warning "LibreSSL in native ssl mode is not a good choice for testing INSECURE features!"
20488- fi
20489- fi
2049020483
2049120484 initialize_engine
2049220485
2049320486 openssl_location="$(type -p $OPENSSL)"
20487+
2049420488 [[ -n "$GIT_REL" ]] && \
2049520489 cwd="$PWD" || \
2049620490 cwd="$RUN_DIR"
@@ -20559,19 +20553,20 @@ find_openssl_binary() {
2055920553 $OPENSSL pkey -help 2>&1 | grep -q Error || HAS_PKEY=true
2056020554 $OPENSSL pkeyutl 2>&1 | grep -q Error || HAS_PKUTIL=true
2056120555
20556+ # In order to avoid delays due to lookups of the hostname "invalid." we just try to avoid using "-connect invalid."
20557+ # when possible. The following does a check fopr that. For WSL we stick for now to the old scheme. Not sure about Cygwin
2056220558 if [[ SYSTEM2 == "WSL" ]]; then
2056320559 NXCONNECT=-connect $NXDNS
2056420560 else
20565- # Do we need -connect invalid. or the like? If this connects and bails out with an error message, we do not
20561+ # If this connects and bails out with an error message, we do not need "-connect invalid."
2056620562 if $OPENSSL s_client 2>&1 </dev/null | grep -Eiaq 'Connection refused|connect error|Bad file descriptor'; then
2056720563 NXCONNECT=""
2056820564 else
20565+ # We need to do link level DNS lookups. See issue #1418 and https://tools.ietf.org/html/rfc6761#section-6.4
2056920566 NXCONNECT="-connect $NXDNS"
2057020567 fi
2057120568 fi
2057220569
20573- # Below and at other occurrences we do a little trick using "$NXDNS" to avoid plain and
20574- # link level DNS lookups. See issue #1418 and https://tools.ietf.org/html/rfc6761#section-6.4
2057520570 if "$HAS_TLS13"; then
2057620571 $OPENSSL s_client -tls1_3 -sigalgs PSS+SHA256:PSS+SHA384 $NXCONNECT </dev/null 2>&1 | grep -aiq "unknown option" || HAS_SIGALGS=true
2057720572 fi
@@ -20585,6 +20580,15 @@ find_openssl_binary() {
2058520580 $OPENSSL s_client -no_comp </dev/null 2>&1 | grep -aiq "unknown option" || HAS_NO_COMP=true
2058620581
2058720582 OPENSSL_NR_CIPHERS=$(count_ciphers "$(actually_supported_osslciphers 'ALL:COMPLEMENTOFALL' 'ALL')")
20583+
20584+ if [[ $OPENSSL_NR_CIPHERS -le 140 ]]; then
20585+ [[ ${OSSL_VER//./} -ge 210 ]] && HAS_DH_BITS=true
20586+ if "$SSL_NATIVE"; then
20587+ outln
20588+ pr_warning "LibreSSL/OpenSSL in native ssl mode with poor cipher support is not a good choice for testing INSECURE features!"
20589+ fi
20590+ fi
20591+
2058820592 if $OPENSSL s_client -curves </dev/null 2>&1 | grep -aiq "unknown option"; then
2058920593 if $OPENSSL s_client -groups </dev/null 2>&1 | grep -aiq "unknown option"; then
2059020594 # this is for openssl versions like 0.9.8, they do not have -groups or -curves -- just to be safe
@@ -21166,8 +21170,8 @@ EOF
2116621170
2116721171 # remove clock and dow if the first word is a dow and not a dom (suse)
2116821172 short_built_date=${OSSL_BUILD_DATE/??:??:?? /}
21169- if [[ ${short_built_date%% *} =~ [A-Za-z]{3} ]]; then
21170- short_built_date=${short_built_date#* }
21173+ if [[ ${short_built_date%% *} =~ ^ [A-Za-z]{3}$ ]]; then
21174+ short_built_date=${short_built_date#* }
2117121175 fi
2117221176 out "${spaces}Using "
2117321177 pr_italic "$OSSL_NAME $OSSL_VER ($short_built_date)"
0 commit comments