aboutsummaryrefslogtreecommitdiffstats
path: root/config/autoconfigbackup/autoconfigbackup_stats.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2015-12-03 17:22:43 -0500
committerjim-p <jimp@pfsense.org>2015-12-03 17:22:43 -0500
commit7039bd10d12d81879d7a1c03d4e4cd5fa3aab938 (patch)
treeefe7114cdc7ff982477fbbd2bf756eb89f31aa83 /config/autoconfigbackup/autoconfigbackup_stats.php
parentcbc591cad92ac42aa15aab2f377b13c4341a7685 (diff)
downloadpfsense-packages-7039bd10d12d81879d7a1c03d4e4cd5fa3aab938.tar.gz
pfsense-packages-7039bd10d12d81879d7a1c03d4e4cd5fa3aab938.tar.bz2
pfsense-packages-7039bd10d12d81879d7a1c03d4e4cd5fa3aab938.zip
More ACB SSL_VERIFYPEER fixes. Fixes #5560
Diffstat (limited to 'config/autoconfigbackup/autoconfigbackup_stats.php')
-rw-r--r--config/autoconfigbackup/autoconfigbackup_stats.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/autoconfigbackup/autoconfigbackup_stats.php b/config/autoconfigbackup/autoconfigbackup_stats.php
index 73dd54e2..eeb36641 100644
--- a/config/autoconfigbackup/autoconfigbackup_stats.php
+++ b/config/autoconfigbackup/autoconfigbackup_stats.php
@@ -71,7 +71,12 @@ if ($_REQUEST['delhostname']) {
curl_setopt($curl_session, CURLOPT_URL, $del_url);
curl_setopt($curl_session, CURLOPT_HTTPHEADER, array("Authorization: Basic " . base64_encode("{$username}:{$password}")));
curl_setopt($curl_session, CURLOPT_POST, 2);
- curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0);
+ 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_RETURNTRANSFER, 1);
curl_setopt($curl_session, CURLOPT_POSTFIELDS, "action=deletehostname&delhostname=" . urlencode($_REQUEST['delhostname']));
curl_setopt($curl_session, CURLOPT_USERAGENT, $g['product_name'] . '/' . rtrim(file_get_contents("/etc/version")));