diff --git a/source/include/sigv4.h b/source/include/sigv4.h index 2bcbb543..208ef05b 100644 --- a/source/include/sigv4.h +++ b/source/include/sigv4.h @@ -169,7 +169,10 @@ typedef enum SigV4Status /** * @brief The maximum number of query parameters was exceeded while parsing - * the query string input parameter. + * the query string passed to the library. + * The maximum number of supported query parameters can be configured + * with the SIGV4_MAX_QUERY_PAIR_COUNT macro in the library config file + * passed by the application. * * Functions that may return this value: * - #SigV4_GenerateHTTPAuthorization diff --git a/source/sigv4.c b/source/sigv4.c index 9987cd27..1fc3e8b4 100644 --- a/source/sigv4.c +++ b/source/sigv4.c @@ -1159,6 +1159,8 @@ static SigV4Status_t generateCredentialScope( const SigV4Parameters_t * pSigV4Pa return hexChar; } +/*-----------------------------------------------------------*/ + static size_t writeHexCodeOfChar( char * pBuffer, size_t bufferLen, char code ) @@ -1173,6 +1175,8 @@ static SigV4Status_t generateCredentialScope( const SigV4Parameters_t * pSigV4Pa return URI_ENCODED_SPECIAL_CHAR_SIZE; } +/*-----------------------------------------------------------*/ + static size_t writeDoubleEncodedEquals( char * pBuffer, size_t bufferLen ) { @@ -1188,6 +1192,8 @@ static SigV4Status_t generateCredentialScope( const SigV4Parameters_t * pSigV4Pa return URI_DOUBLE_ENCODED_EQUALS_CHAR_SIZE; } +/*-----------------------------------------------------------*/ + static SigV4Status_t encodeURI( const char * pUri, size_t uriLen, char * pCanonicalURI, @@ -1334,6 +1340,7 @@ static SigV4Status_t generateCredentialScope( const SigV4Parameters_t * pSigV4Pa } /*-----------------------------------------------------------*/ + static bool isTrimmableSpace( const char * value, size_t index, size_t valLen, @@ -1764,6 +1771,8 @@ static SigV4Status_t generateCredentialScope( const SigV4Parameters_t * pSigV4Pa return returnStatus; } +/*-----------------------------------------------------------*/ + static SigV4Status_t writeValueInCanonicalizedQueryString( char * pBufCur, size_t bufferLen, const char * pValue, @@ -1808,6 +1817,8 @@ static SigV4Status_t generateCredentialScope( const SigV4Parameters_t * pSigV4Pa return returnStatus; } +/*-----------------------------------------------------------*/ + static SigV4Status_t writeCanonicalQueryParameters( CanonicalContext_t * pCanonicalRequest, size_t numberOfParameters ) { @@ -1884,6 +1895,8 @@ static SigV4Status_t generateCredentialScope( const SigV4Parameters_t * pSigV4Pa return returnStatus; } +/*-----------------------------------------------------------*/ + static SigV4Status_t generateCanonicalQuery( const char * pQuery, size_t queryLen, CanonicalContext_t * pCanonicalContext )