Skip to content

Commit ce1e44d

Browse files
committed
TLS 1.3: compiling with WOLFSSL_PSK_ONE_ID fix
Move use of 'suites' into non-WOLFSSL_PSK_ONE_ID path as variable declared and used only in that case.
1 parent 1abaa94 commit ce1e44d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/tls13.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6129,12 +6129,12 @@ static int CheckPreSharedKeys(WOLFSSL* ssl, const byte* input, word32 helloSz,
61296129

61306130
/* Refine list for PSK processing. */
61316131
RefineSuites(ssl, clSuites);
6132-
/* set after refineSuites, to avoid taking a stale ptr to ctx->Suites */
6133-
suites = WOLFSSL_SUITES(ssl);
61346132
#ifndef WOLFSSL_PSK_ONE_ID
61356133
if (usingPSK == NULL)
61366134
return BAD_FUNC_ARG;
61376135

6136+
/* set after refineSuites, to avoid taking a stale ptr to ctx->Suites */
6137+
suites = WOLFSSL_SUITES(ssl);
61386138
/* Server list has only common suites from refining in server or client
61396139
* order. */
61406140
for (i = 0; !(*usingPSK) && i < suites->suiteSz; i += 2) {

0 commit comments

Comments
 (0)