From 87182992b86d706dee6ee3602407673efd0076a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Frauenschl=C3=A4ger?= Date: Wed, 7 Jan 2026 16:58:52 +0100 Subject: [PATCH] Fix for PSK compile option The derivation of the ResumptionSecret is only necessary in case SessionTickets are enabled. --- src/tls13.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tls13.c b/src/tls13.c index 9f25f47a0..e074a70f6 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -11384,7 +11384,7 @@ static int SendTls13Finished(WOLFSSL* ssl) if ((ret = SetKeysSide(ssl, ENCRYPT_SIDE_ONLY)) != 0) return ret; -#if defined(HAVE_SESSION_TICKET) || !defined(NO_PSK) +#if defined(HAVE_SESSION_TICKET) ret = DeriveResumptionSecret(ssl, ssl->session->masterSecret); if (ret != 0) return ret; @@ -13086,7 +13086,7 @@ int DoTls13HandShakeMsgType(WOLFSSL* ssl, byte* input, word32* inOutIdx, #endif /* NO_WOLFSSL_CLIENT */ #ifndef NO_WOLFSSL_SERVER - #if defined(HAVE_SESSION_TICKET) || !defined(NO_PSK) + #if defined(HAVE_SESSION_TICKET) if (ssl->options.side == WOLFSSL_SERVER_END && type == finished) { ret = DeriveResumptionSecret(ssl, ssl->session->masterSecret); if (ret != 0)