Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions inc/libs3.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,18 @@ extern "C" {
#define S3_DEFAULT_REGION "us-east-1"


/**
* Maximal length of AWS access key
*/
#define S3_MAX_ACCESS_KEY_ID_LENGTH 128


/**
* Maximal length of AWS region name
*/
#define S3_MAX_REGION_LENGTH 32


/** **************************************************************************
* Enumerations
************************************************************************** **/
Expand Down
4 changes: 1 addition & 3 deletions inc/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@
#define MAX_CANONICALIZED_RESOURCE_SIZE \
(1 + 255 + 1 + MAX_URLENCODED_KEY_SIZE + (sizeof("?torrent") - 1) + 1)

#define MAX_ACCESS_KEY_ID_LENGTH 32

// Maximum length of a credential string
// <access key>/<yyyymmdd>/<region>/s3/aws4_request
#define MAX_CREDENTIAL_SIZE \
(MAX_ACCESS_KEY_ID_LENGTH + 1) + 8 + 1 + 32 + sizeof("/s3/aws4_request")
(S3_MAX_ACCESS_KEY_ID_LENGTH + 1) + 8 + 1 + S3_MAX_REGION_LENGTH + sizeof("/s3/aws4_request")

// Utilities -----------------------------------------------------------------

Expand Down