From 51da7c8efc890ebdb394dfa53f911b64223a53e8 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Wed, 22 May 2019 21:36:53 +0200 Subject: [PATCH] Set MARIADB_OPT_TLS_VERSION to define which TLS protocol versions are allowed. See https://www.heidisql.com/forum.php?t=27158 --- source/dbconnection.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/dbconnection.pas b/source/dbconnection.pas index 5bc763e8..6d8717f0 100644 --- a/source/dbconnection.pas +++ b/source/dbconnection.pas @@ -1795,6 +1795,11 @@ begin raise EDatabaseError.Create(f_('Plugin directory %s could not be set.', [PluginDir])); end; + // Define which TLS protocol versions are allowed. + // See https://www.heidisql.com/forum.php?t=27158 + // See https://mariadb.com/kb/en/library/mysql_optionsv/ + mysql_options(FHandle, Integer(MARIADB_OPT_TLS_VERSION), PAnsiChar('TLSv1.0,TLSv1.1,TLSv1.2,TLSv1.3')); + Connected := mysql_real_connect( FHandle, PAnsiChar(Utf8Encode(FinalHost)),