SSL_VERIFYSTATUS is only availbe for nss, gtls and openssl
authorMichael Wallner <mike@php.net>
Thu, 21 Jan 2016 16:30:55 +0000 (17:30 +0100)
committerMichael Wallner <mike@php.net>
Thu, 21 Jan 2016 16:30:55 +0000 (17:30 +0100)
fixes issue #20

package.xml
src/php_http_client_curl.c

index 90b1dab..1e12302 100644 (file)
@@ -46,7 +46,7 @@ http://dev.iworks.at/ext-http/lcov/ext/http/
  </stability>
  <license uri="http://copyfree.org/content/standard/licenses/2bsd/license.txt">BSD-2-Clause</license>
  <notes><![CDATA[
-*
+* Fix gh-issue #20: setSslOptions notice with curl 7.43
 ]]></notes>
  <contents>
   <dir name="/">
index fed92fc..96b0bb0 100644 (file)
@@ -1469,7 +1469,7 @@ static void php_http_curle_options_init(php_http_options_t *registry TSRMLS_DC)
                        ZVAL_BOOL(&opt->defval, 1);
                        opt->setter = php_http_curle_option_set_ssl_verifyhost;
                }
-#if PHP_HTTP_CURL_VERSION(7,41,0)
+#if PHP_HTTP_CURL_VERSION(7,41,0) && (defined(PHP_HTTP_HAVE_OPENSSL) || defined(PHP_HTTP_HAVE_NSS) || defined(PHP_HTTP_HAVE_GNUTLS))
                php_http_option_register(registry, ZEND_STRL("verifystatus"), CURLOPT_SSL_VERIFYSTATUS, IS_BOOL);
 #endif
                php_http_option_register(registry, ZEND_STRL("cipher_list"), CURLOPT_SSL_CIPHER_LIST, IS_STRING);