Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions scripts/google.test
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,30 @@ fi
RESULT=$?
[ $RESULT -ne 0 ] && exit 0

# Run the client against the server. The server may answer ping but still drop
# or throttle TCP connections from this host (Google does this to busy CI
# egress IPs). Failing to open the TCP connection exercises no wolfSSL code,
# so treat it like the unreachable-server case above and skip instead of
# failing.
run_client() {
OUTPUT="$(./examples/client/client "$@" 2>&1)"
RESULT=$?
echo "$OUTPUT"
if [ $RESULT -ne 0 ] && echo "$OUTPUT" | grep -q 'tcp connect failed'; then
echo -e "\n\ntcp connect to $server failed, skipping"
exit 77
fi
return $RESULT
}

# client test against the server
./examples/client/client -X -C -h $server -p 443 -g -d
run_client -X -C -h $server -p 443 -g -d
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "\n\nClient connection failed" && exit 1

if ./examples/client/client -V | grep -q 4; then
# client test against the server using TLS v1.3
./examples/client/client -v 4 -X -C -h $server -p 443 -g -d
run_client -v 4 -X -C -h $server -p 443 -g -d
RESULT=$?
[ $RESULT -ne 0 ] && echo -e "\n\nTLSv1.3 Client connection failed" && exit 1
fi
Expand Down
12 changes: 12 additions & 0 deletions src/internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -3088,6 +3088,10 @@ void SSL_CtxResourceFree(WOLFSSL_CTX* ctx)
#ifdef HAVE_TLS_EXTENSIONS
#if !defined(NO_TLS)
TLSX_FreeAll(ctx->extensions, ctx->heap);
#ifdef OPENSSL_EXTRA
TLSX_CustomExt_FreeAll(ctx->customExt, ctx->heap);
ctx->customExt = NULL;
#endif
#endif /* !NO_TLS */
#ifndef NO_WOLFSSL_SERVER
#if defined(HAVE_CERTIFICATE_STATUS_REQUEST) \
Expand Down Expand Up @@ -9050,6 +9054,14 @@ static void FreeSSL_Extensions(WOLFSSL* ssl)
#if !defined(NO_TLS)
TLSX_FreeAll(ssl->extensions, ssl->heap);
ssl->extensions = NULL;
#ifdef OPENSSL_EXTRA
XFREE(ssl->customExtData, ssl->heap, DYNAMIC_TYPE_TMP_BUFFER);
ssl->customExtData = NULL;
ssl->customExtSz = 0;
XFREE(ssl->customExtSent, ssl->heap, DYNAMIC_TYPE_TLSX);
ssl->customExtSent = NULL;
ssl->customExtSentCnt = 0;
#endif
#if defined(HAVE_SECURE_RENEGOTIATION) \
|| defined(HAVE_SERVER_RENEGOTIATION_INFO)
ssl->secure_renegotiation = NULL;
Expand Down
Loading
Loading