add request option proxy_ssl.pinned_publickey
authorMichael Wallner <mike@php.net>
Fri, 5 Mar 2021 15:37:56 +0000 (16:37 +0100)
committerMichael Wallner <mike@php.net>
Fri, 5 Mar 2021 15:37:56 +0000 (16:37 +0100)
src/php_http_client_curl.c

index 9ca87259642c78e281dde20e2fa0c89729f1d9f2..accc02342273a28493e8dcafaf09bbcdd2d1f4ac 100644 (file)
@@ -1613,6 +1613,13 @@ static void php_http_curle_options_init(php_http_options_t *registry)
                        if ((opt = php_http_option_register(proxy_registry, ZEND_STRL("tlsauthpass"), CURLOPT_PROXY_TLSAUTH_PASSWORD, IS_STRING))) {
                                opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN;
                        }
+# endif
+# if PHP_HTTP_CURL_VERSION(7,59,0)
+                       /* FIXME: see http://curl.haxx.se/libcurl/c/CURLOPT_PINNEDPUBLICKEY.html#AVAILABILITY */
+                       if ((opt = php_http_option_register(proxy_registry, ZEND_STRL("pinned_publickey"), CURLOPT_PROXY_PINNEDPUBLICKEY, IS_STRING))) {
+                               opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN;
+                               opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_BASEDIR;
+                       }
 # endif
                }
 #endif