mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +02:00
Fix downgrading when WOLFSSL_TLS13 is defined (despite NO_OLD_TLS being defined)
This commit is contained in:
@@ -9008,7 +9008,7 @@ int TLSX_Parse(WOLFSSL* ssl, byte* input, word16 length, byte msgType,
|
||||
InitSSL_Method(method, MakeTLSv1_1());
|
||||
#endif
|
||||
#endif
|
||||
#ifndef NO_OLD_TLS
|
||||
#if !defined(NO_OLD_TLS) || defined(WOLFSSL_TLS13)
|
||||
method->downgrade = 1;
|
||||
#endif
|
||||
}
|
||||
@@ -9132,7 +9132,7 @@ int TLSX_Parse(WOLFSSL* ssl, byte* input, word16 length, byte msgType,
|
||||
#error Must have SHA256, SHA384 or SHA512 enabled for TLS 1.2
|
||||
#endif
|
||||
#endif
|
||||
#ifndef NO_OLD_TLS
|
||||
#if !defined(NO_OLD_TLS) || defined(WOLFSSL_TLS13)
|
||||
method->downgrade = 1;
|
||||
#endif
|
||||
method->side = WOLFSSL_SERVER_END;
|
||||
|
@@ -3622,7 +3622,8 @@ int DoTls13ClientHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
|
||||
|
||||
if (TLSX_Find(ssl->extensions, TLSX_SUPPORTED_VERSIONS) == NULL) {
|
||||
if (!ssl->options.downgrade) {
|
||||
WOLFSSL_MSG("Client trying to connect with lesser version");
|
||||
WOLFSSL_MSG("Client trying to connect with lesser version than "
|
||||
"TLS v1.3");
|
||||
return VERSION_ERROR;
|
||||
}
|
||||
ssl->version.minor = pv.minor;
|
||||
|
Reference in New Issue
Block a user