Subject: | Certificate Failure with LWP 6.0 |
Date: | Tue, 15 Mar 2011 13:51:49 -0700 |
To: | bug-net-amazon-s3 [...] rt.cpan.org |
From: | "David E. Wheeler" <dwheeler [...] cpan.org> |
Howdy,
LWP 6.0, released last week, now requires that any https protocol request needs to verify the certificate associated with it. As a result, I'm now getting errors such as this from Net::Amazon::S3:
Can't connect to feeds.lunar-theory.com.s3.amazonaws.com:443 (certificate verify failed)
LWP::Protocol::https::Socket: SSL connect attempt failed with unknown errorerror:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed at /usr/local/lib/perl5/site_perl/5.12.2/LWP/Protocol/http.pm line 51.
The error, it seems, is related to how domain names are constructed for S3. Details here:
http://shlomoswidler.com/2009/08/amazon-s3-gotcha-using-virtual-host.html
As you can see from the error message, my bucket name has a dot in it. So would it be possible to modify Net::Amazon::S3 to use this URL instead?
https://s3.amazonaws.com:443/feeds.lunar-theory.com
That is, put the bucket name in the path component of the URL, rather than in the domain name.
Thanks,
David