mirror of https://github.com/getdnsapi/getdns.git
Don't test hostname auth without support in libssl
This commit is contained in:
parent
6b04ed8551
commit
d1aebd3c24
|
@ -6,7 +6,7 @@ Maintainer: Hoda Rohani
|
||||||
Category:
|
Category:
|
||||||
Component:
|
Component:
|
||||||
CmdDepends:
|
CmdDepends:
|
||||||
Depends: 110-link.tpkg
|
Depends: 210-stub-only-link.tpkg
|
||||||
Help:
|
Help:
|
||||||
Pre:
|
Pre:
|
||||||
Post:
|
Post:
|
||||||
|
|
|
@ -4,6 +4,12 @@
|
||||||
# use .tpkg.var.test for in test variable passing
|
# use .tpkg.var.test for in test variable passing
|
||||||
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
[ -f .tpkg.var.test ] && source .tpkg.var.test
|
||||||
|
|
||||||
|
if grep -q '^#define HAVE_SSL_HN_AUTH 1' "${BUILDDIR}/build-stub-only/src/config.h"
|
||||||
|
then
|
||||||
|
HAVE_SSL_HN_AUTH=1
|
||||||
|
else
|
||||||
|
HAVE_SSL_HN_AUTH=0
|
||||||
|
fi
|
||||||
SERVER_IP="8.8.8.8"
|
SERVER_IP="8.8.8.8"
|
||||||
SERVER_IPv6="2001:4860:4860::8888"
|
SERVER_IPv6="2001:4860:4860::8888"
|
||||||
|
|
||||||
|
@ -126,6 +132,8 @@ for (( ii = 0; ii < 1; ii++)); do
|
||||||
SERVER_IP_TSIG_WRONG_NAME=`echo ${SERVER_IP_TSIG}${TSIG_ALG}":"${TSIG_NAME::${#TSIG_NAME}-1}":"${TSIG_SECRET}`
|
SERVER_IP_TSIG_WRONG_NAME=`echo ${SERVER_IP_TSIG}${TSIG_ALG}":"${TSIG_NAME::${#TSIG_NAME}-1}":"${TSIG_SECRET}`
|
||||||
SERVER_IP_TSIG_WRONG_SECRET=`echo ${SERVER_IP_TSIG}${TSIG_ALG}":"${TSIG_NAME}":"${TSIG_SECRET::${#TSIG_SECRET}-1}`
|
SERVER_IP_TSIG_WRONG_SECRET=`echo ${SERVER_IP_TSIG}${TSIG_ALG}":"${TSIG_NAME}":"${TSIG_SECRET::${#TSIG_SECRET}-1}`
|
||||||
|
|
||||||
|
if [[ $HAVE_SSL_HN_AUTH = 1 ]]
|
||||||
|
then
|
||||||
NUM_GOOD_QUERIES=9
|
NUM_GOOD_QUERIES=9
|
||||||
GOOD_QUERIES=(
|
GOOD_QUERIES=(
|
||||||
"-s -A getdnsapi.net -l U @${SERVER_IP} +edns_cookies" "U" "-"
|
"-s -A getdnsapi.net -l U @${SERVER_IP} +edns_cookies" "U" "-"
|
||||||
|
@ -137,6 +145,17 @@ for (( ii = 0; ii < 1; ii++)); do
|
||||||
"-s -A getdnsapi.net -l L -m @${TLS_SERVER_IP_NO_NAME} -K pin-sha256=\"${TLS_SERVER_KEY}\"" "L" "S"
|
"-s -A getdnsapi.net -l L -m @${TLS_SERVER_IP_NO_NAME} -K pin-sha256=\"${TLS_SERVER_KEY}\"" "L" "S"
|
||||||
"-s -A getdnsapi.net -l L -m @${TLS_SERVER_IP} -K pin-sha256=\"${TLS_SERVER_KEY}\"" "L" "S"
|
"-s -A getdnsapi.net -l L -m @${TLS_SERVER_IP} -K pin-sha256=\"${TLS_SERVER_KEY}\"" "L" "S"
|
||||||
"-s -G DNSKEY getdnsapi.net -l U @${SERVER_IP} -b 512 -D" "U" "-")
|
"-s -G DNSKEY getdnsapi.net -l U @${SERVER_IP} -b 512 -D" "U" "-")
|
||||||
|
else
|
||||||
|
NUM_GOOD_QUERIES=7
|
||||||
|
GOOD_QUERIES=(
|
||||||
|
"-s -A getdnsapi.net -l U @${SERVER_IP} +edns_cookies" "U" "-"
|
||||||
|
"-s -A getdnsapi.net -l T @${SERVER_IP}" "T" "-"
|
||||||
|
"-s -A getdnsapi.net -l U @${SERVER_IP_TSIG}${TSIG_ALG}:${TSIG_NAME}:${TSIG_SECRET}" "U" "-"
|
||||||
|
"-s -A getdnsapi.net -l U @${SERVER_IP_TSIG}${TSIG_NAME}:${TSIG_SECRET}" "U" "-"
|
||||||
|
"-s -A getdnsapi.net -l L @${TLS_SERVER_IP_NO_NAME}" "L" "N"
|
||||||
|
"-s -A getdnsapi.net -l L -m @${TLS_SERVER_IP_NO_NAME} -K pin-sha256=\"${TLS_SERVER_KEY}\"" "L" "S"
|
||||||
|
"-s -G DNSKEY getdnsapi.net -l U @${SERVER_IP} -b 512 -D" "U" "-")
|
||||||
|
fi
|
||||||
#"-s -A getdnsapi.net -l L -m @${TLS_SERVER_SS_IP_NO_NAME} -K pin-sha256=\"${TLS_SERVER_SS_KEY}\"" "L" "S"
|
#"-s -A getdnsapi.net -l L -m @${TLS_SERVER_SS_IP_NO_NAME} -K pin-sha256=\"${TLS_SERVER_SS_KEY}\"" "L" "S"
|
||||||
|
|
||||||
NUM_GOOD_FB_QUERIES=6
|
NUM_GOOD_FB_QUERIES=6
|
||||||
|
@ -173,21 +192,21 @@ for (( ii = 0; ii < 1; ii++)); do
|
||||||
fi
|
fi
|
||||||
echo "*Success cases:"
|
echo "*Success cases:"
|
||||||
for (( j = 0; j < $NUM_GOOD_QUERIES; j+=1 )); do
|
for (( j = 0; j < $NUM_GOOD_QUERIES; j+=1 )); do
|
||||||
check_good "`"${GETDNS_QUERY}" -V +return_call_reporting $SYNC_MODE ${GOOD_QUERIES[$j*$NUM_ARGS]} `" ${GOOD_QUERIES[$((j*NUM_ARGS))+1]} ${GOOD_QUERIES[$((j*NUM_ARGS))+2]}
|
check_good "`"${GETDNS_STUB_QUERY}" -V +return_call_reporting $SYNC_MODE ${GOOD_QUERIES[$j*$NUM_ARGS]} `" ${GOOD_QUERIES[$((j*NUM_ARGS))+1]} ${GOOD_QUERIES[$((j*NUM_ARGS))+2]}
|
||||||
echo "getdns_query $SYNC_MODE ${GOOD_QUERIES[$j*$NUM_ARGS]}"
|
echo "getdns_query $SYNC_MODE ${GOOD_QUERIES[$j*$NUM_ARGS]}"
|
||||||
(( COUNT++ ))
|
(( COUNT++ ))
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "*Success fallback cases:"
|
echo "*Success fallback cases:"
|
||||||
for (( j = 0; j < $NUM_GOOD_FB_QUERIES; j+=1 )); do
|
for (( j = 0; j < $NUM_GOOD_FB_QUERIES; j+=1 )); do
|
||||||
check_good "`"${GETDNS_QUERY}" -V +return_call_reporting $SYNC_MODE ${GOOD_FALLBACK_QUERIES[$j*$NUM_ARGS]} 2>/dev/null`" ${GOOD_FALLBACK_QUERIES[$((j*NUM_ARGS))+1]} ${GOOD_FALLBACK_QUERIES[$((j*NUM_ARGS))+2]}
|
check_good "`"${GETDNS_STUB_QUERY}" -V +return_call_reporting $SYNC_MODE ${GOOD_FALLBACK_QUERIES[$j*$NUM_ARGS]} 2>/dev/null`" ${GOOD_FALLBACK_QUERIES[$((j*NUM_ARGS))+1]} ${GOOD_FALLBACK_QUERIES[$((j*NUM_ARGS))+2]}
|
||||||
echo "getdns_query $SYNC_MODE ${GOOD_FALLBACK_QUERIES[$j*$NUM_ARGS]} TESTS: ${GOOD_FALLBACK_QUERIES[$((j*NUM_ARGS))+1]} ${GOOD_FALLBACK_QUERIES[$((j*NUM_ARGS))+2]}"
|
echo "getdns_query $SYNC_MODE ${GOOD_FALLBACK_QUERIES[$j*$NUM_ARGS]} TESTS: ${GOOD_FALLBACK_QUERIES[$((j*NUM_ARGS))+1]} ${GOOD_FALLBACK_QUERIES[$((j*NUM_ARGS))+2]}"
|
||||||
(( COUNT++ ))
|
(( COUNT++ ))
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "*Transport not available cases:"
|
echo "*Transport not available cases:"
|
||||||
for (( j = 0; j < ${#NOT_AVAILABLE_QUERIES[@]}; j+=1 )); do
|
for (( j = 0; j < ${#NOT_AVAILABLE_QUERIES[@]}; j+=1 )); do
|
||||||
check_bad "`"${GETDNS_QUERY}" -V $SYNC_MODE ${NOT_AVAILABLE_QUERIES[${j}]} 2>&1`"
|
check_bad "`"${GETDNS_STUB_QUERY}" -V $SYNC_MODE ${NOT_AVAILABLE_QUERIES[${j}]} 2>&1`"
|
||||||
echo "getdns_query $SYNC_MODE ${NOT_AVAILABLE_QUERIES[${j}]}"
|
echo "getdns_query $SYNC_MODE ${NOT_AVAILABLE_QUERIES[${j}]}"
|
||||||
(( COUNT++ ))
|
(( COUNT++ ))
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue