mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
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 */
|
/* restore message type */
|
||||||
*extMsgType = args->extMsgType;
|
*extMsgType = args->extMsgType;
|
||||||
|
|
||||||
if (args->totalExtSz > 0) {
|
/* Parse and handle extensions, unless lower than TLS1.3. In that case,
|
||||||
/* Parse and handle extensions. */
|
* extensions will be parsed in DoServerHello. */
|
||||||
|
if (args->totalExtSz > 0 && IsAtLeastTLSv1_3(ssl->version)) {
|
||||||
ret = TLSX_Parse(ssl, input + args->idx, args->totalExtSz,
|
ret = TLSX_Parse(ssl, input + args->idx, args->totalExtSz,
|
||||||
*extMsgType, NULL);
|
*extMsgType, NULL);
|
||||||
if (ret != 0) {
|
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_hello_retry_request = 1;
|
||||||
ssl->msgsReceived.got_server_hello = 0;
|
ssl->msgsReceived.got_server_hello = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (args->totalExtSz > 0) {
|
||||||
args->idx += args->totalExtSz;
|
args->idx += args->totalExtSz;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user