# perl ssl troubles



## Business_Woman (Jan 15, 2013)

Hi,

I am trying to do a simple get request over https with the following program.


```
#!/usr/local/bin/perl
use warnings;
use strict;
use v5.14;
use WWW::Mechanize;
use Mozilla::CA;

my $url = "https://sixxs.net";
my $mech = WWW::Mechanize->new();
$mech->get($url);

print $mech->status();
```

Which fails with the following error message: Error GETing https://sixxs.net: Can't connect to sixxs.net:443 (certificate verify failed)

However, with the same program, changing the host to https://paypal.com succeeds.

A simple check:

```
perl -MMozilla::CA -e 'print Mozilla::CA::SSL_ca_file()'
```
returns 
	
	



```
/usr/local/lib/perl5/site_perl/5.14.2/Mozilla/CA/cacert.pem
```

any ideas?


----------



## SirDice (Jan 15, 2013)

The error indicates it's unable to verify the certificate, it had no problems retrieving it. It's possible the perl module doesn't have all the root CAs and sixxs might use a certificate that's been signed by one of those "missing" CAs. It therefor cannot verify the authenticity of the certificate.


----------



## Business_Woman (Jan 15, 2013)

So this should just be a matter of finding the correct root certificate and append it to cacert.pem ?


----------



## SirDice (Jan 15, 2013)

Yes, I believe so.


----------



## kpa (Jan 15, 2013)

SixXS uses CACert signed certificates.

http://www.cacert.org/


----------

