CJOSE
0.6.0
|
Functions and data structures for interacting with JSON Web Signature (JWS) objects. More...
Go to the source code of this file.
Typedefs | |
typedef struct json_t | cjose_header_t |
Functions | |
cjose_header_t * | cjose_header_new (cjose_err *err) |
cjose_header_t * | cjose_header_retain (cjose_header_t *header) |
void | cjose_header_release (cjose_header_t *header) |
bool | cjose_header_set (cjose_header_t *header, const char *attr, const char *value, cjose_err *err) |
const char * | cjose_header_get (cjose_header_t *header, const char *attr, cjose_err *err) |
bool | cjose_header_set_raw (cjose_header_t *header, const char *attr, const char *value, cjose_err *err) |
char * | cjose_header_get_raw (cjose_header_t *header, const char *attr, cjose_err *err) |
Variables | |
const char * | CJOSE_HDR_ALG |
const char * | CJOSE_HDR_ENC |
const char * | CJOSE_HDR_CTY |
const char * | CJOSE_HDR_KID |
const char * | CJOSE_HDR_EPK |
const char * | CJOSE_HDR_APU |
const char * | CJOSE_HDR_APV |
const char * | CJOSE_HDR_ALG_NONE |
const char * | CJOSE_HDR_ALG_ECDH_ES |
const char * | CJOSE_HDR_ALG_RSA_OAEP |
const char * | CJOSE_HDR_ALG_RSA1_5 |
const char * | CJOSE_HDR_ALG_A128KW |
const char * | CJOSE_HDR_ALG_A192KW |
const char * | CJOSE_HDR_ALG_A256KW |
const char * | CJOSE_HDR_ALG_PS256 |
const char * | CJOSE_HDR_ALG_PS384 |
const char * | CJOSE_HDR_ALG_PS512 |
const char * | CJOSE_HDR_ALG_RS256 |
const char * | CJOSE_HDR_ALG_RS384 |
const char * | CJOSE_HDR_ALG_RS512 |
const char * | CJOSE_HDR_ALG_HS256 |
const char * | CJOSE_HDR_ALG_HS384 |
const char * | CJOSE_HDR_ALG_HS512 |
const char * | CJOSE_HDR_ALG_ES256 |
const char * | CJOSE_HDR_ALG_ES384 |
const char * | CJOSE_HDR_ALG_ES512 |
const char * | CJOSE_HDR_ALG_DIR |
const char * | CJOSE_HDR_ENC_A256GCM |
const char * | CJOSE_HDR_ENC_A128CBC_HS256 |
const char * | CJOSE_HDR_ENC_A192CBC_HS384 |
const char * | CJOSE_HDR_ENC_A256CBC_HS512 |
Functions and data structures for interacting with JSON Web Signature (JWS) objects.
typedef struct json_t cjose_header_t |
An instance of a header object (used when creating JWE/JWS objects).
const char* cjose_header_get | ( | cjose_header_t * | header, |
const char * | attr, | ||
cjose_err * | err | ||
) |
Retrieves the value of the requested header attribute from the header object.
header[in] | a header object. |
attr[in] | the header attribute to be got. |
err | [out] An optional error object which can be used to get additional information in the event of an error. |
char* cjose_header_get_raw | ( | cjose_header_t * | header, |
const char * | attr, | ||
cjose_err * | err | ||
) |
Retrieves the raw value of the requested header attribute from the header object.
header[in] | a header object. |
attr[in] | the header attribute to be got. |
err | [out] An optional error object which can be used to get additional information in the event of an error. |
cjose_header_t* cjose_header_new | ( | cjose_err * | err | ) |
Instsantiates a new header object. Caller is responsible for subsequently releasing the object through cjose_header_release().
err | [out] An optional error object which can be used to get additional information in the event of an error. |
void cjose_header_release | ( | cjose_header_t * | header | ) |
Releases an existing header object. Callers must use this method to dispose of header rather than directly free'ing a cjose_header object.
header[in] | the header object to be released. |
cjose_header_t* cjose_header_retain | ( | cjose_header_t * | header | ) |
Retains an existing header object. Callers must use this method if the header will be used past the scope it was created in (e.g., from a cjose_jws_t
object).
header[in] | the header object to be retained. |
bool cjose_header_set | ( | cjose_header_t * | header, |
const char * | attr, | ||
const char * | value, | ||
cjose_err * | err | ||
) |
Sets a header attribute on a header object. If that header was previously set, this will replace the previous value with the new one.
header[in] | a previously instantiated header object. |
attr[in] | the header attribute to be set. |
value[in] | the value to assign to the header attribute. |
err | [out] An optional error object which can be used to get additional information in the event of an error. |
bool cjose_header_set_raw | ( | cjose_header_t * | header, |
const char * | attr, | ||
const char * | value, | ||
cjose_err * | err | ||
) |
Sets a raw header attribute on a header object. If that header was previously set, this will replace the previous value with the new one. The input value must be a JSON serialized string. This function does not retain pointers to specified attribute or value.
header[in] | a previously instantiated header object. |
attr[in] | the header attribute to be set. |
value[in] | the JSON value to assign to the header attribute. The value must be a valid JSON, and will be assigned as is. |
const char* CJOSE_HDR_ALG |
The JWE algorithm header attribute name.
const char* CJOSE_HDR_ALG_A128KW |
The JWE algorithm attribute value for A128KW, A192KW and A256KW.
const char* CJOSE_HDR_ALG_DIR |
The JWE algorithm attribute value for "dir".
const char* CJOSE_HDR_ALG_ECDH_ES |
The JWE algorithm attribute value of ECDH-ES.
const char* CJOSE_HDR_ALG_ES256 |
The JWS algorithm attribute values for ES256, ES384 and ES512.
const char* CJOSE_HDR_ALG_HS256 |
The JWS algorithm attribute values for HS256, HS384 and HS512.
const char* CJOSE_HDR_ALG_NONE |
The JWA algorithm attribute value for none.
const char* CJOSE_HDR_ALG_PS256 |
The JWS algorithm attribute value for PS256, PS384 and PS512.
const char* CJOSE_HDR_ALG_RS256 |
The JWS algorithm attribute value for RS256, RS384 and RS512.
const char* CJOSE_HDR_ALG_RSA1_5 |
The JWE algorithm attribute value for RSA1_5.
const char* CJOSE_HDR_ALG_RSA_OAEP |
The JWE algorithm attribute value for RSA-OAEP.
const char* CJOSE_HDR_APU |
For ECDH-ES algorithms, the PartyU and PartyV values
const char* CJOSE_HDR_CTY |
The JWE "cty" header attribute.
const char* CJOSE_HDR_ENC |
The JWE content encryption algorithm header attribute name.
const char* CJOSE_HDR_ENC_A128CBC_HS256 |
The JWE content encryption algorithm value for A128CBC-HS256, A192CBC-HS384 and A256CBC-HS512.
const char* CJOSE_HDR_ENC_A256GCM |
The JWE content encryption algorithm value for A256GCM.
const char* CJOSE_HDR_EPK |
The Jose "epk" header attribte.
const char* CJOSE_HDR_KID |
The Jose "kid" header attribute.