forked from wolfSSL/wolfssl
Ensure extensions are only parsed once
This commit is contained in:
@ -5324,8 +5324,9 @@ int DoTls13ServerHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
||||
/* restore message type */
|
||||
*extMsgType = args->extMsgType;
|
||||
|
||||
if (args->totalExtSz > 0) {
|
||||
/* Parse and handle extensions. */
|
||||
/* Parse and handle extensions, unless lower than TLS1.3. In that case,
|
||||
* extensions will be parsed in DoServerHello. */
|
||||
if (args->totalExtSz > 0 && IsAtLeastTLSv1_3(ssl->version)) {
|
||||
ret = TLSX_Parse(ssl, input + args->idx, args->totalExtSz,
|
||||
*extMsgType, NULL);
|
||||
if (ret != 0) {
|
||||
@ -5344,7 +5345,9 @@ int DoTls13ServerHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
||||
ssl->msgsReceived.got_hello_retry_request = 1;
|
||||
ssl->msgsReceived.got_server_hello = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (args->totalExtSz > 0) {
|
||||
args->idx += args->totalExtSz;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user