Internal definitions for the SigV4 Client Utility Library. More...
Go to the source code of this file.
Data Structures | |
struct | SigV4DateTime_t |
An aggregator representing the individually parsed elements of the user-provided date parameter. This is used to verify the complete date representation, and construct the final ISO 8601 string. More... | |
struct | SigV4String_t |
A library structure holding the string and length values of parameters to be sorted and standardized. This allows for a layer of abstraction during the canonicalization step of the V4 signing process. More... | |
struct | SigV4ConstString_t |
A library structure holding the string and length values of parameters to be sorted and standardized. This allows for a layer of abstraction during the canonicalization step of the V4 signing process. More... | |
struct | SigV4KeyValuePair_t |
A key-value pair data structure that allows for sorting of SigV4 string values using internal comparison functions, and provides additional stability to quickSort(), to comply with Misra rule 21.9. More... | |
struct | CanonicalContext_t |
An aggregator to maintain the internal state of canonicalization during intermediate calculations. More... | |
struct | HmacContext_t |
An aggregator to maintain the internal state of HMAC calculations. More... | |
Macros | |
#define | YEAR_MIN 1900L |
#define | MONTH_ASCII_LEN 3U |
#define | MONTH_NAMES { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" } |
Month name abbreviations for RFC 5322 date parsing. | |
#define | MONTH_DAYS { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } |
Number of days in each respective month. | |
#define | FORMAT_RFC_3339 "%4Y-%2M-%2DT%2h:%2m:%2sZ" |
#define | FORMAT_RFC_3339_LEN sizeof( FORMAT_RFC_3339 ) - 1U |
#define | FORMAT_RFC_5322 "%3*, %2D %3M %4Y %2h:%2m:%2s GMT" |
#define | FORMAT_RFC_5322_LEN sizeof( FORMAT_RFC_5322 ) - 1U |
#define | ISO_YEAR_LEN 4U |
#define | ISO_NON_YEAR_LEN 2U |
#define | ISO_DATE_SCOPE_LEN 8U |
#define | CREDENTIAL_SCOPE_SEPARATOR '/' |
The separator between each component of the credential scope. | |
#define | CREDENTIAL_SCOPE_SEPARATOR_LEN 1U |
#define | CREDENTIAL_SCOPE_TERMINATOR "aws4_request" |
The last component that terminates the credential scope. | |
#define | CREDENTIAL_SCOPE_TERMINATOR_LEN ( sizeof( CREDENTIAL_SCOPE_TERMINATOR ) - 1U ) |
#define | HTTP_EMPTY_PATH "/" |
Default value when HttpParameters_t.pPath == NULL. | |
#define | HTTP_EMPTY_PATH_LEN ( sizeof( HTTP_EMPTY_PATH ) - 1U ) |
#define | URI_ENCODED_SPECIAL_CHAR_SIZE 3U |
#define | URI_DOUBLE_ENCODED_EQUALS_CHAR_SIZE 5U |
#define | LINEFEED_CHAR '\n' |
#define | LINEFEED_CHAR_LEN 1U |
#define | HTTP_REQUEST_LINE_ENDING "\r\n" |
#define | HTTP_REQUEST_LINE_ENDING_LEN ( sizeof( HTTP_REQUEST_LINE_ENDING ) - 1U ) |
#define | SPACE_CHAR ' ' |
#define | SPACE_CHAR_LEN 1U |
#define | S3_SERVICE_NAME "s3" |
#define | S3_SERVICE_NAME_LEN ( sizeof( S3_SERVICE_NAME ) - 1U ) |
#define | SIGV4_HMAC_SIGNING_KEY_PREFIX "AWS4" |
#define | SIGV4_HMAC_SIGNING_KEY_PREFIX_LEN ( sizeof( SIGV4_HMAC_SIGNING_KEY_PREFIX ) - 1U ) |
#define | AUTH_CREDENTIAL_PREFIX "Credential=" |
#define | AUTH_CREDENTIAL_PREFIX_LEN ( sizeof( AUTH_CREDENTIAL_PREFIX ) - 1U ) |
#define | AUTH_SEPARATOR ", " |
#define | AUTH_SEPARATOR_LEN ( sizeof( AUTH_SEPARATOR ) - 1U ) |
#define | AUTH_SIGNED_HEADERS_PREFIX "SignedHeaders=" |
#define | AUTH_SIGNED_HEADERS_PREFIX_LEN ( sizeof( AUTH_SIGNED_HEADERS_PREFIX ) - 1U ) |
#define | AUTH_SIGNATURE_PREFIX "Signature=" |
#define | AUTH_SIGNATURE_PREFIX_LEN ( sizeof( AUTH_SIGNATURE_PREFIX ) - 1U ) |
#define | HMAC_INNER_PAD_BYTE ( 0x36U ) |
#define | HMAC_OUTER_PAD_BYTE ( 0x5CU ) |
#define | LOG_INSUFFICIENT_MEMORY_ERROR(purposeOfWrite, bytesExceeded) |
A helper macro to print insufficient memory errors. More... | |
#define | FLAG_IS_SET(bits, flag) ( ( ( bits ) & ( flag ) ) == ( flag ) ) |
A helper macro to test if a flag is set. | |
#define | isWhitespace(c) ( ( ( c ) == ' ' ) || ( ( c ) == '\t' ) ) |
A helper macro to determine if a character is whitespace. More... | |
Internal definitions for the SigV4 Client Utility Library.
#define YEAR_MIN 1900L |
Earliest year accepted.
#define MONTH_ASCII_LEN 3U |
Length of month abbreviations.
#define FORMAT_RFC_3339 "%4Y-%2M-%2DT%2h:%2m:%2sZ" |
Format string to parse RFC 3339 date.
#define FORMAT_RFC_3339_LEN sizeof( FORMAT_RFC_3339 ) - 1U |
Length of the RFC 3339 format string.
#define FORMAT_RFC_5322 "%3*, %2D %3M %4Y %2h:%2m:%2s GMT" |
Format string to parse RFC 5322 date.
#define FORMAT_RFC_5322_LEN sizeof( FORMAT_RFC_5322 ) - 1U |
Length of the RFC 3339 format string.
#define ISO_YEAR_LEN 4U |
Length of year value in ISO 8601 date.
#define ISO_NON_YEAR_LEN 2U |
Length of non-year values in ISO 8601 date.
#define ISO_DATE_SCOPE_LEN 8U |
Length of date substring used in credential scope.
#define CREDENTIAL_SCOPE_SEPARATOR_LEN 1U |
The length of CREDENTIAL_SCOPE_SEPARATOR.
#define CREDENTIAL_SCOPE_TERMINATOR_LEN ( sizeof( CREDENTIAL_SCOPE_TERMINATOR ) - 1U ) |
The length of CREDENTIAL_SCOPE_TERMINATOR.
#define HTTP_EMPTY_PATH_LEN ( sizeof( HTTP_EMPTY_PATH ) - 1U ) |
The length of HTTP_EMPTY_PATH.
#define URI_ENCODED_SPECIAL_CHAR_SIZE 3U |
The size of an encoded URI special character.
#define URI_DOUBLE_ENCODED_EQUALS_CHAR_SIZE 5U |
The size of the double-encoded "=" character.
#define LINEFEED_CHAR '\n' |
A linefeed character used to build the canonical request.
#define LINEFEED_CHAR_LEN 1U |
The length of LINEFEED_CHAR.
#define HTTP_REQUEST_LINE_ENDING "\r\n" |
The string used in non-canonicalized HTTP headers to separate header entries in HTTP request.
#define HTTP_REQUEST_LINE_ENDING_LEN ( sizeof( HTTP_REQUEST_LINE_ENDING ) - 1U ) |
The length of HTTP_REQUEST_LINE_ENDING.
#define SPACE_CHAR ' ' |
A linefeed character used to build the Authorization header value.
#define SPACE_CHAR_LEN 1U |
The length of SPACE_CHAR.
#define S3_SERVICE_NAME "s3" |
S3 is the only service where the URI must only be encoded once.
#define S3_SERVICE_NAME_LEN ( sizeof( S3_SERVICE_NAME ) - 1U ) |
The length of S3_SERVICE_NAME.
#define SIGV4_HMAC_SIGNING_KEY_PREFIX "AWS4" |
HMAC signing key prefix.
#define SIGV4_HMAC_SIGNING_KEY_PREFIX_LEN ( sizeof( SIGV4_HMAC_SIGNING_KEY_PREFIX ) - 1U ) |
The length of SIGV4_HMAC_SIGNING_KEY_PREFIX.
#define AUTH_CREDENTIAL_PREFIX "Credential=" |
The prefix that goes before the credential value in the Authorization header value.
#define AUTH_CREDENTIAL_PREFIX_LEN ( sizeof( AUTH_CREDENTIAL_PREFIX ) - 1U ) |
The length of AUTH_CREDENTIAL_PREFIX.
#define AUTH_SEPARATOR ", " |
The separator between each component in the Authorization header value.
#define AUTH_SEPARATOR_LEN ( sizeof( AUTH_SEPARATOR ) - 1U ) |
The length of AUTH_SEPARATOR.
#define AUTH_SIGNED_HEADERS_PREFIX "SignedHeaders=" |
The prefix that goes before the signed headers in the Authorization header value.
#define AUTH_SIGNED_HEADERS_PREFIX_LEN ( sizeof( AUTH_SIGNED_HEADERS_PREFIX ) - 1U ) |
The length of AUTH_SIGNED_HEADERS_PREFIX.
#define AUTH_SIGNATURE_PREFIX "Signature=" |
The prefix that goes before the signature in the Authorization header value.
#define AUTH_SIGNATURE_PREFIX_LEN ( sizeof( AUTH_SIGNATURE_PREFIX ) - 1U ) |
The length of AUTH_SIGNATURE_PREFIX.
#define HMAC_INNER_PAD_BYTE ( 0x36U ) |
The "ipad" byte used for generating the inner key in the HMAC calculation process.
#define HMAC_OUTER_PAD_BYTE ( 0x5CU ) |
The "opad" byte used for generating the outer key in the HMAC calculation process.
#define LOG_INSUFFICIENT_MEMORY_ERROR | ( | purposeOfWrite, | |
bytesExceeded | |||
) |
A helper macro to print insufficient memory errors.
#define isWhitespace | ( | c | ) | ( ( ( c ) == ' ' ) || ( ( c ) == '\t' ) ) |
A helper macro to determine if a character is whitespace.
\t
, \n
, \v
, \f
, \r
. However, according to RFC5234: https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1 the only whitespace characters in an HTTP header are spaces and horizontal tabs.