Mercurial > hg > orthanc-databases
changeset 187:0b78198c28d6
compatibility with mysql client 8.x
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 16 Dec 2020 15:41:06 +0100 |
parents | 6fe74f9a516e |
children | 8a4cc1f715eb |
files | Framework/MySQL/MySQLDatabase.cpp |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Framework/MySQL/MySQLDatabase.cpp Wed Dec 16 15:05:19 2020 +0100 +++ b/Framework/MySQL/MySQLDatabase.cpp Wed Dec 16 15:41:06 2020 +0100 @@ -145,13 +145,18 @@ { if (parameters_.IsVerifyServerCertificates()) { +#if (MYSQL_VERSION_ID > 50110 && MYSQL_VERSION_ID < 80000) // Removed in MySQL client 8.0 my_bool verifyCert = 1; mysql_options(mysql_, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (void *) &verifyCert); +#endif + mysql_options(mysql_, MYSQL_OPT_SSL_CA, (void *)(parameters_.GetSslCaCertificates())); } +#if (MYSQL_VERSION_ID > 50110 && MYSQL_VERSION_ID < 80000) // Removed in MySQL client 8.0 my_bool enforceTls = 1; mysql_options(mysql_, MYSQL_OPT_SSL_ENFORCE, (void *) &enforceTls); +#endif } const char* socket = (parameters_.GetUnixSocket().empty() ? NULL :