mirror of https://gitee.com/bigwinds/arangodb
Feature 3.5/enable tlsv13 (#9818)
* define TLS_V13 symbol only conditionally * updated CHANGELOG
This commit is contained in:
parent
226373e200
commit
34957ee223
16
CHANGELOG
16
CHANGELOG
|
@ -1,6 +1,22 @@
|
||||||
v3.5.1 (XXXX-XX-XX)
|
v3.5.1 (XXXX-XX-XX)
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
* Added support for TLS 1.3 for the arangod server and the client tools.
|
||||||
|
|
||||||
|
The default TLS protocol for the arangod server is still TLS 1.2 however, in order
|
||||||
|
to keep compatibility with previous versions of ArangoDB.
|
||||||
|
|
||||||
|
The arangod server and any of the client tools can be started with option
|
||||||
|
`--ssl.protocol 6` to make use of TLS 1.3.
|
||||||
|
|
||||||
|
To configure the TLS version for arangod instances started by the ArangoDB starter,
|
||||||
|
one can use the `--all.ssl.protocol=VALUE` startup option for the ArangoDB starter,
|
||||||
|
where VALUE is one of the following:
|
||||||
|
|
||||||
|
- 4 = TLSv1
|
||||||
|
- 5 = TLSv1.2
|
||||||
|
- 6 = TLSv1.3
|
||||||
|
|
||||||
* Fixed parsing of "NOT IN" in AQL, which previously didn't correctly parse
|
* Fixed parsing of "NOT IN" in AQL, which previously didn't correctly parse
|
||||||
"NOT IN_RANGE(...)" because it checked if the "NOT" token was followed by
|
"NOT IN_RANGE(...)" because it checked if the "NOT" token was followed by
|
||||||
whitespace and then the two letters "IN".
|
whitespace and then the two letters "IN".
|
||||||
|
|
|
@ -242,18 +242,14 @@ void SslClientConnection::init(uint64_t sslProtocol) {
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TLS_V13:
|
|
||||||
// TLS 1.3, only supported from OpenSSL 1.1.1 onwards
|
// TLS 1.3, only supported from OpenSSL 1.1.1 onwards
|
||||||
|
|
||||||
// openssl version number format is
|
// openssl version number format is
|
||||||
// MNNFFPPS: major minor fix patch status
|
// MNNFFPPS: major minor fix patch status
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
|
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
|
||||||
|
case TLS_V13:
|
||||||
meth = TLS_client_method();
|
meth = TLS_client_method();
|
||||||
break;
|
break;
|
||||||
#else
|
|
||||||
// no TLS 1.3 support
|
|
||||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_NOT_IMPLEMENTED,
|
|
||||||
"TLS 1.3 is not supported in this build");
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
case SSL_UNKNOWN:
|
case SSL_UNKNOWN:
|
||||||
|
@ -319,7 +315,9 @@ bool SslClientConnection::connectSocket() {
|
||||||
switch (SslProtocol(_sslProtocol)) {
|
switch (SslProtocol(_sslProtocol)) {
|
||||||
case TLS_V1:
|
case TLS_V1:
|
||||||
case TLS_V12:
|
case TLS_V12:
|
||||||
|
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
|
||||||
case TLS_V13:
|
case TLS_V13:
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
SSL_set_tlsext_host_name(_ssl, _endpoint->host().c_str());
|
SSL_set_tlsext_host_name(_ssl, _endpoint->host().c_str());
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,17 +67,13 @@ asio_ns::ssl::context arangodb::sslContext(SslProtocol protocol, std::string con
|
||||||
meth = context::method::tlsv12_server;
|
meth = context::method::tlsv12_server;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
|
||||||
case TLS_V13:
|
case TLS_V13:
|
||||||
// TLS 1.3, only supported from OpenSSL 1.1.1 onwards
|
// TLS 1.3, only supported from OpenSSL 1.1.1 onwards
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
|
|
||||||
// openssl version number format is
|
// openssl version number format is
|
||||||
// MNNFFPPS: major minor fix patch status
|
// MNNFFPPS: major minor fix patch status
|
||||||
meth = context::method::tlsv13_server;
|
meth = context::method::tlsv13_server;
|
||||||
break;
|
break;
|
||||||
#else
|
|
||||||
// no TLS 1.3 support
|
|
||||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_NOT_IMPLEMENTED,
|
|
||||||
"TLS 1.3 is not supported in this build");
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -137,8 +133,10 @@ std::string arangodb::protocolName(SslProtocol protocol) {
|
||||||
case TLS_V12:
|
case TLS_V12:
|
||||||
return "TLSv12";
|
return "TLSv12";
|
||||||
|
|
||||||
|
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
|
||||||
case TLS_V13:
|
case TLS_V13:
|
||||||
return "TLSv13";
|
return "TLSv13";
|
||||||
|
#endif
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return "unknown";
|
return "unknown";
|
||||||
|
@ -163,9 +161,15 @@ std::unordered_set<uint64_t> arangodb::availableSslProtocols() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string arangodb::availableSslProtocolsDescription() {
|
std::string arangodb::availableSslProtocolsDescription() {
|
||||||
|
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
|
||||||
|
return "ssl protocol (1 = SSLv2 (unsupported), 2 = SSLv2 or SSLv3 "
|
||||||
|
"(negotiated), 3 = SSLv3, 4 = "
|
||||||
|
"TLSv1, 5 = TLSv1.2, 6 = TLSv1.3)";
|
||||||
|
#else
|
||||||
return "ssl protocol (1 = SSLv2 (unsupported), 2 = SSLv2 or SSLv3 "
|
return "ssl protocol (1 = SSLv2 (unsupported), 2 = SSLv2 or SSLv3 "
|
||||||
"(negotiated), 3 = SSLv3, 4 = "
|
"(negotiated), 3 = SSLv3, 4 = "
|
||||||
"TLSv1, 5 = TLSv1.2)";
|
"TLSv1, 5 = TLSv1.2)";
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -48,7 +48,9 @@ enum SslProtocol {
|
||||||
SSL_V3 = 3,
|
SSL_V3 = 3,
|
||||||
TLS_V1 = 4,
|
TLS_V1 = 4,
|
||||||
TLS_V12 = 5,
|
TLS_V12 = 5,
|
||||||
|
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
|
||||||
TLS_V13 = 6,
|
TLS_V13 = 6,
|
||||||
|
#endif
|
||||||
|
|
||||||
SSL_LAST
|
SSL_LAST
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue