MXS-2762: Add ssl_version=TLSv13

Added new ssl_version value for TLSv1.3. This allows the list of accepted
protocol versions to be limited to all supported protocols. Previously
TLSv1.3 was only available with ssl_version=MAX.

Also fixed the enum value serialization to use a lowercase v. This causes
them to have the same value as the one used in the enum.
This commit is contained in:
Markus Mäkelä
2019-11-11 12:46:28 +02:00
parent f7f865d4c3
commit 774e9bc3f0
4 changed files with 32 additions and 3 deletions

View File

@ -202,13 +202,16 @@ const char* ssl_method_type_to_string(ssl_method_type_t method_type)
switch (method_type)
{
case SERVICE_TLS10:
return "TLSV10";
return "TLSv10";
case SERVICE_TLS11:
return "TLSV11";
return "TLSv11";
case SERVICE_TLS12:
return "TLSV12";
return "TLSv12";
case SERVICE_TLS13:
return "TLSv13";
case SERVICE_SSL_MAX:
case SERVICE_TLS_MAX:
@ -238,6 +241,10 @@ ssl_method_type_t string_to_ssl_method_type(const char* str)
{
return SERVICE_TLS12;
}
else if (strcasecmp("TLSV13", str) == 0)
{
return SERVICE_TLS13;
}
return SERVICE_SSL_UNKNOWN;
}