Rhonabwy
Javascript Object Signing and Encryption (JOSE) library - JWK, JWKS, JWS, JWE and JWT
|
Functions | |
int | r_jwks_is_valid (jwks_t *jwks) |
int | r_jwks_import_from_json_str (jwks_t *jwks, const char *input) |
int | r_jwks_import_from_json_t (jwks_t *jwks, json_t *j_input) |
int | r_jwks_import_from_uri (jwks_t *jwks, const char *uri, int x5u_flags) |
jwks_t * | r_jwks_quick_import (rhn_import,...) |
jwks_t * | r_jwks_copy (jwks_t *jwks) |
size_t | r_jwks_size (jwks_t *jwks) |
jwk_t * | r_jwks_get_at (jwks_t *jwks, size_t index) |
jwk_t * | r_jwks_get_by_kid (jwks_t *jwks, const char *kid) |
int | r_jwks_append_jwk (jwks_t *jwks, jwk_t *jwk) |
int | r_jwks_set_at (jwks_t *jwks, size_t index, jwk_t *jwk) |
int | r_jwks_remove_at (jwks_t *jwks, size_t index) |
int | r_jwks_empty (jwks_t *jwks) |
int | r_jwks_equal (jwks_t *jwks1, jwks_t *jwks2) |
char * | r_jwks_export_to_json_str (jwks_t *jwks, int pretty) |
json_t * | r_jwks_export_to_json_t (jwks_t *jwks) |
gnutls_privkey_t * | r_jwks_export_to_gnutls_privkey (jwks_t *jwks, size_t *len) |
gnutls_pubkey_t * | r_jwks_export_to_gnutls_pubkey (jwks_t *jwks, size_t *len, int x5u_flags) |
int | r_jwks_export_to_pem_der (jwks_t *jwks, int format, unsigned char *output, size_t *output_len, int x5u_flags) |
jwks_t * | r_jwks_search_json_t (jwks_t *jwks, json_t *j_match) |
jwks_t * | r_jwks_search_json_str (jwks_t *jwks, const char *str_match) |
Manage JWK sets
Append a jwk_t at the end of the array of jwk_t in the jwks_t
jwks | the jwks_t * to append the jwk_t |
jwk | the jwk_t * to be appended |
Return a copy of the JWKS
jwks | the jwks to copy |
int r_jwks_empty | ( | jwks_t * | jwks | ) |
Empty a JWKS
jwks | the jwks_t * to update |
Compare 2 jwks The key content and order are compared
jwks1 | the first JWKS to compare |
jwks2 | the second JWKS to compare |
gnutls_privkey_t * r_jwks_export_to_gnutls_privkey | ( | jwks_t * | jwks, |
size_t * | len | ||
) |
Export a jwks_t into a gnutls_privkey_t format
jwks | the jwks_t * to export |
len | set the length of the output array |
gnutls_pubkey_t * r_jwks_export_to_gnutls_pubkey | ( | jwks_t * | jwks, |
size_t * | len, | ||
int | x5u_flags | ||
) |
Export a jwks_t into a gnutls_pubkey_t format
jwks | the jwks_t * to export |
len | set the length of the output array |
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
char * r_jwks_export_to_json_str | ( | jwks_t * | jwks, |
int | pretty | ||
) |
Export a jwks_t into a stringified JSON format
jwks | the jwks_t * to export |
pretty | indent or compact JSON output |
json_t * r_jwks_export_to_json_t | ( | jwks_t * | jwks | ) |
Export a jwk_t into a json_t format
jwks | the jwk_t * to export |
int r_jwks_export_to_pem_der | ( | jwks_t * | jwks, |
int | format, | ||
unsigned char * | output, | ||
size_t * | output_len, | ||
int | x5u_flags | ||
) |
Export a jwks_t into a DER or PEM format
jwks | the jwks_t * to export |
format | the format of the output, values available are R_FORMAT_PEM or R_FORMAT_DER |
output | an unsigned char * that will contain the output |
output_len | the size of output and will be set to the data size that has been written to output |
x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
Get the jwk_t at the specified index of the jwks_t *
jwks | the jwks_t * to evaluate |
index | the index of the array to retrieve |
Get the jwk_t at the specified index of the jwks_t *
jwks | the jwks_t * to evaluate |
kid | the key id of the jwk to retreive |
int r_jwks_import_from_json_str | ( | jwks_t * | jwks, |
const char * | input | ||
) |
Import a JWKS in string format into a jwks_t
jwks | the jwk_t * to import to |
input | a JWKS in JSON stringified format If jwks is set, JWK will be appended |
int r_jwks_import_from_json_t | ( | jwks_t * | jwks, |
json_t * | j_input | ||
) |
Import a JWKS in json_t format into a jwk_t
jwks | the jwk_t * to import to |
j_input | a JWK in json_t * format If jwks is set, JWK will be appended |
int r_jwks_import_from_uri | ( | jwks_t * | jwks, |
const char * | uri, | ||
int | x5u_flags | ||
) |
Import a JWKS from an uri
jwks | the jwk_t * to import to |
uri | an uri pointing to a JWKS If jwks is set, JWK will be appended |
x5u_flags | Flags to retrieve x5u certificates Flags available are
|
int r_jwks_is_valid | ( | jwks_t * | jwks | ) |
Check if the jwks is valid
jwks | the jwks_t * to test |
jwks_t * r_jwks_quick_import | ( | rhn_import | type, |
... | |||
) |
Import data into a jwks parameters must be set of values with the mandatory parameters for each rhn_import See rhn_import documentation The parameters list MUST end with R_IMPORT_NONE See rhn_import documentation
int r_jwks_remove_at | ( | jwks_t * | jwks, |
size_t | index | ||
) |
Remove a jwk_t at the specified index of the jwks_t *
jwks | the jwks_t * to evaluate |
index | the index of the array to remove |
Search in a jwks_t for a subset matching the given query
jwks | the jwks_t to look into |
str_match | The query to match. Must be a stringified JSON object with key/values that will be compared against all keys in jwks All parameters must match Example, to look for all RSA keys, the parameter str_match must contain: {kty: "RSA"} To look for all RSA keys with the kid "1", the parameter str_match must contain: {kty: "RSA", kid: "1"} |
Search in a jwks_t for a subset matching the given query
jwks | the jwks_t to look into |
j_match | The query to match. Must be a JSON object with key/values that will be compared against all keys in jwks All parameters must match Example, to look for all RSA keys, the parameter j_match must contain: {kty: "RSA"} To look for all RSA keys with the kid "1", the parameter j_match must contain: {kty: "RSA", kid: "1"} |
Update a jwk_t at the specified index of the jwks_t *
jwks | the jwks_t * to evaluate |
jwk | the jwk_t * to set |
index | the index of the array to update |
size_t r_jwks_size | ( | jwks_t * | jwks | ) |
Get the number of jwk_t in a jwks_t
jwks | the jwks_t * to evaluate |