Apache2
md_jws.h File Reference

Go to the source code of this file.

Functions

apr_status_t md_jws_get_jwk (md_json_t **pjwk, apr_pool_t *p, struct md_pkey_t *pkey)
 
apr_status_t md_jws_sign (md_json_t **pmsg, apr_pool_t *p, struct md_data_t *payload, md_json_t *prot_fields, struct md_pkey_t *pkey, const char *key_id)
 
apr_status_t md_jws_pkey_thumb (const char **pthumb64, apr_pool_t *p, struct md_pkey_t *pkey)
 
apr_status_t md_jws_hmac (md_json_t **pmsg, apr_pool_t *p, struct md_data_t *payload, md_json_t *prot_fields, const struct md_data_t *hmac_key)
 

Function Documentation

◆ md_jws_get_jwk()

apr_status_t md_jws_get_jwk ( md_json_t **  pjwk,
apr_pool_t p,
struct md_pkey_t pkey 
)

Get the JSON value of the 'jwk' field for the given key.

◆ md_jws_hmac()

apr_status_t md_jws_hmac ( md_json_t **  pmsg,
apr_pool_t p,
struct md_data_t payload,
md_json_t prot_fields,
const struct md_data_t hmac_key 
)

Get the JWS HS256 signed message for given payload and protected fields, using the base64 encoded MAC key.

◆ md_jws_pkey_thumb()

apr_status_t md_jws_pkey_thumb ( const char **  pthumb64,
apr_pool_t p,
struct md_pkey_t pkey 
)

Get the 'Thumbprint' as defined in RFC8555 for the given key in base64 encoding.

◆ md_jws_sign()

apr_status_t md_jws_sign ( md_json_t **  pmsg,
apr_pool_t p,
struct md_data_t payload,
md_json_t prot_fields,
struct md_pkey_t pkey,
const char *  key_id 
)

Get the JWS key signed JSON message with given payload and protected fields, signed using the given key and optional key_id.