From a222ead43c4d0e1e4ca2575f7afe5d68468b7c48 Mon Sep 17 00:00:00 2001 From: Stephen Abello Date: Fri, 21 Jun 2019 13:59:36 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B02336:=20Use=20--ssl-mode=20instead=20of?= =?UTF-8?q?=20--ssl=20with=20MySQL=20>=3D=205.7.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup/backup.class.inc.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/setup/backup.class.inc.php b/setup/backup.class.inc.php index f9becc0f7..917122a01 100644 --- a/setup/backup.class.inc.php +++ b/setup/backup.class.inc.php @@ -649,10 +649,20 @@ EOF; { return ''; } - $sTlsOptions = ''; - $sTlsOptions .= ' --ssl'; + $sDBVendor= CMDBSource::GetDBVendor(); + $sDBVersion = CMDBSource::GetDBVersion(); + $sMysqlSSLModeVersion = '5.7.0'; //Mysql 5.7.0 and upper deprecated --ssl and uses --ssl-mode instead + if ($sDBVendor === CMDBSource::ENUM_DB_VENDOR_MYSQL && version_compare($sDBVersion, $sMysqlSSLModeVersion, '>=')) + { + $sTlsOptions .= ' --ssl-mode'; + } + else + { + $sTlsOptions .= ' --ssl'; + } + // ssl-key parameter : not implemented // ssl-cert parameter : not implemented