Skip to content

Commit 5a1ac27

Browse files
committed
Reviewer feedback
1 parent 3de358e commit 5a1ac27

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/tls13.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5023,7 +5023,6 @@ typedef struct Dsh13Args {
50235023
int DoTls13ServerHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
50245024
word32 helloSz, byte* extMsgType)
50255025
{
5026-
word32 inOutIdxCopy;
50275026
int ret;
50285027
byte suite[2];
50295028
byte tls12minor;
@@ -5356,8 +5355,9 @@ int DoTls13ServerHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
53565355
DtlsCIDOnExtensionsParsed(ssl);
53575356
#endif /* WOLFSSL_DTLS_CID */
53585357

5359-
inOutIdxCopy = *inOutIdx;
5360-
*inOutIdx = args->idx;
5358+
if (IsAtLeastTLSv1_3(ssl->version)) {
5359+
*inOutIdx = args->idx;
5360+
}
53615361

53625362
ssl->options.serverState = SERVER_HELLO_COMPLETE;
53635363

@@ -5401,9 +5401,8 @@ int DoTls13ServerHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
54015401
else
54025402
ssl->chVersion.minor = TLSv1_2_MINOR;
54035403
/* Complete TLS v1.2 processing of ServerHello. */
5404-
ret = DoServerHello(ssl, input, &inOutIdxCopy, helloSz);
5404+
ret = DoServerHello(ssl, input, inOutIdx, helloSz);
54055405
#else
5406-
(void)inOutIdxCopy;
54075406
WOLFSSL_MSG("Client using higher version, fatal error");
54085407
WOLFSSL_ERROR_VERBOSE(VERSION_ERROR);
54095408
ret = VERSION_ERROR;

0 commit comments

Comments
 (0)