From 2b794f03c1fa42ff9677a1e26c49fe8e70466825 Mon Sep 17 00:00:00 2001 From: David Garske Date: Thu, 24 Feb 2022 11:48:40 -0800 Subject: [PATCH] Fixes for multi-test pass. Breaks from PR #4807. --- configure.ac | 2 +- src/ssl.c | 8 ++++++-- wolfssl/internal.h | 5 ++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index bdb72994b..1c076891a 100644 --- a/configure.ac +++ b/configure.ac @@ -6843,7 +6843,7 @@ AS_CASE(["$CFLAGS $CPPFLAGS"],[*'WOLFSSL_TRUST_PEER_CERT'*],[ENABLED_TRUSTED_PEE AS_CASE(["$CFLAGS $CPPFLAGS $AM_CFLAGS"],[*'OPENSSL_COMPATIBLE_DEFAULTS'*], - [ENABLED_OPENSSL_COMPATIBLE_DEFAULTS=yes]) + [ENABLED_OPENSSL_COMPATIBLE_DEFAULTS=yes]) if test "x$ENABLED_OPENSSL_COMPATIBLE_DEFAULTS" = "xyes" then AM_CFLAGS="$AM_CFLAGS -DWOLFSSL_TRUST_PEER_CERT" diff --git a/src/ssl.c b/src/ssl.c index bf45f2f5d..9e3a83039 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -5330,11 +5330,15 @@ int AddCA(WOLFSSL_CERT_MANAGER* cm, DerBuffer** pDer, int type, int verify) #error CLIENT_SESSION_ROWS too big #endif - typedef struct ClientSession { + struct ClientSession { word16 serverRow; /* SessionCache Row id */ word16 serverIdx; /* SessionCache Idx (column) */ word32 sessionIDHash; - } ClientSession; + }; + #ifndef WOLFSSL_CLIENT_SESSION_DEFINED + typedef struct ClientSession ClientSession; + #define WOLFSSL_CLIENT_SESSION_DEFINED + #endif typedef struct ClientRow { int nextIdx; /* where to place next one */ diff --git a/wolfssl/internal.h b/wolfssl/internal.h index fa0b911f6..adf49dad3 100644 --- a/wolfssl/internal.h +++ b/wolfssl/internal.h @@ -1691,7 +1691,10 @@ typedef WOLFSSL_BUFFER_INFO buffer; typedef struct Suites Suites; /* Declare opaque struct for API to use */ -typedef struct ClientSession ClientSession; +#ifndef WOLFSSL_CLIENT_SESSION_DEFINED + typedef struct ClientSession ClientSession; + #define WOLFSSL_CLIENT_SESSION_DEFINED +#endif /* defaults to client */ WOLFSSL_LOCAL void InitSSL_Method(WOLFSSL_METHOD* method, ProtocolVersion pv);