Please, help us to better serve our user community by answering the following short survey: https://www.hdfgroup.org/website-survey/
HDF5 1.14.6.08405a5
API Reference
Loading...
Searching...
No Matches
H5FDs3comms.h File Reference
#include "H5private.h"
#include <curl/curl.h>
#include <openssl/evp.h>
#include <openssl/hmac.h>
#include <openssl/sha.h>

Data Structures

struct  hrb_node_t
 
struct  hrb_t
 
struct  parsed_url_t
 
struct  s3r_t
 

Macros

#define EMPTY_SHA256   "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
 
#define ISO8601_SIZE   17
 
#define RFC7231_SIZE   30
 
#define ISO8601NOW(dest, now_gm)   strftime((dest), ISO8601_SIZE, "%Y%m%dT%H%M%SZ", (now_gm))
 
#define RFC7231NOW(dest, now_gm)   strftime((dest), RFC7231_SIZE, "%a, %d %b %Y %H:%M:%S GMT", (now_gm))
 
#define S3COMMS_MAX_CREDENTIAL_SIZE   155
 
#define S3COMMS_FORMAT_CREDENTIAL(dest, access, iso8601_date, region, service)
 

Functions

herr_t H5FD_s3comms_hrb_node_set (hrb_node_t **L, const char *name, const char *value)
 
herr_t H5FD_s3comms_hrb_destroy (hrb_t **buf)
 
hrb_tH5FD_s3comms_hrb_init_request (const char *verb, const char *resource, const char *host)
 
herr_t H5FD_s3comms_s3r_close (s3r_t *handle)
 
size_t H5FD_s3comms_s3r_get_filesize (s3r_t *handle)
 
s3r_tH5FD_s3comms_s3r_open (const char url[], const char region[], const char id[], const unsigned char signing_key[], const char token[])
 
herr_t H5FD_s3comms_s3r_read (s3r_t *handle, haddr_t offset, size_t len, void *dest)
 
struct tm * gmnow (void)
 
herr_t H5FD_s3comms_aws_canonical_request (char *canonical_request_dest, int cr_size, char *signed_headers_dest, int sh_size, hrb_t *http_request)
 
herr_t H5FD_s3comms_bytes_to_hex (char *dest, const unsigned char *msg, size_t msg_len, bool lowercase)
 
herr_t H5FD_s3comms_free_purl (parsed_url_t *purl)
 
herr_t H5FD_s3comms_HMAC_SHA256 (const unsigned char *key, size_t key_len, const char *msg, size_t msg_len, char *dest)
 
herr_t H5FD_s3comms_load_aws_profile (const char *name, char *key_id_out, char *secret_access_key_out, char *aws_region_out)
 
herr_t H5FD_s3comms_parse_url (const char *str, parsed_url_t **purl)
 
herr_t H5FD_s3comms_signing_key (unsigned char *md, const char *secret, const char *region, const char *iso8601now)
 
herr_t H5FD_s3comms_tostringtosign (char *dest, const char *req_str, const char *now, const char *region)
 

Macro Definition Documentation

◆ EMPTY_SHA256

#define EMPTY_SHA256   "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

◆ ISO8601_SIZE

#define ISO8601_SIZE   17

◆ ISO8601NOW

#define ISO8601NOW (   dest,
  now_gm 
)    strftime((dest), ISO8601_SIZE, "%Y%m%dT%H%M%SZ", (now_gm))

◆ RFC7231_SIZE

#define RFC7231_SIZE   30

◆ RFC7231NOW

#define RFC7231NOW (   dest,
  now_gm 
)    strftime((dest), RFC7231_SIZE, "%a, %d %b %Y %H:%M:%S GMT", (now_gm))

◆ S3COMMS_FORMAT_CREDENTIAL

#define S3COMMS_FORMAT_CREDENTIAL (   dest,
  access,
  iso8601_date,
  region,
  service 
)
Value:
snprintf((dest), S3COMMS_MAX_CREDENTIAL_SIZE, "%s/%s/%s/%s/aws4_request", (access), (iso8601_date), \
(region), (service))
#define S3COMMS_MAX_CREDENTIAL_SIZE
Definition H5FDs3comms.h:123

◆ S3COMMS_MAX_CREDENTIAL_SIZE

#define S3COMMS_MAX_CREDENTIAL_SIZE   155

Function Documentation

◆ gmnow()

struct tm * gmnow ( void  )

◆ H5FD_s3comms_aws_canonical_request()

herr_t H5FD_s3comms_aws_canonical_request ( char *  canonical_request_dest,
int  cr_size,
char *  signed_headers_dest,
int  sh_size,
hrb_t http_request 
)

◆ H5FD_s3comms_bytes_to_hex()

herr_t H5FD_s3comms_bytes_to_hex ( char *  dest,
const unsigned char *  msg,
size_t  msg_len,
bool  lowercase 
)

◆ H5FD_s3comms_free_purl()

herr_t H5FD_s3comms_free_purl ( parsed_url_t purl)

◆ H5FD_s3comms_HMAC_SHA256()

herr_t H5FD_s3comms_HMAC_SHA256 ( const unsigned char *  key,
size_t  key_len,
const char *  msg,
size_t  msg_len,
char *  dest 
)

◆ H5FD_s3comms_hrb_destroy()

herr_t H5FD_s3comms_hrb_destroy ( hrb_t **  buf)

◆ H5FD_s3comms_hrb_init_request()

hrb_t * H5FD_s3comms_hrb_init_request ( const char *  verb,
const char *  resource,
const char *  host 
)

◆ H5FD_s3comms_hrb_node_set()

herr_t H5FD_s3comms_hrb_node_set ( hrb_node_t **  L,
const char *  name,
const char *  value 
)

◆ H5FD_s3comms_load_aws_profile()

herr_t H5FD_s3comms_load_aws_profile ( const char *  name,
char *  key_id_out,
char *  secret_access_key_out,
char *  aws_region_out 
)

◆ H5FD_s3comms_parse_url()

herr_t H5FD_s3comms_parse_url ( const char *  str,
parsed_url_t **  purl 
)

◆ H5FD_s3comms_s3r_close()

herr_t H5FD_s3comms_s3r_close ( s3r_t handle)

◆ H5FD_s3comms_s3r_get_filesize()

size_t H5FD_s3comms_s3r_get_filesize ( s3r_t handle)

◆ H5FD_s3comms_s3r_open()

s3r_t * H5FD_s3comms_s3r_open ( const char  url[],
const char  region[],
const char  id[],
const unsigned char  signing_key[],
const char  token[] 
)

◆ H5FD_s3comms_s3r_read()

herr_t H5FD_s3comms_s3r_read ( s3r_t handle,
haddr_t  offset,
size_t  len,
void *  dest 
)

◆ H5FD_s3comms_signing_key()

herr_t H5FD_s3comms_signing_key ( unsigned char *  md,
const char *  secret,
const char *  region,
const char *  iso8601now 
)

◆ H5FD_s3comms_tostringtosign()

herr_t H5FD_s3comms_tostringtosign ( char *  dest,
const char *  req_str,
const char *  now,
const char *  region 
)