-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Since version 3.4.0, MariaDB Connector/C enables TLS by default, including server certificate verification. While some distributions, such as Fedora, have disabled this feature, it is currently not possible to disable TLS in DBD-MariaDB when linking against Connector/C version 3.4.4 (whether built from source or downloaded from MariaDB.com).
In C, TLS can be effectively disabled by turning off server certificate verification:
uint8_t verify= 0;
rc= mysql_options(mysql, MYSQL_OPT_VERIFY_SERVER_CERT, &verify);
However, the same approach does not work with DBD-MariaDB:
my $dsn = "DBI:MariaDB:database=test;mariadb_socket=/tmp/mysql.sock;mariadb_ssl_verify_server_cert=0";
my $dbh = DBI->connect($dsn, 'mirrorcache', '');
$dbh or die 'couldnt connect';
This results in the following error:
DBI connect('database=test;mariadb_socket=/tmp/mysql.sock;mariadb_ssl_verify_server_cert=0','mirrorcache',...) failed: TLS/SSL error: SSL is required, but the server does not support it
This issue was initially reported as CONC-773