From: Michael Wallner Date: Mon, 13 Jul 2015 14:59:30 +0000 (+0200) Subject: Enable certinfo on all supporting backends X-Git-Tag: RELEASE_2_5_1~6 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=692cfb168b5e4a52fe9aa43f9a62b0d0e1076f9c;p=m6w6%2Fext-http Enable certinfo on all supporting backends OpenSSL: libcurl v7.19.1 NSS: libcurl v7.34.0 GSKit: libcurl v7.39.0 GnuTLS: libcurl v7.42.0 --- diff --git a/config9.m4 b/config9.m4 index dcf193b..273f038 100644 --- a/config9.m4 +++ b/config9.m4 @@ -338,6 +338,9 @@ dnl ---- HTTP_CURL_SSL_LIB_CHECK(SecureTransport, [ AC_DEFINE([PHP_HTTP_HAVE_DARWINSSL], [1], [ ]) ]) + HTTP_CURL_SSL_LIB_CHECK(GSKit, [ + AC_DEFINE([PHP_HTTP_HAVE_GSKIT], [1], [ ]) + ]) else dnl no CURL_SSL AC_MSG_RESULT([no]) diff --git a/package.xml b/package.xml index 6220829..30e067a 100644 --- a/package.xml +++ b/package.xml @@ -51,6 +51,7 @@ http://dev.iworks.at/ext-http/lcov/ext/http/ + SSL certinfo is available for libcurl >= 7.42 with gnutls (openssl has already been since 7.19.1) + Added "falsestart" SSL request option (available with libcurl >= 7.42 and darwinssl/NSS) + Added "service_name" and "proxy_service_name" request options for SPNEGO (available with libcurl >= 7.43) ++ Enabled "certinfo" transfer info on all supporting SSL backends (OpenSSL: libcurl v7.19.1, NSS: libcurl v7.34.0, GSKit: libcurl v7.39.0, GnuTLS: libcurl v7.42.0) ]]> diff --git a/php_http_client_curl.c b/php_http_client_curl.c index 5443e66..4634b79 100644 --- a/php_http_client_curl.c +++ b/php_http_client_curl.c @@ -502,10 +502,11 @@ static ZEND_RESULT_CODE php_http_curle_get_info(CURL *ch, HashTable *info) case CURLSSLBACKEND_QSOSSL: backend = "qsossl"; break; -#endif +#else case CURLSSLBACKEND_GSKIT: backend = "gskit"; break; +#endif case CURLSSLBACKEND_POLARSSL: backend = "polarssl"; break; @@ -528,7 +529,7 @@ static ZEND_RESULT_CODE php_http_curle_get_info(CURL *ch, HashTable *info) } #endif -#if (PHP_HTTP_CURL_VERSION(7,19,1) && defined(PHP_HTTP_HAVE_OPENSSL)) || (PHP_HTTP_CURL_VERSION(7,42,0) && defined(PHP_HTTP_HAVE_GNUTLS)) +#if (PHP_HTTP_CURL_VERSION(7,19,1) && defined(PHP_HTTP_HAVE_OPENSSL)) || (PHP_HTTP_CURL_VERSION(7,34,0) && defined(PHP_HTTP_HAVE_NSS)) || (PHP_HTTP_CURL_VERSION(7,42,0) && defined(PHP_HTTP_HAVE_GNUTLS)) || (PHP_HTTP_CURL_VERSION(7,39,0) && defined(PHP_HTTP_HAVE_GSKIT)) { int i; zval *ci_array; @@ -1498,7 +1499,7 @@ static void php_http_curle_options_init(php_http_options_t *registry TSRMLS_DC) } # endif #endif -#if PHP_HTTP_CURL_VERSION(7,19,1) && defined(PHP_HTTP_HAVE_OPENSSL) +#if (PHP_HTTP_CURL_VERSION(7,19,1) && defined(PHP_HTTP_HAVE_OPENSSL)) || (PHP_HTTP_CURL_VERSION(7,34,0) && defined(PHP_HTTP_HAVE_NSS)) || (PHP_HTTP_CURL_VERSION(7,42,0) && defined(PHP_HTTP_HAVE_GNUTLS)) || (PHP_HTTP_CURL_VERSION(7,39,0) && defined(PHP_HTTP_HAVE_GSKIT)) php_http_option_register(registry, ZEND_STRL("certinfo"), CURLOPT_CERTINFO, IS_BOOL); #endif #if PHP_HTTP_CURL_VERSION(7,36,0)