add AWS_SIGV4 support
authorMichael Wallner <mike@php.net>
Mon, 8 Mar 2021 14:23:39 +0000 (15:23 +0100)
committerMichael Wallner <mike@php.net>
Mon, 8 Mar 2021 14:23:39 +0000 (15:23 +0100)
src/php_http_client_curl.c

index e68a72d2a3c0823da8f6ec8a2415b181e905b9fb..020cf28d6cf3b1ed1e8b0f19737744555b9bc899 100644 (file)
@@ -1351,6 +1351,9 @@ static void php_http_curle_options_init(php_http_options_t *registry)
                opt->flags |= PHP_HTTP_CURLE_OPTION_CHECK_STRLEN;
        }
 #endif
+#if PHP_HTTP_CURL_VERSION(7,75,0)
+       php_http_option_register(registry, ZEND_STRL("aws_sigv4"), CURLOPT_AWS_SIGV4, IS_STRING);
+#endif
 
        /* redirects */
        if ((opt = php_http_option_register(registry, ZEND_STRL("redirect"), CURLOPT_FOLLOWLOCATION, IS_LONG))) {
@@ -2871,6 +2874,9 @@ PHP_MINIT_FUNCTION(http_client_curl)
 #endif
 #if PHP_HTTP_CURL_VERSION(7,61,0)
        REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "AUTH_BEARER", CURLAUTH_BEARER, CONST_CS|CONST_PERSISTENT);
+#endif
+#if PHP_HTTP_CURL_VERSION(7,75,0)
+       REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "AWS_SIGV4", CURLAUTH_AWS_SIGV4, CONST_CS|CONST_PERSISTENT);
 #endif
        REGISTER_NS_LONG_CONSTANT("http\\Client\\Curl", "AUTH_ANY", CURLAUTH_ANY, CONST_CS|CONST_PERSISTENT);