X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=php_http_client_curl.c;fp=php_http_client_curl.c;h=01b0a0fee5174bd47c88fcf75153d2354228a2f0;hp=566e523b9154b67803abb8a11d67d58818820d91;hb=b8b53217575c2e7b091588b97b95324d50b921ff;hpb=b844fc1835f6bf13c50c60f693fcc151ea77326f 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 } }