forked from wolfSSL/wolfssl
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());
|
InitSSL_Method(method, MakeTLSv1_1());
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_OLD_TLS
|
#if !defined(NO_OLD_TLS) || defined(WOLFSSL_TLS13)
|
||||||
method->downgrade = 1;
|
method->downgrade = 1;
|
||||||
#endif
|
#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
|
#error Must have SHA256, SHA384 or SHA512 enabled for TLS 1.2
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_OLD_TLS
|
#if !defined(NO_OLD_TLS) || defined(WOLFSSL_TLS13)
|
||||||
method->downgrade = 1;
|
method->downgrade = 1;
|
||||||
#endif
|
#endif
|
||||||
method->side = WOLFSSL_SERVER_END;
|
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 (TLSX_Find(ssl->extensions, TLSX_SUPPORTED_VERSIONS) == NULL) {
|
||||||
if (!ssl->options.downgrade) {
|
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;
|
return VERSION_ERROR;
|
||||||
}
|
}
|
||||||
ssl->version.minor = pv.minor;
|
ssl->version.minor = pv.minor;
|
||||||
|
Reference in New Issue
Block a user