-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Labels
Description
Migrated from rt.cpan.org#111771 (status was 'open')
Requestors:
From [email protected] on 2016-02-04 11:37:07:
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
From [email protected] on 2016-02-04 11:41:24:
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.
From [email protected] on 2017-01-22 02:13:04:
On Å tv Feb 04 06:37:07 2016, [email protected] wrote:
> 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...