aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2015-12-01 16:56:51 -0600
committerChris Buechler <cmb@pfsense.org>2015-12-01 16:56:51 -0600
commited94a2663b00fe7d5c7bf20443b043fe420dc659 (patch)
tree17a6e70840116d97f8e6a25ab901c332532df3ab /config
parent26f41b6b1136ac5216cd748c6e5e5254275c88a5 (diff)
downloadpfsense-packages-ed94a2663b00fe7d5c7bf20443b043fe420dc659.tar.gz
pfsense-packages-ed94a2663b00fe7d5c7bf20443b043fe420dc659.tar.bz2
pfsense-packages-ed94a2663b00fe7d5c7bf20443b043fe420dc659.zip
Enable VERIFYPEER for AutoConfigBackup on 2.2 and newer. Ticket #5560
Diffstat (limited to 'config')
-rw-r--r--config/autoconfigbackup/autoconfigbackup.inc6
1 files changed, 6 insertions, 0 deletions
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);