fix build failure when enabling MYSQL_COMPATIBLE

This commit is contained in:
Hideki Miyazaki
2019-07-11 09:00:03 +09:00
parent d88458a447
commit 3756a2c8c7
2 changed files with 8 additions and 0 deletions

View File

@ -5789,7 +5789,11 @@ static int TLSX_SupportedVersions_Parse(WOLFSSL* ssl, byte* input,
set = 1;
}
if (!set) {
#ifdef WOLFSSL_MYSQL_COMPATIBLE
SendAlert(ssl, alert_fatal, wc_protocol_version);
#else
SendAlert(ssl, alert_fatal, protocol_version);
#endif
return VERSION_ERROR;
}
}

View File

@ -3952,7 +3952,11 @@ int DoTls13ClientHello(WOLFSSL* ssl, const byte* input, word32* inOutIdx,
i += OPAQUE16_LEN;
if (pv.major < SSLv3_MAJOR) {
WOLFSSL_MSG("Legacy version field contains unsupported value");
#ifdef WOLFSSL_MYSQL_COMPATIBLE
SendAlert(ssl, alert_fatal, wc_protocol_version);
#else
SendAlert(ssl, alert_fatal, protocol_version);
#endif
return INVALID_PARAMETER;
}
/* Legacy protocol version cannot negotiate TLS 1.3 or higher. */