pjf / WebService-HabitRPG

Access the HabitRPG API from Perl
8 stars 5 forks source link

SSL Failure #30

Closed toddgrotenhuis closed 11 years ago

toddgrotenhuis commented 11 years ago

When trying to execute tasks:

"Error GETing https://habitrpg.com/api/v1/user/tasks?type=todo: Can't verify SSL peers without knowning which Certificate Authorities to trust at /Library/Perl/5.12/WebService/HabitRPG.pm line 177"

which is this section:

Internal use only code beyond this point

method _get_tasks($url) { my $results = $self->_get_request($url);

my @tasks;

# Somehow we can get back completely undefined results,
# hence the grep to only look at defined ones.

foreach my $raw (grep { defined } @$results) {
    push @tasks, WebService::HabitRPG::Task->new(
        $raw,
    );
}

return \@tasks;

}

pjf commented 11 years ago

Wow! That's a new one! Try:

cpanm Mozilla::CA

to install the certificates? I have no idea why my machine doesn't need this (maybe it's able to find system certs?)

toddgrotenhuis commented 11 years ago

Success!

pjf commented 11 years ago

Thank you so much for reporting this! The next release will make sure it includes the CA Certs as part of the dependency chain!

toddgrotenhuis commented 11 years ago

Looks like ti may be system-specific. I've installed three places, now, and only the OSX install had this issue (other two locations were an ubuntu desktop and an ubuntu server VPS).

pjf commented 11 years ago

I've had one OSX user say things are painfully slow with the default configuration. If that happens for you, please let me know (as it means it can be reproduced across machines), but rejoice that there's a workaround by disabling keep-alive connections (GH #25).

dolmen commented 10 years ago

A Mozilla::CA bundled with the OS would be obsolete anyway, so you should install the latest one.

But even that will not make you safer as even the latest CPAN release of Mozilla::CA is obsolete. See RT#97559.