|
Rhonabwy
Javascript Object Signing and Encryption (JOSE) library - JWK, JWKS, JWS, JWE and JWT
|
Functions | |
| char * | r_jwk_export_to_json_str (jwk_t *jwk, int pretty) |
| json_t * | r_jwk_export_to_json_t (jwk_t *jwk) |
| gnutls_privkey_t | r_jwk_export_to_gnutls_privkey (jwk_t *jwk) |
| gnutls_pubkey_t | r_jwk_export_to_gnutls_pubkey (jwk_t *jwk, int x5u_flags) |
| gnutls_x509_crt_t | r_jwk_export_to_gnutls_crt (jwk_t *jwk, int x5u_flags) |
| int | r_jwk_export_to_pem_der (jwk_t *jwk, int format, unsigned char *output, size_t *output_len, int x5u_flags) |
| int | r_jwk_export_to_symmetric_key (jwk_t *jwk, unsigned char *key, size_t *key_len) |
| char * | r_jwk_thumbprint (jwk_t *jwk, int hash, int x5u_flags) |
| int | r_jwk_validate_x5c_chain (jwk_t *jwk, int x5u_flags) |
| int | r_jwk_match_json_t (jwk_t *jwk, json_t *j_match) |
| int | r_jwk_match_json_str (jwk_t *jwk, const char *str_match) |
Export a jwk to JSON data, gnutls inner types or PEM/DER
| gnutls_x509_crt_t r_jwk_export_to_gnutls_crt | ( | jwk_t * | jwk, |
| int | x5u_flags ) |
Export a jwk_t into a gnutls_x509_crt_t format the jwt_t must contain a x5c or a x5u property pointing to a certificate
| jwk | the jwk_t * to export |
| x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
| gnutls_privkey_t r_jwk_export_to_gnutls_privkey | ( | jwk_t * | jwk | ) |
| gnutls_pubkey_t r_jwk_export_to_gnutls_pubkey | ( | jwk_t * | jwk, |
| int | x5u_flags ) |
Export a jwk_t into a gnutls_pubkey_t format
| jwk | the jwk_t * to export |
| x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
| char * r_jwk_export_to_json_str | ( | jwk_t * | jwk, |
| int | pretty ) |
| json_t * r_jwk_export_to_json_t | ( | jwk_t * | jwk | ) |
| int r_jwk_export_to_pem_der | ( | jwk_t * | jwk, |
| int | format, | ||
| unsigned char * | output, | ||
| size_t * | output_len, | ||
| int | x5u_flags ) |
Export a jwk_t into a DER or PEM format
| jwk | the jwk_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
|
| int r_jwk_export_to_symmetric_key | ( | jwk_t * | jwk, |
| unsigned char * | key, | ||
| size_t * | key_len ) |
Export a jwk_t into a symmetric key in binary format
| jwk | the jwk_t * to export |
| key | an unsigned char * that will contain the key |
| key_len | the size of key and will be set to the data size that has been written to output |
| int r_jwk_match_json_str | ( | jwk_t * | jwk, |
| const char * | str_match ) |
Search if a jwk matches the given properties
| jwk | the jwk_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 jwk All parameters must match Example, to match a RSA key with alg "RS256", the parameter str_match must contain: {kty: "RSA", alg: "RS256"} To match a RSA key with the kid "1", the parameter str_match must contain: {kty: "RSA", kid: "1"} |
| int r_jwk_match_json_t | ( | jwk_t * | jwk, |
| json_t * | j_match ) |
Search if a jwk matches the given properties
| jwk | the jwk_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 jwk All parameters must match Example, to match a RSA key with alg "RS256", the parameter j_match must contain: {kty: "RSA", alg: "RS256"} To match a RSA key with the kid "1", the parameter j_match must contain: {kty: "RSA", kid: "1"} |
| char * r_jwk_thumbprint | ( | jwk_t * | jwk, |
| int | hash, | ||
| int | x5u_flags ) |
Genrates a thumbprint of a jwk_t based on the RFC 7638
| jwk | the jwk_t * to translate into a thumbprint |
| hash | The hash funtion to use for the thumprint Values available for this parameter are
|
| x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|
| int r_jwk_validate_x5c_chain | ( | jwk_t * | jwk, |
| int | x5u_flags ) |
Verifies the certificate chain in the x5c array or the x5u The x5c chain must be complete up to the root certificate
| jwk | the jwk_t * to verify |
| x5u_flags | Flags to retrieve x5u certificates pointed by x5u if necessary, could be 0 if not needed Flags available are
|