From ed94a2663b00fe7d5c7bf20443b043fe420dc659 Mon Sep 17 00:00:00 2001 From: Chris Buechler Date: Tue, 1 Dec 2015 16:56:51 -0600 Subject: Enable VERIFYPEER for AutoConfigBackup on 2.2 and newer. Ticket #5560 --- config/autoconfigbackup/autoconfigbackup.inc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'config/autoconfigbackup') diff --git a/config/autoconfigbackup/autoconfigbackup.inc b/config/autoconfigbackup/autoconfigbackup.inc index abfe1a28..704fd165 100644 --- a/config/autoconfigbackup/autoconfigbackup.inc +++ b/config/autoconfigbackup/autoconfigbackup.inc @@ -139,6 +139,12 @@ function test_connection($post) { $curl_session = curl_init(); curl_setopt($curl_session, CURLOPT_URL, $get_url); curl_setopt($curl_session, CURLOPT_HTTPHEADER, array("Authorization: Basic " . base64_encode("{$username}:{$password}"))); + if ($pf_version < 2.2) { + // pre-2.2 doesn't have ca-root-nss + curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0); + } else { + curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 1); + } curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($curl_session, CURLOPT_POST, 1); curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, 1); -- cgit v1.2.3