Skip to content

Disable TLS connections (using MariaDB Connector/C 3.4.x) #227

@9EOR9

Description

@9EOR9

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions