From 7dfa96a7290fa41e7d55ba15277150d896768d8f Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Fri, 30 Dec 2022 16:26:39 +0100 Subject: [PATCH] Define `usePSK` when ext is present --- src/dtls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dtls.c b/src/dtls.c index b9c683a3c..ba946ce8f 100644 --- a/src/dtls.c +++ b/src/dtls.c @@ -557,10 +557,10 @@ static int SendStatelessReply(const WOLFSSL* ssl, WolfSSL_CH* ch, byte isTls13, ERROR_OUT(MISSING_HANDSHAKE_DATA, dtls13_cleanup); doKE = 1; } - else { - if ((modes & (1 << PSK_KE)) == 0) + else if ((modes & (1 << PSK_KE)) == 0) { ERROR_OUT(PSK_KEY_ERROR, dtls13_cleanup); } + usePSK = 1; } #endif