James MV
James MV

Reputation: 8717

Perl TLS1.2 to MySql Db

I've got a remote mysql instance that supports TLSv1.2, python is connecting fine. However I can't get Perl to connect in anything other than TLSv1.0.

Running on CentOS 7 with OpenSSL version OpenSSL 1.0.2k-fips.

DBI->connect(
                "mysql_ssl=1;" .
                "mysql_ssl_client_key=/etc/client.key" .
                "mysql_ssl_client_cert=/etc/client.crt" .
                "mysql_ssl_ca_file=/etc/ca.crt",
                'my_db',
                'my_password',
                { RaiseError => 1, AutoCommit => 1 },

            );

I have upgraded the two modules I would have thought are required: Successfully installed IO-Socket-SSL-2.060 (upgraded from 1.94) and DBD::mysql is up to date. (4.048)

Any ideas what else I can be missing, the DB server and client are hooking up as TLSv1.2 with Python so it must be a missing Perl module or config option?

The full list of installed modules:

App::cpanminus - 1.7044
B::Hooks::EndOfScope - 0.21
CPAN::Meta - 2.150010
CPAN::Meta::Requirements - 2.140
CPAN::Meta::YAML - 0.018
Class::Data::Inheritable - 0.08
DBD::mysql - 4.048
DBI - 1.640
Date::Manip - 6.61
Devel::CheckLib - 1.13
Devel::GlobalDestruction - 0.14
Devel::StackTrace - 2.03
Dist::CheckConflicts - 0.11
Eval::Closure - 0.14
Exception::Class - 1.44
Expect - 1.35
ExtUtils::CBuilder - 0.280230
File::NFSLock - 1.27
IO::CaptureOutput - 1.1104
IO::Socket::SSL - 2.060
IO::Tty - 1.12
IPC::Cmd - 1.00
IPC::Run3 - 0.048
Importer - 0.025
JSON - 2.97001
JSON::PP - 2.97001
List::Util - 1.50
Locale::Maketext::Simple - 0.21
Log::Dispatch - 2.67
Log::Dispatch::FileRotate - 1.34
Log::Log4perl - 1.49
MRO::Compat - 0.13
Mock::Config - 0.03
Module::Build - 0.4224
Module::CoreList - 5.20180220
Module::Implementation - 0.09
Module::Load - 0.32
Module::Load::Conditional - 0.68
Module::Metadata - 1.000033
Module::Pluggable - 5.2
Module::Runtime - 0.016
Package::Stash - 0.37
Package::Stash::XS - 0.28
Params::Check - 0.38
Params::ValidationCompiler - 0.27
Path::Tiny - 0.104
Perl - 5.16.3
Perl::OSType - 1.010
Role::Tiny - 2.000006
Scope::Guard - 0.21
Specio - 0.42
Sub::Exporter::Progressive - 0.001013
Sub::Identify - 0.14
Sub::Info - 0.002
Sub::Quote - 2.005000
Sub::Uplevel - 0.2800
Sys::Syslog - 0.35
Term::Table - 0.012
Test2::Plugin::NoWarnings - 0.06
Test2::Suite - 0.000100
Test::Deep - 1.128
Test::Fatal - 0.014
Test::Harness - 3.41
Test::Inter - 1.06
Test::Needs - 0.002005
Test::Requires - 0.10
Test::Simple - 1.302125
Test::Warn - 0.32
Test::Without::Module - 0.20
Try::Tiny - 0.30
Variable::Magic - 0.62
namespace::autoclean - 0.28
namespace::clean - 0.27
version - 0.9918

Upvotes: 0

Views: 685

Answers (1)

James MV
James MV

Reputation: 8717

The issue here was that although I was connecting to an up to date remote MariaDB db I had the mysql-community-client 5.6 installed on my client machine. I un-installed everything mysql-community and replaced with the latest MariaDB-client and MariaDB-compat.

Upvotes: 1

Related Questions