Fix to detect if NO_CERTS / --disable-asn is used in scripts/tls13.test.

This commit is contained in:
David Garske
2020-06-04 16:08:08 -07:00
parent 66fdc2c536
commit 1d01b87741
2 changed files with 24 additions and 16 deletions

View File

@ -995,7 +995,9 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
int noPskDheKe = 0; int noPskDheKe = 0;
#endif #endif
int updateKeysIVs = 0; int updateKeysIVs = 0;
#ifndef NO_CERTS
int mutualAuth = 0; int mutualAuth = 0;
#endif
int postHandAuth = 0; int postHandAuth = 0;
#ifdef WOLFSSL_EARLY_DATA #ifdef WOLFSSL_EARLY_DATA
int earlyData = 0; int earlyData = 0;
@ -1081,7 +1083,9 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
(void)crlFlags; (void)crlFlags;
(void)readySignal; (void)readySignal;
(void)updateKeysIVs; (void)updateKeysIVs;
#ifndef NO_CERTS
(void)mutualAuth; (void)mutualAuth;
#endif
(void)postHandAuth; (void)postHandAuth;
(void)mcastID; (void)mcastID;
(void)loadCertKeyIntoSSLObj; (void)loadCertKeyIntoSSLObj;
@ -1413,9 +1417,11 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
#endif #endif
break; break;
#ifndef NO_CERTS
case 'F' : case 'F' :
mutualAuth = 1; mutualAuth = 1;
break; break;
#endif
case 'Q' : case 'Q' :
#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_POST_HANDSHAKE_AUTH) #if defined(WOLFSSL_TLS13) && defined(WOLFSSL_POST_HANDSHAKE_AUTH)

View File

@ -111,22 +111,24 @@ if [ $RESULT -eq 0 ]; then
fi fi
echo "" echo ""
# TLS 1.3 mutual auth required but client doesn't send certificates. cat ./wolfssl/options.h | grep -- 'NO_CERTS'
echo -e "\n\nTLS v1.3 mutual auth fail" if [ $? -ne 0 ]; then
port=0 # TLS 1.3 mutual auth required but client doesn't send certificates.
./examples/server/server -v 4 -F -R $ready_file -p $port & echo -e "\n\nTLS v1.3 mutual auth fail"
server_pid=$! port=0
create_port ./examples/server/server -v 4 -F -R $ready_file -p $port &
./examples/client/client -v 4 -x -p $port server_pid=$!
RESULT=$? create_port
remove_ready_file ./examples/client/client -v 4 -x -p $port
if [ $RESULT -eq 0 ]; then RESULT=$?
echo -e "\n\nIssue with requiring mutual authentication" remove_ready_file
do_cleanup if [ $RESULT -eq 0 ]; then
exit 1 echo -e "\n\nIssue with requiring mutual authentication"
do_cleanup
exit 1
fi
echo ""
fi fi
echo ""
./examples/client/client -v 3 2>&1 | grep -- 'Bad SSL version' ./examples/client/client -v 3 2>&1 | grep -- 'Bad SSL version'
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then