Merge pull request #2341 from miyazakh/fix_ricoh_buildfailure

fix build failure when enabling MYSQL_COMPATIBLE
This commit is contained in:
Chris Conlon
2019-07-15 10:10:34 -06:00
committed by GitHub
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; set = 1;
} }
if (!set) { if (!set) {
#ifdef WOLFSSL_MYSQL_COMPATIBLE
SendAlert(ssl, alert_fatal, wc_protocol_version);
#else
SendAlert(ssl, alert_fatal, protocol_version); SendAlert(ssl, alert_fatal, protocol_version);
#endif
return VERSION_ERROR; return VERSION_ERROR;
} }
} }

View File

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