From: Michael Wallner Date: Wed, 4 Feb 2015 14:10:53 +0000 (+0100) Subject: add CURLOPT_PINNEDPUBLICKEY X-Git-Tag: RELEASE_2_3_0_RC1~63 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=b8b53217575c2e7b091588b97b95324d50b921ff;p=m6w6%2Fext-http add CURLOPT_PINNEDPUBLICKEY --- diff --git a/package.xml b/package.xml index 830a546..77cd1a0 100644 --- a/package.xml +++ b/package.xml @@ -50,6 +50,7 @@ v2: http://dev.iworks.at/ext-http/lcov/ext/http/ = 7.33.0) ++ Added pinned_publickey SSL request option (libcurl >= 7.39.0) ]]> diff --git a/php_http_client_curl.c b/php_http_client_curl.c index 566e523..01b0a0f 100644 --- a/php_http_client_curl.c +++ b/php_http_client_curl.c @@ -1400,6 +1400,12 @@ static void php_http_curle_options_init(php_http_options_t *registry TSRMLS_DC) if ((opt = php_http_option_register(registry, ZEND_STRL("enable_alpn"), CURLOPT_SSL_ENABLE_ALPN, IS_BOOL))) { ZVAL_BOOL(&opt->defval, 1); } +#endif +#if PHP_HTTP_CURL_VERSION(7,39,0) + if ((opt = php_http_option_register(registry, ZEND_STRL("pinned_publickey"), CURLOPT_PINNEDPUBLICKEY, IS_STRING))) { + opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN; + opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_BASEDIR; + } #endif } }