From ce46bfc03d9274c113efdcf7746cd6d10f330d4e Mon Sep 17 00:00:00 2001 From: bfbones Date: Wed, 28 Oct 2015 20:25:06 +0100 Subject: [PATCH] add VERFIYPEER option to main api-request --- zones.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zones.php b/zones.php index d567e60..a860a04 100644 --- a/zones.php +++ b/zones.php @@ -41,6 +41,9 @@ function api_request($path, $opts = null, $type = null) { } else { curl_setopt($ch, CURLOPT_USERPWD, "$apiuser:$apipass"); } + if ( strcasecmp( $apiproto, 'https' ) == 0 ) { + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, $apisslverify); + } curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); if ($opts) {