From 9452c226531a08c0572d1756dcee94d41336a4b1 Mon Sep 17 00:00:00 2001 From: Sean Parkinson Date: Fri, 23 Jul 2021 11:55:08 +1000 Subject: [PATCH] Small configurations: get compiling ./configure --enable-psk -disable-rsa --disable-dh -disable-ecc --disable-asn C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --disable-coding --disable-filesystem CFLAGS=-DNO_WOLFSSL_SERVER ./configure --enable-psk -disable-rsa --disable-dh -disable-ecc --disable-asn C_EXTRA_FLAGS=-DWOLFSSL_STATIC_PSK --disable-coding --disable-filesystem CFLAGS=-DNO_WOLFSSL_CLIENT --- src/internal.c | 6 ++++++ src/tls13.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/internal.c b/src/internal.c index 913fd7f59..44cca779c 100644 --- a/src/internal.c +++ b/src/internal.c @@ -8536,6 +8536,9 @@ static void AddFragHeaders(byte* output, word32 fragSz, word32 fragOffset, } #endif /* NO_CERTS */ +#if !defined(NO_WOLFSSL_SERVER) || \ + (!defined(NO_WOLFSSL_CLIENT) && !defined(NO_CERTS) && \ + !defined(WOLFSSL_NO_CLIENT_AUTH)) /** * Send the handshake message. This function handles fragmenting the message * so that it will fit into the desired MTU or the max fragment size. @@ -8691,6 +8694,9 @@ static int SendHandshakeMsg(WOLFSSL* ssl, byte* input, word32 inputSz, ssl->fragOffset = 0; return ret; } +#endif /* !NO_WOLFSSL_SERVER || (!NO_WOLFSSL_CLIENT && !NO_CERTS && + * !WOLFSSL_NO_CLIENT_AUTH) */ + #endif /* !WOLFSSL_NO_TLS12 */ diff --git a/src/tls13.c b/src/tls13.c index 1090cd3d6..524b751b4 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -2549,8 +2549,9 @@ exit_buildmsg: return ret; } -#if defined(HAVE_SESSION_TICKET) || !defined(NO_PSK) || \ - !defined(NO_WOLFSSL_CLIENT) +#if !defined(NO_WOLFSSL_CLIENT) || (!defined(NO_WOLFSSL_SERVER) && \ + (defined(HAVE_SESSION_TICKET) || !defined(NO_PSK)) && \ + defined(WOLFSSL_PSK_ONE_ID)) \ /* Find the cipher suite in the suites set in the SSL. * * ssl SSL/TLS object.