Skip Menu |
 

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 111771
Status: resolved
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: wallace.winfrey [...] oracle.com
Cc: pali [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Windows paths do not work for ssl attributes
Date: Thu, 4 Feb 2016 04:36:49 -0700
To: <bug-DBD-mysql [...] rt.cpan.org>
From: "Wallace Winfrey" <wallace.winfrey [...] oracle.com>
Download (untitled) / with headers
text/plain 805b
When providing Windows filesystems paths - i.e. C:\path\to\my\ssl-cert.pem - as the value of SSL attributes, DBD::mysql does not seem to know how to parse it properly. For example, if I construct a DSN that looks like: dbi:mysql:database=foo;host=my.host;port=3306;mysql_ssl=1;mysql_ssl_ca_file= C:\path\to\my\ssl-ca.pem;mysql_ssl_client_cert= C:\path\to\my\ssl-cert.pem; mysql_ssl_client_key=C:\path\to\my\ssl-key.pem I will get back the following error: SSL error: Unable to get certificate from 'C' If I use relative paths, it works OK, but this breaks when attempting to run my Perl program on a different volume/drive than where the certs are located. I've tried escaping the paths in numerous ways, enclosing them in single & double quotes, but nothing seems to work. Thanks, w
Subject: [rt.cpan.org #111771]
Date: Thu, 4 Feb 2016 04:41:14 -0700
To: <bug-DBD-mysql [...] rt.cpan.org>
From: "Wallace Winfrey" <wallace.winfrey [...] oracle.com>
Download (untitled) / with headers
text/plain 141b
I'm currently seeing this behavior in 4.033, but I am pretty certain this behavior has been present in the last couple versions as well.
On Štv Feb 04 06:37:07 2016, wallace.winfrey@oracle.com wrote: Show quoted text
> When providing Windows filesystems paths - i.e. C:\path\to\my\ssl-cert.pem - > as the value of SSL attributes, DBD::mysql does not seem to know how to > parse it properly. > > For example, if I construct a DSN that looks like: > > dbi:mysql:database=foo;host=my.host;port=3306;mysql_ssl=1;mysql_ssl_ca_file= > C:\path\to\my\ssl-ca.pem;mysql_ssl_client_cert= C:\path\to\my\ssl-cert.pem; > mysql_ssl_client_key=C:\path\to\my\ssl-key.pem > > > > I will get back the following error: > > SSL error: Unable to get certificate from 'C' > > If I use relative paths, it works OK, but this breaks when attempting to run > my Perl program on a different volume/drive than where the certs are > located. > > I've tried escaping the paths in numerous ways, enclosing them in single & > double quotes, but nothing seems to work.
This is probably because DBI uses colon for separating settings... dbi:mysql:.. and you used it in file name. It would be problem in DBI as there seems to be no parser in DBD::mysql...


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.