diff options
author | Scott Talbert <swt@techie.net> | 2023-01-31 10:07:14 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-31 10:07:14 -0500 |
commit | 48e396f74a21309ab1765030bc73c8da321b5c74 (patch) | |
tree | 08da44db185874f5df63e0f7f3d0a860258a6b28 | |
parent | 2a8f57dc7d1906aeb1d828d91cbb440573dcd634 (diff) | |
parent | de38accb520fa224d7ea90122d6bf71d2827f16e (diff) | |
download | pycurl-master.tar.gz |
Add CURLOPT_AWS_SIGV4 option
-rw-r--r-- | src/easyopt.c | 3 | ||||
-rw-r--r-- | src/module.c | 3 | ||||
-rw-r--r-- | tests/option_constants_test.py | 6 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/easyopt.c b/src/easyopt.c index 9bed04c..bfc16f4 100644 --- a/src/easyopt.c +++ b/src/easyopt.c @@ -324,6 +324,9 @@ do_curl_setopt_string_impl(CurlObject *self, int option, PyObject *obj) #if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 62, 0) case CURLOPT_DOH_URL: #endif +#if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 75, 0) + case CURLOPT_AWS_SIGV4: +#endif case CURLOPT_KRBLEVEL: str = PyText_AsString_NoNUL(obj, &encoded_obj); if (str == NULL) diff --git a/src/module.c b/src/module.c index 1ab7c54..450a5eb 100644 --- a/src/module.c +++ b/src/module.c @@ -1090,6 +1090,9 @@ initpycurl(void) #if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 64, 0) insint_c(d, "HTTP09_ALLOWED", CURLOPT_HTTP09_ALLOWED); #endif +#if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 75, 0) + insint_c(d, "AWS_SIGV4", CURLOPT_AWS_SIGV4); +#endif #if LIBCURL_VERSION_NUM >= MAKE_LIBCURL_VERSION(7, 80, 0) insint_c(d, "MAXLIFETIME_CONN", CURLOPT_MAXLIFETIME_CONN); #endif diff --git a/tests/option_constants_test.py b/tests/option_constants_test.py index 4698e3d..7b94164 100644 --- a/tests/option_constants_test.py +++ b/tests/option_constants_test.py @@ -399,6 +399,12 @@ class OptionConstantsTest(unittest.TestCase): curl.setopt(curl.PROXY_TLS13_CIPHERS, 'TLS_CHACHA20_POLY1305_SHA256') curl.close() + @util.min_libcurl(7, 75, 0) + def test_aws_sigv4(self): + curl = pycurl.Curl() + curl.setopt(curl.AWS_SIGV4, 'provider1:provider2') + curl.close() + class OptionConstantsSettingTest(unittest.TestCase): def setUp(self): self.curl = pycurl.Curl() |