mirror of
https://repo.or.cz/socat.git
synced 2025-06-09 19:26:51 +00:00
Fixes for old Debian
This commit is contained in:
parent
0f1c5dd85a
commit
19d488a14f
6 changed files with 194 additions and 138 deletions
2
CHANGES
2
CHANGES
|
@ -72,6 +72,8 @@ Building:
|
|||
Porting:
|
||||
Fix for old FreeBSD.
|
||||
|
||||
Fixes for old Debian
|
||||
|
||||
Testing:
|
||||
test.sh produces file results.txt with columns of test numbers, names,
|
||||
and results.
|
||||
|
|
|
@ -333,6 +333,9 @@
|
|||
/* Define if you have the <readline/history.h> header file. */
|
||||
#undef HAVE_READLINE_HISTORY_H
|
||||
|
||||
/* Define if you have the <mqueue.h> header file. */
|
||||
#undef HAVE_MQUEUE_H
|
||||
|
||||
/* Define if you have the readline library. */
|
||||
#undef HAVE_LIBREADLINE
|
||||
|
||||
|
|
|
@ -489,6 +489,13 @@ AC_ARG_ENABLE(posixmq, [ --disable-posixmq disable POSIX MQ support],
|
|||
*) WITH_POSIXMQ=1; AC_MSG_RESULT(yes);;
|
||||
esac],
|
||||
[WITH_POSIXMQ=1; AC_MSG_RESULT(yes)])
|
||||
if test "$WITH_POSIXMQ"; then
|
||||
AC_CHECK_HEADERS(mqueue.h)
|
||||
if test "x$ac_cv_header_mqueue_h" != xyes; then
|
||||
AC_MSG_WARN([Header mqueue.h not found, disabling POSIX MQ])
|
||||
WITH_POSIXMQ=
|
||||
fi
|
||||
fi
|
||||
if test "$WITH_POSIXMQ"; then
|
||||
case "`uname`" in
|
||||
Linux) AC_DEFINE(WITH_POSIXMQ)
|
||||
|
|
|
@ -182,7 +182,7 @@
|
|||
#if WITH_NAMESPACES && HAVE_SCHED_H
|
||||
#include <sched.h>
|
||||
#endif
|
||||
#if WITH_POSIXMQ
|
||||
#if WITH_POSIXMQ && HAVE_MQUEUE_H
|
||||
#include <mqueue.h> /* POSIX MQ */
|
||||
#endif
|
||||
#if WITH_READLINE
|
||||
|
|
316
test.sh
316
test.sh
|
@ -291,89 +291,6 @@ SIZE_T=$($PROCAN |grep "^[^[:space:]]*size_t" |awk '{print($3);}')
|
|||
#AI_ADDRCONFIG=; if [ "$($SOCAT -hhh |grep ai-addrconfig)" ]; then AI_ADDRCONFIG="ai-addrconfig=0"; fi
|
||||
#[ "$DEFS" ] && echo "AI_ADDRCONFIG=\"$AI_ADDRCONFIG\"" >&2
|
||||
|
||||
# SSL certificate contents
|
||||
TESTCERT_CONF=testcert.conf
|
||||
TESTCERT6_CONF=testcert6.conf
|
||||
TESTALT_CONF=testalt.conf
|
||||
#
|
||||
TESTCERT_COMMONNAME="$LOCALHOST"
|
||||
TESTCERT_COMMONNAME6="$LOCALHOST6"
|
||||
TESTCERT_COUNTRYNAME="XY"
|
||||
TESTCERT_LOCALITYNAME="Lunar Base"
|
||||
TESTCERT_ORGANIZATIONALUNITNAME="socat"
|
||||
TESTCERT_ORGANIZATIONNAME="dest-unreach"
|
||||
TESTCERT_SUBJECT="C = $TESTCERT_COUNTRYNAME, CN = $TESTCERT_COMMONNAME, O = $TESTCERT_ORGANIZATIONNAME, OU = $TESTCERT_ORGANIZATIONALUNITNAME, L = $TESTCERT_LOCALITYNAME"
|
||||
TESTCERT_ISSUER="C = $TESTCERT_COUNTRYNAME, CN = $TESTCERT_COMMONNAME, O = $TESTCERT_ORGANIZATIONNAME, OU = $TESTCERT_ORGANIZATIONALUNITNAME, L = $TESTCERT_LOCALITYNAME"
|
||||
RSABITS=2048 # Ubuntu-20.04 with OpenSSL-1.1.1f does not work with 1024 nor 1536
|
||||
DSABITS=2048
|
||||
cat >$TESTCERT_CONF <<EOF
|
||||
prompt=no
|
||||
|
||||
[ req ]
|
||||
default_bits = $RSABITS
|
||||
distinguished_name=Test
|
||||
|
||||
[ Test ]
|
||||
countryName=$TESTCERT_COUNTRYNAME
|
||||
commonName=$TESTCERT_COMMONNAME
|
||||
O=$TESTCERT_ORGANIZATIONNAME
|
||||
OU=$TESTCERT_ORGANIZATIONALUNITNAME
|
||||
L=$TESTCERT_LOCALITYNAME
|
||||
|
||||
EOF
|
||||
|
||||
cat >$TESTCERT6_CONF <<EOF
|
||||
prompt=no
|
||||
|
||||
[ req ]
|
||||
default_bits = $RESBITS
|
||||
distinguished_name=Test
|
||||
|
||||
[ Test ]
|
||||
countryName=$TESTCERT_COUNTRYNAME
|
||||
commonName=$TESTCERT_COMMONNAME6
|
||||
O=$TESTCERT_ORGANIZATIONNAME
|
||||
OU=$TESTCERT_ORGANIZATIONALUNITNAME
|
||||
L=$TESTCERT_LOCALITYNAME
|
||||
|
||||
EOF
|
||||
|
||||
cat >$TESTALT_CONF <<EOF
|
||||
# config for generation of self signed certificate with IP addresses in
|
||||
# SubjectAltNames
|
||||
prompt=no
|
||||
|
||||
[ req ]
|
||||
default_bits = $RSABITS
|
||||
distinguished_name = subject
|
||||
x509_extensions = x509_ext
|
||||
|
||||
[ subject ]
|
||||
countryName=$TESTCERT_COUNTRYNAME
|
||||
commonName=servername
|
||||
O=$TESTCERT_ORGANIZATIONNAME
|
||||
OU=$TESTCERT_ORGANIZATIONALUNITNAME
|
||||
L=$TESTCERT_LOCALITYNAME
|
||||
|
||||
[ x509_ext ]
|
||||
subjectAltName = @alternate_names
|
||||
|
||||
[ alternate_names ]
|
||||
DNS.1 = localhost
|
||||
DNS.2 = localhost4
|
||||
DNS.3 = localhost6
|
||||
IP.1 = 127.0.0.1
|
||||
IP.2 = ::1
|
||||
|
||||
EOF
|
||||
|
||||
# clean up from previous runs - no, only with -C
|
||||
#rm -f testcli.{crt,key,pem}
|
||||
#rm -f testsrv.{crt,key,pem}
|
||||
#rm -f testcli6.{crt,key,pem}
|
||||
#rm -f testsrv6.{crt,key,pem}
|
||||
#rm -f testalt.{crt,key,pem}
|
||||
|
||||
CAT="cat"
|
||||
OD_C="od -c"
|
||||
|
||||
|
@ -554,7 +471,7 @@ fi
|
|||
|
||||
# need output like "644"
|
||||
case "$UNAME" in
|
||||
Linux) fileperms() { stat -L --print "%a\n" "$1" 2>/dev/null; } ;;
|
||||
#Linux) fileperms() { stat -L --print "%a\n" "$1" 2>/dev/null; } ;;
|
||||
FreeBSD) fileperms() { stat -L -x "$1" |grep ' Mode:' |sed 's/.* Mode:[[:space:]]*([0-9]\([0-7][0-7][0-7]\).*/\1/'; } ;;
|
||||
*) fileperms() {
|
||||
local p s=0 c
|
||||
|
@ -692,42 +609,6 @@ if [ -x /usr/xpg4/bin/id ]; then
|
|||
PATH="/usr/xpg4/bin:$PATH"
|
||||
fi
|
||||
|
||||
OPENSSL_S_CLIENT_4=
|
||||
OPENSSL_S_CLIENT_DTLS=
|
||||
init_openssl_s_client () {
|
||||
if openssl s_client -help 2>&1 |grep -q ' -4 '; then
|
||||
OPENSSL_S_CLIENT_4="-4"
|
||||
else
|
||||
OPENSSL_S_CLIENT_4=" "
|
||||
fi
|
||||
if openssl s_client -help 2>&1 | grep -q ' -dtls '; then
|
||||
OPENSSL_S_CLIENT_DTLS=-dtls
|
||||
else
|
||||
OPENSSL_S_CLIENT_DTLS=-dtls1
|
||||
fi
|
||||
}
|
||||
|
||||
OPENSSL_S_SERVER_4=
|
||||
OPENSSL_S_SERVER_DTLS=
|
||||
OPENSSL_S_SERVER_NO_IGN_EOF=
|
||||
init_openssl_s_server () {
|
||||
if openssl s_server -help 2>&1 |grep -q ' -4 '; then
|
||||
OPENSSL_S_SERVER_4="-4"
|
||||
else
|
||||
OPENSSL_S_SERVER_4=" "
|
||||
fi
|
||||
if openssl s_server -help 2>&1 | grep -q ' -dtls '; then
|
||||
OPENSSL_S_SERVER_DTLS="-dtls"
|
||||
else
|
||||
OPENSSL_S_SERVER_DTLS="-dtls1"
|
||||
fi
|
||||
if openssl s_server -help 2>&1 | grep -q ' -no-ign_eof '; then
|
||||
OPENSSL_S_SERVER_NO_IGN_EOF="-no-ign_eof"
|
||||
else
|
||||
OPENSSL_S_SERVER_NO_IGN_EOF=" "
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
[ -z "$TESTS" ] && TESTS="consistency functions filan"
|
||||
# use '%' as separation char
|
||||
|
@ -968,6 +849,20 @@ testod () {
|
|||
fi # NUMCOND
|
||||
}
|
||||
|
||||
# bash before version 3 aborts scripts that contain unquoted '=~'
|
||||
# Therefore we create a shell script and quotedly fill it with '=~' for newer
|
||||
# bashes
|
||||
mkdir -p $td/bin
|
||||
rm -f $td/bin/re_match
|
||||
if [ "${BASH_VERSION%%[.]*}" -le 2 ]; then
|
||||
echo '[ -n "$(echo "$1" |sed -n "/$2/ p")" ]' >$td/bin/re_match
|
||||
else
|
||||
echo '[[ "$1" =~ $2 ]]' >$td/bin/re_match
|
||||
fi
|
||||
chmod a+x $td/bin/re_match
|
||||
PATH=$PATH:$td/bin
|
||||
|
||||
|
||||
# test if the socat executable has these features compiled in
|
||||
# print the first missing address type
|
||||
testfeats () {
|
||||
|
@ -985,7 +880,8 @@ testfeats () {
|
|||
fi
|
||||
fi
|
||||
if SOCAT_MAIN_WAIT= $SOCAT -V |grep "#define WITH_$A 1\$" >/dev/null; then
|
||||
if [[ "$A" =~ OPENSSL.* ]]; then
|
||||
# if [[ "$A" =~ OPENSSL.* ]]; then
|
||||
if re_match "$A" "OPENSSL.*"; then
|
||||
gentestcert testsrv
|
||||
gentestcert testcli
|
||||
fi
|
||||
|
@ -1165,9 +1061,9 @@ runsip6 () {
|
|||
AIX) l=$($IFCONFIG lo0 |grep 'inet6 ::1[/%]') ;;
|
||||
HP-UX) l=$($IFCONFIG lo0 |grep ' inet6 ') ;;
|
||||
Linux) if [ "$IP" ]; then
|
||||
l=$($IP address |$GREP_E 'inet6 ::1/128')
|
||||
l="$($IP address |$GREP_E 'inet6 ::1/128')"
|
||||
else
|
||||
l=$($IFCONFIG |$GREP_E 'inet6 (addr: )?::1/?')
|
||||
l="$($IFCONFIG |$GREP_E 'inet6 (addr: )?::1/?')"
|
||||
fi ;;
|
||||
NetBSD)l=$($IFCONFIG -a |grep 'inet6 ::1\>');;
|
||||
OSF1) l=$($IFCONFIG -a |grep ' inet6 ') ;;
|
||||
|
@ -1277,6 +1173,141 @@ routesip6 () {
|
|||
}
|
||||
|
||||
|
||||
# SSL needs runsip6(), thus moved down
|
||||
|
||||
# SSL certificate contents
|
||||
TESTCERT_CONF=testcert.conf
|
||||
TESTCERT6_CONF=testcert6.conf
|
||||
TESTALT_CONF=testalt.conf
|
||||
#
|
||||
TESTCERT_COMMONNAME="$LOCALHOST"
|
||||
TESTCERT_COMMONNAME6="$LOCALHOST6"
|
||||
TESTCERT_COUNTRYNAME="XY"
|
||||
TESTCERT_LOCALITYNAME="Lunar Base"
|
||||
TESTCERT_ORGANIZATIONALUNITNAME="socat"
|
||||
TESTCERT_ORGANIZATIONNAME="dest-unreach"
|
||||
TESTCERT_SUBJECT="C = $TESTCERT_COUNTRYNAME, CN = $TESTCERT_COMMONNAME, O = $TESTCERT_ORGANIZATIONNAME, OU = $TESTCERT_ORGANIZATIONALUNITNAME, L = $TESTCERT_LOCALITYNAME"
|
||||
TESTCERT_ISSUER="C = $TESTCERT_COUNTRYNAME, CN = $TESTCERT_COMMONNAME, O = $TESTCERT_ORGANIZATIONNAME, OU = $TESTCERT_ORGANIZATIONALUNITNAME, L = $TESTCERT_LOCALITYNAME"
|
||||
RSABITS=2048 # Ubuntu-20.04 with OpenSSL-1.1.1f does not work with 1024 nor 1536
|
||||
DSABITS=2048
|
||||
cat >$TESTCERT_CONF <<EOF
|
||||
prompt=no
|
||||
|
||||
[ req ]
|
||||
default_bits = $RSABITS
|
||||
distinguished_name=Test
|
||||
|
||||
[ Test ]
|
||||
countryName=$TESTCERT_COUNTRYNAME
|
||||
commonName=$TESTCERT_COMMONNAME
|
||||
O=$TESTCERT_ORGANIZATIONNAME
|
||||
OU=$TESTCERT_ORGANIZATIONALUNITNAME
|
||||
L=$TESTCERT_LOCALITYNAME
|
||||
|
||||
EOF
|
||||
|
||||
cat >$TESTCERT6_CONF <<EOF
|
||||
prompt=no
|
||||
|
||||
[ req ]
|
||||
default_bits = $RESBITS
|
||||
distinguished_name=Test
|
||||
|
||||
[ Test ]
|
||||
countryName=$TESTCERT_COUNTRYNAME
|
||||
commonName=$TESTCERT_COMMONNAME6
|
||||
O=$TESTCERT_ORGANIZATIONNAME
|
||||
OU=$TESTCERT_ORGANIZATIONALUNITNAME
|
||||
L=$TESTCERT_LOCALITYNAME
|
||||
|
||||
EOF
|
||||
|
||||
cat >$TESTALT_CONF <<EOF
|
||||
# config for generation of self signed certificate with IP addresses in
|
||||
# SubjectAltNames
|
||||
prompt=no
|
||||
|
||||
[ req ]
|
||||
default_bits = $RSABITS
|
||||
distinguished_name = subject
|
||||
x509_extensions = x509_ext
|
||||
|
||||
[ subject ]
|
||||
countryName=$TESTCERT_COUNTRYNAME
|
||||
commonName=servername
|
||||
O=$TESTCERT_ORGANIZATIONNAME
|
||||
OU=$TESTCERT_ORGANIZATIONALUNITNAME
|
||||
L=$TESTCERT_LOCALITYNAME
|
||||
|
||||
[ x509_ext ]
|
||||
subjectAltName = @alternate_names
|
||||
|
||||
[ alternate_names ]
|
||||
DNS.1 = localhost
|
||||
DNS.2 = localhost4
|
||||
DNS.3 = localhost6
|
||||
IP.1 = 127.0.0.1
|
||||
EOF
|
||||
|
||||
if runsip6; then
|
||||
cat >>$TESTALT_CONF <<EOF
|
||||
IP.2 = ::1
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
||||
# clean up from previous runs
|
||||
rm -f testcli.{crt,key,pem}
|
||||
rm -f testsrv.{crt,key,pem}
|
||||
rm -f testcli6.{crt,key,pem}
|
||||
rm -f testsrv6.{crt,key,pem}
|
||||
rm -f testalt.{crt,key,pem}
|
||||
|
||||
OPENSSL_S_CLIENT_4=
|
||||
OPENSSL_S_CLIENT_DTLS=
|
||||
init_openssl_s_client () {
|
||||
if openssl s_client -help 2>&1 |grep -q ' -4 '; then
|
||||
OPENSSL_S_CLIENT_4="-4"
|
||||
else
|
||||
OPENSSL_S_CLIENT_4=" "
|
||||
fi
|
||||
if openssl s_client -help 2>&1 | grep -q ' -dtls1_2 '; then
|
||||
OPENSSL_S_CLIENT_DTLS="-dtls1_2"
|
||||
elif openssl s_client -help 2>&1 | grep -q ' -dtls1 '; then
|
||||
OPENSSL_S_CLIENT_DTLS="-dtls1"
|
||||
elif openssl s_client -help 2>&1 | grep -q ' -dtls '; then
|
||||
OPENSSL_S_CLIENT_DTLS="-dtls"
|
||||
else
|
||||
OPENSSL_S_CLIENT_DTLS=
|
||||
fi
|
||||
}
|
||||
|
||||
OPENSSL_S_SERVER_4=
|
||||
OPENSSL_S_SERVER_DTLS=
|
||||
OPENSSL_S_SERVER_NO_IGN_EOF=
|
||||
init_openssl_s_server () {
|
||||
if openssl s_server -help 2>&1 |grep -q ' -4 '; then
|
||||
OPENSSL_S_SERVER_4="-4"
|
||||
else
|
||||
OPENSSL_S_SERVER_4=" "
|
||||
fi
|
||||
if openssl s_server -help 2>&1 | grep -q ' -dtls1_2 '; then
|
||||
OPENSSL_S_SERVER_DTLS="-dtls1_2"
|
||||
elif openssl s_server -help 2>&1 | grep -q ' -dtls1 '; then
|
||||
OPENSSL_S_SERVER_DTLS="-dtls1"
|
||||
elif openssl s_server -help 2>&1 | grep -q ' -dtls '; then
|
||||
OPENSSL_S_SERVER_DTLS="-dtls"
|
||||
else
|
||||
OPENSSL_S_SERVER_DTLS=
|
||||
fi
|
||||
if openssl s_server -help 2>&1 | grep -q ' -no-ign_eof '; then
|
||||
OPENSSL_S_SERVER_NO_IGN_EOF="-no-ign_eof"
|
||||
else
|
||||
OPENSSL_S_SERVER_NO_IGN_EOF=" "
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Perform a couple of checks to make sure the test has a chance of a useful
|
||||
# result:
|
||||
# platform is supported, features compiled in, addresses and options
|
||||
|
@ -11016,7 +11047,7 @@ elif ! testfeats openssl >/dev/null; then
|
|||
elif ! type openssl >/dev/null 2>&1; then
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}openssl executable not available${NORMAL}\n" $N
|
||||
cant
|
||||
elif ! [[ $(echo $OPENSSL_VERSION |awk '{print($2);}') =~ [01].* ]]; then
|
||||
elif ! re_match "$(echo $OPENSSL_VERSION |awk '{print($2);}')" '[01].*'; then
|
||||
# openssl s_client apparently provides renegotiation only up to version 1.2
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}not with OpenSSL $OPENSSL_VERSION${NORMAL}\n" $N
|
||||
cant
|
||||
|
@ -11029,7 +11060,6 @@ tf="$td/test$N.stdout"
|
|||
te="$td/test$N.stderr"
|
||||
tdiff="$td/test$N.diff"
|
||||
da="test$N $(date) $RANDOM"
|
||||
init_openssl_s_client
|
||||
newport tcp4
|
||||
CMD0="$TRACE $SOCAT $opts OPENSSL-LISTEN:$PORT,pf=ip4,$REUSEADDR,cert=testsrv.crt,key=testsrv.key,verify=0 PIPE"
|
||||
#CMD1="openssl s_client -port $PORT -verify 0" # not with openssl 1.1.0g
|
||||
|
@ -11089,7 +11119,7 @@ elif ! testfeats openssl >/dev/null; then
|
|||
elif ! type openssl >/dev/null 2>&1; then
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}openssl executable not available${NORMAL}\n" $N
|
||||
cant
|
||||
elif ! [[ $(echo $OPENSSL_VERSION |awk '{print($2);}') =~ [01].* ]]; then
|
||||
elif ! re_match "$(echo $OPENSSL_VERSION |awk '{print($2);}')" '[01].*'; then
|
||||
# openssl s_client apparently provides renegotiation only up to version 1.2
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}not with OpenSSL $OPENSSL_VERSION${NORMAL}\n" $N
|
||||
cant
|
||||
|
@ -11704,7 +11734,8 @@ te="$td/test$N.stderr"
|
|||
tdiff="$td/test$N.diff"
|
||||
da="test$N $(date) $RANDOM"
|
||||
RLIMIT_NOFILE="$(ulimit -n)"
|
||||
if ! [[ "$RLIMIT_NOFILE" =~ ^[0-9][0-9]*$ ]]; then
|
||||
#if ! [[ "$RLIMIT_NOFILE" =~ ^[0-9][0-9]*$ ]]; then
|
||||
if ! re_match "$RLIMIT_NOFILE" '^[0-9][0-9]*$'; then
|
||||
$PRINTF "${YELLOW}cannot determine ulimit -n${NORMAL}"
|
||||
else
|
||||
if [ $RLIMIT_NOFILE -gt 1024 ]; then
|
||||
|
@ -12606,7 +12637,8 @@ tf="$td/test$N.stdout"
|
|||
te="$td/test$N.stderr"
|
||||
tdiff="$td/test$N.diff"
|
||||
da="test$N $(date) $RANDOM"
|
||||
if [[ "$method" =~ DTLS* ]]; then
|
||||
#if [[ "$method" =~ DTLS* ]]; then
|
||||
if re_match "$method" '^DTLS.*'; then
|
||||
newport udp4
|
||||
else
|
||||
newport tcp4
|
||||
|
@ -12620,7 +12652,8 @@ if [ "$method" = DTLS1 -a "$(echo -e "$OPENSSL_VERSION\n1.0.2" |sort |tail -n 1)
|
|||
else
|
||||
$CMD0 >/dev/null 2>"${te}0" &
|
||||
pid0=$!
|
||||
if [[ "$method" =~ DTLS* ]]; then
|
||||
#if [[ "$method" =~ DTLS* ]]; then
|
||||
if re_match "$method" '^DTLS.*'; then
|
||||
waitudp4port $PORT 1
|
||||
else
|
||||
waittcp4port $PORT 1
|
||||
|
@ -13522,6 +13555,9 @@ elif ! runsip4 >/dev/null; then
|
|||
elif ! type openssl >/dev/null 2>&1; then
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}openssl executable not found${NORMAL}\n" $N
|
||||
cant
|
||||
elif init_openssl_s_server; re_match "$method" '^DTLS.*' && [ -z "$OPENSSL_S_SERVER_DTLS" ]; then
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}DTLS not available in s_server${NORMAL}\n" $N
|
||||
cant
|
||||
else
|
||||
gentestcert testsrv
|
||||
tf="$td/test$N.stdout"
|
||||
|
@ -13576,7 +13612,10 @@ elif ! runsip4 >/dev/null; then
|
|||
elif ! type openssl >/dev/null 2>&1; then
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}openssl executable not found${NORMAL}\n" $N
|
||||
cant
|
||||
elif [[ $(openssl version |awk '{print($2);}') =~ 0.9.8[a-ce] ]]; then
|
||||
elif init_openssl_s_client; re_match "$method" '^DTLS.*' && [ -z "$OPENSSL_S_CLIENT_DTLS" ]; then
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}DTLS not available in s_client${NORMAL}\n" $N
|
||||
cant
|
||||
elif re_match "$(openssl version |awk '{print($2);}')" '^0\.9\.8[a-ce]'; then
|
||||
# also on NetBSD-4 with openssl-0.9.8e
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}openssl s_client might hang${NORMAL}\n" $N
|
||||
cant
|
||||
|
@ -14081,7 +14120,7 @@ kill $pid0 2>/dev/null; wait
|
|||
if [ $rc1 -ne 0 ] && [ "$UNAME" != Linux ]; then
|
||||
$PRINTF "${YELLOW}works only on Linux?${NORMAL}\n" $N
|
||||
cant
|
||||
elif [ $rc1 -ne 0 ] && [ "$UNAME" = Linux ] && ! [[ $UNAME_R =~ ^[6-9]\.* ]] && ! [[ $UNAME_R =~ ^5\.[6-]\.* ]] && ! [[ $UNAME_R =~ ^5\.[1-9][0-9].* ]]; then
|
||||
elif [ $rc1 -ne 0 ] && [ "$UNAME" = Linux ] && ! re_match "$UNAME_R" '^[6-9]\..*' && ! re_match "$UNAME_R" '^5\.[6-]\..*' && ! re_match "$UNAME_R" '^5\.[1-9][0-9].*'; then
|
||||
$PRINTF "${YELLOW}works only on Linux from 5.6${NORMAL}\n" $N
|
||||
cant
|
||||
elif grep -q "No such device" "${te}1"; then
|
||||
|
@ -14263,7 +14302,7 @@ elif ! a=$(testaddrs openssl-dtls-listen openssl-dtls-connect); then
|
|||
elif ! runsip4 >/dev/null; then
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}IPv4 not available${NORMAL}\n" $N
|
||||
cant
|
||||
elif [[ $(openssl version |awk '{print($2);}') =~ 0.9.8[a-ce] ]]; then
|
||||
elif re_match "$(openssl version |awk '{print($2);}')" '^0.9.8[a-ce]'; then
|
||||
# also on NetBSD-4 with openssl-0.9.8e
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}openssl s_client might hang${NORMAL}\n" $N
|
||||
cant
|
||||
|
@ -14332,7 +14371,7 @@ elif ! a=$(testaddrs openssl-dtls-listen openssl-dtls-connect); then
|
|||
elif ! runsip4 >/dev/null; then
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}IPv4 not available${NORMAL}\n" $N
|
||||
cant
|
||||
elif [[ $(openssl version |awk '{print($2);}') =~ 0.9.8[a-ce] ]]; then
|
||||
elif re_match "$(openssl version |awk '{print($2);}')" '^0.9.8[a-ce]'; then
|
||||
# also on NetBSD-4 with openssl-0.9.8e
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}openssl s_client might hang${NORMAL}\n" $N
|
||||
cant
|
||||
|
@ -14453,6 +14492,9 @@ elif ! testfeats openssl >/dev/null; then
|
|||
elif ! testfeats tcp ip4 >/dev/null || ! runsip4 >/dev/null; then
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}TCP/IPv4 not available${NORMAL}\n" $N
|
||||
cant
|
||||
elif ! runsip6 >/dev/null; then
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}Cannot generate cert with IPv6 address${NORMAL}\n" $N
|
||||
cant
|
||||
else
|
||||
gentestcert testsrv
|
||||
gentestaltcert testalt
|
||||
|
@ -14844,7 +14886,8 @@ rc1=$?
|
|||
LOWPORT=$(grep '[DE] bind(.*:' $te |sed 's/.*:\([0-9][0-9]*\)[}]*,.*/\1/' |head -n 1)
|
||||
#echo "LOWPORT=\"$LOWPORT\"" >&2
|
||||
#type socat >&2
|
||||
if [[ $LOWPORT =~ [0-9][0-9]* ]] && [ "$LOWPORT" -ge 640 -a "$LOWPORT" -le 1023 ]; then
|
||||
#if [[ $LOWPORT =~ [0-9][0-9]* ]] && [ "$LOWPORT" -ge 640 -a "$LOWPORT" -le 1023 ]; then
|
||||
if re_match "$LOWPORT" '^[0-9][0-9]*' ]] && [ "$LOWPORT" -ge 640 -a "$LOWPORT" -le 1023 ]; then
|
||||
$PRINTF "$OK\n"
|
||||
if [ "$VERBOSE" ]; then echo "$CMD0 &"; fi
|
||||
if [ "$DEBUG" ]; then cat "${te}0" >&2; fi
|
||||
|
@ -17542,7 +17585,8 @@ TEST="$NAME: Option unix-bind-tempname"
|
|||
# log "Transport endpoint is not connected" and the TCP service does not fail
|
||||
# with "Address already in use"), the test succeeded.
|
||||
if ! eval $NUMCOND; then :;
|
||||
elif [[ $CLI_ =~ ABSTRACT-* ]] && ! feat=$(testfeats abstract-unixsocket); then
|
||||
#elif [[ $CLI_ =~ ABSTRACT-* ]] && ! feat=$(testfeats abstract-unixsocket); then
|
||||
elif re_match "$CLI_" 'ABSTRACT-*' && ! feat=$(testfeats abstract-unixsocket); then
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}$feat not available${NORMAL}\n" $N
|
||||
cant
|
||||
elif ! o=$(testoptions unix-bind-tempname) >/dev/null; then
|
||||
|
@ -18376,7 +18420,7 @@ elif ! cond=$(checkconds \
|
|||
"tcp4" ); then
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}$cond${NORMAL}\n" $N
|
||||
cant
|
||||
elif [[ $BASH_VERSION =~ ^[1-3]\. ]]; then
|
||||
elif re_match "$BASH_VERSION" '^[1-3]\.'; then
|
||||
$PRINTF "test $F_n $TEST... ${YELLOW}requires bash 4 or higher${NORMAL}\n" $N
|
||||
cant
|
||||
else
|
||||
|
|
|
@ -788,7 +788,7 @@ _xioopen_unix_client(
|
|||
opts, pf, SOCK_SEQPACKET, protocol,
|
||||
needtemp, E_INFO)) == 0)
|
||||
break;
|
||||
if (errno != EPROTOTYPE && errno != EPROTONOSUPPORT/*AIX*/
|
||||
if (errno != EPROTOTYPE && errno != EPROTONOSUPPORT/*AIX*/ && errno != ESOCKTNOSUPPORT/*Debian3*/
|
||||
#if WITH_ABSTRACT_UNIXSOCKET
|
||||
&& !(abstract && errno == ECONNREFUSED)
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue