From 21645460cd6e21387ba6aebba89a9fe5ca3a65bd Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Thu, 16 Feb 2023 23:37:43 -0600 Subject: [PATCH] src/tls13.c: fix a readability-redundant-preprocessor in CheckPreSharedKeys(). --- src/tls13.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/tls13.c b/src/tls13.c index c5c59a245..fb1e97bc4 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -5562,7 +5562,7 @@ static int FindPsk(WOLFSSL* ssl, PreSharedKey* psk, const byte* suite, int* err) *err = ret; return found; } -#endif +#endif /* !NO_PSK */ /* Handle any Pre-Shared Key (PSK) extension. * Find a PSK that supports the cipher suite passed in. @@ -5710,7 +5710,7 @@ static int DoPreSharedKeys(WOLFSSL* ssl, const byte* input, word32 inputSz, return ret; } else - #endif + #endif /* HAVE_SESSION_TICKET */ #ifndef NO_PSK if (FindPsk(ssl, current, suite, &ret)) { if (ret != 0) @@ -5918,7 +5918,6 @@ static int CheckPreSharedKeys(WOLFSSL* ssl, const byte* input, word32 helloSz, } modes = ext->val; -#if defined(HAVE_SESSION_TICKET) || !defined(NO_PSK) #ifdef HAVE_SUPPORTED_CURVES ext = TLSX_Find(ssl->extensions, TLSX_KEY_SHARE); /* Use (EC)DHE for forward-security if possible. */ @@ -5945,7 +5944,6 @@ static int CheckPreSharedKeys(WOLFSSL* ssl, const byte* input, word32 helloSz, *usingPSK = 1; } -#endif } #ifdef WOLFSSL_PSK_ID_PROTECTION else {