Amazon Kinesis Producer C SDK
AwsV4Signer.c File Reference
#include "Include_i.h"
Include dependency graph for AwsV4Signer.c:

Macros

#define LOG_CLASS   "AwsV4Signer"
 

Functions

STATUS generateAwsSigV4Signature (PRequestInfo pRequestInfo, PCHAR dateTimeStr, BOOL authHeaders, PCHAR *ppSigningInfo, PUINT32 pSigningInfoLen)
 
STATUS signAwsRequestInfo (PRequestInfo pRequestInfo)
 Signs a request by appending SigV4 headers. More...
 
STATUS signAwsRequestInfoQueryParam (PRequestInfo pRequestInfo)
 Signs a request by appending SigV4 query param. More...
 
STATUS getCanonicalQueryParams (PCHAR pUrl, UINT32 urlLen, BOOL uriEncode, PCHAR *ppQuery, PUINT32 pQueryLen)
 
STATUS generateCanonicalRequestString (PRequestInfo pRequestInfo, PCHAR pRequestStr, PUINT32 pRequestLen)
 
STATUS generateCanonicalHeaders (PRequestInfo pRequestInfo, PCHAR pCanonicalHeaders, PUINT32 pCanonicalHeadersLen)
 
STATUS generateSignedHeaders (PRequestInfo pRequestInfo, PCHAR pSignedHeaders, PUINT32 pSignedHeadersLen)
 
STATUS generateSignatureDateTime (UINT64 currentTime, PCHAR pDateTimeStr)
 
STATUS generateCredentialScope (PRequestInfo pRequestInfo, PCHAR dateTimeStr, PCHAR pScope, PUINT32 pScopeLen)
 
STATUS generateEncodedCredentials (PRequestInfo pRequestInfo, PCHAR dateTimeStr, PCHAR pCreds, PUINT32 pCredsLen)
 
STATUS getRequestHost (PCHAR pUrl, PCHAR *ppStart, PCHAR *ppEnd)
 Gets a request host string. More...
 
STATUS getCanonicalUri (PCHAR pUrl, UINT32 len, PCHAR *ppStart, PCHAR *ppEnd, PBOOL pDefault)
 
STATUS uriEncodeString (PCHAR pSrc, UINT32 srcLen, PCHAR pDst, PUINT32 pDstLen)
 
STATUS uriDecodeString (PCHAR pSrc, UINT32 srcLen, PCHAR pDst, PUINT32 pDstLen)
 
PCHAR getRequestVerbString (HTTP_REQUEST_VERB verb)
 
STATUS generateRequestHmac (PBYTE key, UINT32 keyLen, PBYTE message, UINT32 messageLen, PBYTE outBuffer, PUINT32 pHmacLen)
 
STATUS hexEncodedSha256 (PBYTE pMessage, UINT32 size, PCHAR pEncodedHash)
 

Macro Definition Documentation

◆ LOG_CLASS

#define LOG_CLASS   "AwsV4Signer"

Kinesis Video Producer AWS V4 Signer functionality

Function Documentation

◆ generateAwsSigV4Signature()

STATUS generateAwsSigV4Signature ( PRequestInfo  pRequestInfo,
PCHAR  dateTimeStr,
BOOL  authHeaders,
PCHAR *  ppSigningInfo,
PUINT32  pSigningInfoLen 
)

Generates the AWS signature.

IMPORTANT: The length of the buffer passed in is not enforced - it's assumed to have been allocated with enough storage from the previous call with NULL param.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateCanonicalHeaders()

STATUS generateCanonicalHeaders ( PRequestInfo  pRequestInfo,
PCHAR  pCanonicalHeaders,
PUINT32  pCanonicalHeadersLen 
)
Here is the caller graph for this function:

◆ generateCanonicalRequestString()

STATUS generateCanonicalRequestString ( PRequestInfo  pRequestInfo,
PCHAR  pRequestStr,
PUINT32  pRequestLen 
)

Create a canonical request string for signing

Info: http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html

Parameters
pRequestInfo
Returns
Status code of the operation
Here is the call graph for this function:
Here is the caller graph for this function:

◆ generateCredentialScope()

STATUS generateCredentialScope ( PRequestInfo  pRequestInfo,
PCHAR  dateTimeStr,
PCHAR  pScope,
PUINT32  pScopeLen 
)
Here is the caller graph for this function:

◆ generateEncodedCredentials()

STATUS generateEncodedCredentials ( PRequestInfo  pRequestInfo,
PCHAR  dateTimeStr,
PCHAR  pCreds,
PUINT32  pCredsLen 
)
Here is the caller graph for this function:

◆ generateRequestHmac()

STATUS generateRequestHmac ( PBYTE  key,
UINT32  keyLen,
PBYTE  message,
UINT32  messageLen,
PBYTE  outBuffer,
PUINT32  pHmacLen 
)
Here is the caller graph for this function:

◆ generateSignatureDateTime()

STATUS generateSignatureDateTime ( UINT64  currentTime,
PCHAR  pDateTimeStr 
)
Here is the caller graph for this function:

◆ generateSignedHeaders()

STATUS generateSignedHeaders ( PRequestInfo  pRequestInfo,
PCHAR  pSignedHeaders,
PUINT32  pSignedHeadersLen 
)
Here is the caller graph for this function:

◆ getCanonicalQueryParams()

STATUS getCanonicalQueryParams ( PCHAR  pUrl,
UINT32  urlLen,
BOOL  uriEncode,
PCHAR *  ppQuery,
PUINT32  pQueryLen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCanonicalUri()

STATUS getCanonicalUri ( PCHAR  pUrl,
UINT32  len,
PCHAR *  ppStart,
PCHAR *  ppEnd,
PBOOL  pDefault 
)
Here is the caller graph for this function:

◆ getRequestVerbString()

PCHAR getRequestVerbString ( HTTP_REQUEST_VERB  verb)
Here is the caller graph for this function:

◆ hexEncodedSha256()

STATUS hexEncodedSha256 ( PBYTE  pMessage,
UINT32  size,
PCHAR  pEncodedHash 
)
Here is the caller graph for this function:

◆ uriDecodeString()

STATUS uriDecodeString ( PCHAR  pSrc,
UINT32  srcLen,
PCHAR  pDst,
PUINT32  pDstLen 
)

◆ uriEncodeString()

STATUS uriEncodeString ( PCHAR  pSrc,
UINT32  srcLen,
PCHAR  pDst,
PUINT32  pDstLen 
)
Here is the caller graph for this function: