Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
CURL.SetOptionAWSSigV4
Provides AWS V4 signature authentication on HTTP(S) header.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "CURL.SetOptionAWSSigV4"; curl; value ) More
Parameters
Parameter | Description | Example |
---|---|---|
curl | The CURL session handle. | $curl |
value | The new setting. | "aws:amz" |
Result
Returns OK or error.
Description
Provides AWS V4 signature authentication on HTTP(S) header.Pass a text that is the collection of specific arguments are used for creating outgoing authentication headers. The format of the param option is:
provider1[:provider2[:region[:service]]]
provider1, provider2:
The providers arguments are used for generating some authentication parameters such as "Algorithm", "date", "request type" and "signed headers".
region:
The argument is a geographic area of a resources collection. It is extracted from the host name specified in the URL if omitted.
service:
The argument is a function provided by a cloud. It is extracted from the host name specified in the URL if omitted.
Note: This call set CURLOPT_HTTPAUTH to CURLAUTH_AWS_SIGV4. Calling CURLOPT_HTTPAUTH with CURLAUTH_AWS_SIGV4 is the same as calling this with "aws:amz" in parameter.
Example with "Test:Try", when curl will do the algorithm, it will generate "TEST-HMAC-SHA256" for "Algorithm", "x-try-date" and "X-Try-Date" for "date", "test4_request" for "request type", "SignedHeaders=content-type;host;x-try-date" for "signed headers"
If you use just "test", instead of "test:try", test will be use for every strings generated
By default, the value of this parameter is empty. Calling CURLOPT_HTTPAUTH with CURLAUTH_AWS_SIGV4 is the same as calling this with "aws:amz" in parameter.
See also AWS_SIGV4 option in CURL manual.
See also
Blog Entries
Created 3th February 2021, last changed 3th February 2021
CURL.SetMultiOptionPipelining - CURL.SetOptionAbstractUnixSocket