Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.9.0
-
openSUSE Tumbleweed 20250428
-
-
dbbe65fb2 (dev), 304089b6d (6.9), fc944fe6f (tqtc/lts-6.8)
Description
MariaDB 11.4 and (more importantly here) their C connector version 3.4 enable SSL mode by default for all non-local connections as described in https://mariadb.com/kb/en/securing-connections-for-client-and-server/. Support for MYSQL_OPT_SSL_MODE was added as part of QTBUG-84797 but, unfortunately, only for MySQL:
- https://github.com/qt/qtbase/blob/11c171553eece9742ea94196b1cabc85d07d0ffb/src/plugins/sqldrivers/mysql/qsql_mysql.cpp#L1306-L1308 explicitly excludes MariaDB
- also: the docs at https://doc.qt.io/qt-6/sql-driver.html#connection-options unfortunately fail to mention that only MySQL is supported
Without support for this parameter, I can't disable SSL for the MySQL plugin that I'm using from Digikam.
Moreover, even if I'd set up my NAS with SSL, without support for MYSQL_OPT_SSL_VERIFY_SERVER_CERT, I wouldn't be able to connect anyway as I don't have a valid certificate.
Alternatively to implementing custom options could be to provide the ability to pass a custom options file - see https://mariadb.com/kb/en/configuring-mariadb-connectorc-with-option-files/ for details. This may be future-proof and allow all sorts of customisations.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-136550 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
644232,1 | SQL/MySQL: add option MYSQL_OPT_SSL_VERIFY_SERVER_CERT | dev | qt/qtbase | Status: NEW | 0 | 0 |
643096,2 | SQL/MySQL: adjust check for MariaDB client library | dev | qt/qtbase | Status: MERGED | +2 | 0 |
643097,1 | SQL/MySQL: enable support for SSL connect options for MariaDB 11 | dev | qt/qtbase | Status: ABANDONED | +2 | 0 |
643133,2 | SQL/MySQL: adjust check for MariaDB client library | 6.9 | qt/qtbase | Status: MERGED | +2 | 0 |
643147,2 | SQL/MySQL: adjust check for MariaDB client library | tqtc/lts-6.8 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |