Merge pull request #6104 from douzzer/20230216-readability-redundant-preprocessor

20230216-readability-redundant-preprocessor
This commit is contained in:
David Garske 2023-02-17 10:31:27 -08:00 committed by GitHub
commit 4edb7e26b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {