Rhonabwy
Javascript Object Signing and Encryption (JOSE) library - JWK, JWKS, JWS, JWE and JWT
Loading...
Searching...
No Matches
JWK Properties

Functions

const char * r_jwk_get_property_str (jwk_t *jwk, const char *key)
 
const char * r_jwk_get_property_array (jwk_t *jwk, const char *key, size_t index)
 
int r_jwk_get_property_array_size (jwk_t *jwk, const char *key)
 
int r_jwk_set_property_str (jwk_t *jwk, const char *key, const char *value)
 
int r_jwk_set_property_array (jwk_t *jwk, const char *key, size_t index, const char *value)
 
int r_jwk_append_property_array (jwk_t *jwk, const char *key, const char *value)
 
int r_jwk_delete_property_str (jwk_t *jwk, const char *key)
 
int r_jwk_delete_property_array_at (jwk_t *jwk, const char *key, size_t index)
 
int r_jwk_append_x5c (jwk_t *jwk, int format, const unsigned char *input, size_t input_len)
 

Detailed Description

read/write/delete jwk properties

Function Documentation

◆ r_jwk_append_property_array()

int r_jwk_append_property_array ( jwk_t * jwk,
const char * key,
const char * value )

Append a property value on an array into a jwk_t

Parameters
jwkthe jwk_t * to update
keythe key of the property to set
valuethe value of the property to set
Returns
RHN_OK on success, an error value on error Logs error message with yder on error

◆ r_jwk_append_x5c()

int r_jwk_append_x5c ( jwk_t * jwk,
int format,
const unsigned char * input,
size_t input_len )

Appends a X509 certificate in the x5c array

Parameters
jwkthe jwk_t * to update
formatthe format of the input, values available are R_FORMAT_PEM or R_FORMAT_DER
inputthe certificate input, must contain the certificate in PEM or DER format
input_lenthe length of the data contained in input
Returns
RHN_OK on success, an error value on error Logs error message with yder on error

◆ r_jwk_delete_property_array_at()

int r_jwk_delete_property_array_at ( jwk_t * jwk,
const char * key,
size_t index )

Delete an array property from a jwk_t

Parameters
jwkthe jwk_t * to update
keythe key of the property to delete
indexthe index of the value to set in the array
Returns
RHN_OK on success, an error value on error Logs error message with yder on error

◆ r_jwk_delete_property_str()

int r_jwk_delete_property_str ( jwk_t * jwk,
const char * key )

Delete a property from a jwk_t

Parameters
jwkthe jwk_t * to update
keythe key of the property to delete
Returns
RHN_OK on success, an error value on error Logs error message with yder on error

◆ r_jwk_get_property_array()

const char * r_jwk_get_property_array ( jwk_t * jwk,
const char * key,
size_t index )

Get a property value of an array from a jwk_t

Parameters
jwkthe jwk_t * to get
keythe key of the property to retrieve
indexthe index of the value to retrieve in the array
Returns
the property value on success, NULL on error

◆ r_jwk_get_property_array_size()

int r_jwk_get_property_array_size ( jwk_t * jwk,
const char * key )

Get the array size of a property from a jwt_t

Parameters
jwkthe jwk_t * to get
keythe key of the property to retrieve
Returns
the size of the array, or -1 if the array does not exist

◆ r_jwk_get_property_str()

const char * r_jwk_get_property_str ( jwk_t * jwk,
const char * key )

Get a property value from a jwk_t

Parameters
jwkthe jwk_t * to get
keythe key of the property to retrieve
Returns
the property value on success, NULL on error

◆ r_jwk_set_property_array()

int r_jwk_set_property_array ( jwk_t * jwk,
const char * key,
size_t index,
const char * value )

Set a property value on an array into a jwk_t

Parameters
jwkthe jwk_t * to update
keythe key of the property to set
indexthe index of the value to set in the array
valuethe value of the property to set
Returns
RHN_OK on success, an error value on error Logs error message with yder on error

◆ r_jwk_set_property_str()

int r_jwk_set_property_str ( jwk_t * jwk,
const char * key,
const char * value )

Set a property value into a jwk_t

Parameters
jwkthe jwk_t * to update
keythe key of the property to set
valuethe value of the property to set
Returns
RHN_OK on success, an error value on error Logs error message with yder on error