Generates the HTTP Authorization header value.
char * pAuthBuf,
size_t * authBufLen,
char ** pSignature,
size_t * signatureLen );
SigV4Status_t
Return status of the SigV4 Library.
Definition: sigv4.h:142
SigV4Status_t SigV4_GenerateHTTPAuthorization(const SigV4Parameters_t *pParams, char *pAuthBuf, size_t *authBufLen, char **pSignature, size_t *signatureLen)
Generates the HTTP Authorization header value.
Definition: sigv4.c:3186
Complete configurations required for generating "String to Sign" and "Signing Key" values.
Definition: sigv4.h:384
- Note
- The API does not support HTTP headers containing empty HTTP header keys or values.
- Parameters
-
[in] | pParams | Parameters for generating the SigV4 signature. |
[out] | pAuthBuf | Buffer to hold the generated Authorization header value. |
[in,out] | authBufLen | Input: the length of pAuthBuf , output: the length of the authorization value written to the buffer. |
[out] | pSignature | Location of the signature in the authorization string. |
[out] | signatureLen | The length of pSignature . |
- Returns
- SigV4Success if successful, error code otherwise.
Example
char pSigv4Auth[ 2048U ];
size_t sigv4AuthLen = sizeof( pSigv4Auth );
char * signature = NULL;
size_t signatureLen = 0;
{
.pDateIso8601 = pDateISO8601,
.pRegion = AWS_REGION,
.regionLen = strlen( AWS_REGION ),
.pService = AWS_SERVICE_NAME,
.serviceLen = strlen( AWS_SERVICE_NAME ),
.pCryptoInterface = &cryptoInterface,
.pHttpParameters = &sigv4HttpParams
};
{
}
@ SigV4Success
The SigV4 library function completed successfully.
Definition: sigv4.h:150
SigV4Credentials_t * pCredentials
The AccessKeyId, SecretAccessKey, and SecurityToken used to generate the Authorization header.
Definition: sigv4.h:389