add CURLOPT_{,PROXY}_TLS13_CIPHERS
authorMichael Wallner <mike@php.net>
Fri, 5 Mar 2021 15:42:35 +0000 (16:42 +0100)
committerMichael Wallner <mike@php.net>
Fri, 5 Mar 2021 15:42:35 +0000 (16:42 +0100)
src/php_http_client_curl.c

index accc02342273a28493e8dcafaf09bbcdd2d1f4ac..b4f2d04db75655a1bbf492f6a7f528e5c662f4e4 100644 (file)
@@ -1542,6 +1542,11 @@ static void php_http_curle_options_init(php_http_options_t *registry)
 #endif
 #if PHP_HTTP_CURL_VERSION(7,42,0) && (PHP_HTTP_HAVE_LIBCURL_NSS || PHP_HTTP_HAVE_LIBCURL_SECURETRANSPORT)
                        php_http_option_register(ssl_registry, ZEND_STRL("falsestart"), CURLOPT_SSL_FALSESTART, _IS_BOOL);
+#endif
+#if PHP_HTTP_CURL_VERSION(7,61,0)
+                       if ((opt = php_http_option_register(ssl_registry, ZEND_STRL("tls13_ciphers"), CURLOPT_TLS13_CIPHERS, IS_STRING))) {
+                               opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN;
+                       }
 #endif
                }
 
@@ -1620,6 +1625,11 @@ static void php_http_curle_options_init(php_http_options_t *registry)
                                opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN;
                                opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_BASEDIR;
                        }
+# endif
+# if PHP_HTTP_CURL_VERSION(7,61,0)
+                       if ((opt = php_http_option_register(proxy_registry, ZEND_STRL("tls13_ciphers"), CURLOPT_PROXY_TLS13_CIPHERS, IS_STRING))) {
+                               opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN;
+                       }
 # endif
                }
 #endif