From 70901f0626462524c05fb09b04606b34552addfc Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Mon, 18 Oct 2021 19:21:34 +0200 Subject: [PATCH] #257 --- src/tls13.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tls13.c b/src/tls13.c index 2825f2819..9c98bb1c6 100644 --- a/src/tls13.c +++ b/src/tls13.c @@ -4246,6 +4246,9 @@ static int CheckPreSharedKeys(WOLFSSL* ssl, const byte* input, word32 helloSz, RefineSuites(ssl, clSuites); #ifndef WOLFSSL_PSK_ONE_ID + if (!usingPSK) + return BAD_FUNC_ARG; + if (!ssl->options.useClientOrder) { /* Server order - server list has only common suites from refining. */ for (i = 0; !*usingPSK && i < ssl->suites->suiteSz; i += 2) {