]> git.ipfire.org Git - thirdparty/curl.git/commit
http: improve AWS HTTP v4 Signature auth
authorDmitry Wagin <dmitry.wagin@ya.ru>
Mon, 25 Jan 2021 14:02:09 +0000 (17:02 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 30 Jan 2021 22:48:22 +0000 (23:48 +0100)
commit796ce293defeeefb001bd8b76bbb75eb77a1ce0c
tree5de053a8198e191860a9bc7177c9788880e094a5
parent3c2210713e2427d567a6c44b83b3c9ac2a8577bc
http: improve AWS HTTP v4 Signature auth

- Add support services without region and service prefixes in
the URL endpoint (ex. Min.IO, GCP, Yandex Cloud, Mail.Ru Cloud Solutions, etc)
by providing region and service parameters via aws-sigv4 option.
- Add [:region[:service]] suffix to aws-sigv4 option;
- Fix memory allocation errors.
- Refactor memory management.
- Use Curl_http_method instead() STRING_CUSTOMREQUEST.
- Refactor canonical headers generating.
- Remove repeated sha256_to_hex() usage.
- Add some docs fixes.
- Add some codestyle fixes.
- Add overloaded strndup() for debug - curl_dbg_strndup().
- Update tests.

Closes #6524
21 files changed:
docs/cmdline-opts/aws-sigv4.d
docs/libcurl/opts/CURLOPT_AWS_SIGV4.3
include/curl/curl.h
lib/http_aws_sigv4.c
lib/setopt.c
lib/urldata.h
src/tool_cfgable.c
src/tool_cfgable.h
src/tool_getparam.c
src/tool_help.c
src/tool_operate.c
tests/data/Makefile.inc
tests/data/test1933
tests/data/test1934 [new file with mode: 0644]
tests/data/test1935 [new file with mode: 0644]
tests/data/test1936 [new file with mode: 0644]
tests/libtest/Makefile.inc
tests/libtest/lib1933.c
tests/libtest/lib1934.c [new file with mode: 0644]
tests/libtest/lib1935.c [new file with mode: 0644]
tests/libtest/lib1936.c [new file with mode: 0644]