From 9b53b5d7e86c49336d64c9ec3ef0612fcaa4b204 Mon Sep 17 00:00:00 2001 From: Mercier Pierre-Olivier Date: Sat, 14 Sep 2013 18:06:42 +0200 Subject: [PATCH] Check certificate --- ACU/API/Base.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ACU/API/Base.pm b/ACU/API/Base.pm index abfd95e..f772a10 100644 --- a/ACU/API/Base.pm +++ b/ACU/API/Base.pm @@ -70,6 +70,8 @@ sub get($$) my $url = shift; my $ua = LWP::UserAgent->new; + $ua->ssl_opts(SSL_ca_file => "/etc/ldap/cacert.pem"); + log(DEBUG, 'GET Request to ', API_URL, $url); my $req = GET API_URL . $url; @@ -86,6 +88,8 @@ sub send($$$) my $url = shift; my $ua = LWP::UserAgent->new; + $ua->ssl_opts(SSL_ca_file => "/etc/ldap/cacert.pem"); + log(DEBUG, 'POST Request to ', API_URL, $url); my $req = POST API_URL . $url, shift;