33 #include "rhonabwy-cfg.h" 37 #include <gnutls/gnutls.h> 38 #include <nettle/version.h> 48 #define RHN_ERROR_MEMORY 2 49 #define RHN_ERROR_PARAM 3 50 #define RHN_ERROR_UNSUPPORTED 4 51 #define RHN_ERROR_INVALID 5 53 #define R_X509_TYPE_UNSPECIFIED 0 54 #define R_X509_TYPE_PUBKEY 1 55 #define R_X509_TYPE_PRIVKEY 2 56 #define R_X509_TYPE_CERTIFICATE 3 58 #define R_FORMAT_PEM 0 59 #define R_FORMAT_DER 1 61 #define R_KEY_TYPE_NONE 0x00000000 62 #define R_KEY_TYPE_PUBLIC 0x00000001 63 #define R_KEY_TYPE_PRIVATE 0x00000010 64 #define R_KEY_TYPE_SYMMETRIC 0x00000100 65 #define R_KEY_TYPE_RSA 0x00001000 66 #define R_KEY_TYPE_EC 0x00010000 67 #define R_KEY_TYPE_HMAC 0x00100000 68 #define R_KEY_TYPE_EDDSA 0x01000000 69 #define R_KEY_TYPE_ECDH 0x10000000 71 #define R_FLAG_IGNORE_SERVER_CERTIFICATE 0x00000001 72 #define R_FLAG_FOLLOW_REDIRECT 0x00000010 73 #define R_FLAG_IGNORE_REMOTE 0x00000100 75 #define R_JWT_TYPE_NONE 0 76 #define R_JWT_TYPE_SIGN 1 77 #define R_JWT_TYPE_ENCRYPT 2 78 #define R_JWT_TYPE_NESTED_SIGN_THEN_ENCRYPT 3 79 #define R_JWT_TYPE_NESTED_ENCRYPT_THEN_SIGN 4 81 #define R_JWT_CLAIM_NOW -1 82 #define R_JWT_CLAIM_PRESENT -2 84 #define R_JWK_THUMB_SHA256 0 85 #define R_JWK_THUMB_SHA384 1 86 #define R_JWK_THUMB_SHA512 2 88 #define R_JSON_MODE_COMPACT 0 89 #define R_JSON_MODE_GENERAL 1 90 #define R_JSON_MODE_FLATTENED 2 92 #define R_PARSE_NONE 0 93 #define R_PARSE_HEADER_JWK 1 94 #define R_PARSE_HEADER_JKU 2 95 #define R_PARSE_HEADER_X5C 4 96 #define R_PARSE_HEADER_X5U 8 97 #define R_PARSE_HEADER_ALL (R_PARSE_HEADER_JWK|R_PARSE_HEADER_JKU|R_PARSE_HEADER_X5C|R_PARSE_HEADER_X5U) 98 #define R_PARSE_UNSIGNED 16 99 #define R_PARSE_ALL (R_PARSE_HEADER_ALL|R_PARSE_UNSIGNED) 115 #define RHONABWY_INTEGER_FORMAT JSON_INTEGER_FORMAT 482 int r_jwk_key_type(jwk_t * jwk,
unsigned int * bits,
int x5u_flags);
517 int r_jwk_generate_key_pair(jwk_t * jwk_privkey, jwk_t * jwk_pubkey,
int type,
unsigned int bits,
const char * kid);
613 int r_jwk_append_x5c(jwk_t * jwk,
int format,
const unsigned char * input,
size_t input_len);
837 int r_jwk_export_to_pem_der(jwk_t * jwk,
int format,
unsigned char * output,
size_t * output_len,
int x5u_flags);
1027 int r_jwks_set_at(jwks_t * jwks,
size_t index, jwk_t * jwk);
1106 int r_jwks_export_to_pem_der(jwks_t * jwks,
int format,
unsigned char * output,
size_t * output_len,
int x5u_flags);
1330 int r_jws_add_keys_pem_der(
jws_t * jws,
int format,
const unsigned char * privkey,
size_t privkey_len,
const unsigned char * pubkey,
size_t pubkey_len);
1392 int r_jws_parsen(
jws_t * jws,
const char * jws_str,
size_t jws_str_len,
int x5u_flags);
2085 int r_jwe_add_keys_pem_der(
jwe_t * jwe,
int format,
const unsigned char * privkey,
size_t privkey_len,
const unsigned char * pubkey,
size_t pubkey_len);
2254 int r_jwe_parsen(
jwe_t * jwe,
const char * jwe_str,
size_t jwe_str_len,
int x5u_flags);
2870 int r_jwt_add_sign_keys_pem_der(
jwt_t * jwt,
int format,
const unsigned char * privkey,
size_t privkey_len,
const unsigned char * pubkey,
size_t pubkey_len);
2954 int r_jwt_add_enc_keys_pem_der(
jwt_t * jwt,
int format,
const unsigned char * privkey,
size_t privkey_len,
const unsigned char * pubkey,
size_t pubkey_len);
3165 char *
r_jwt_serialize_nested(
jwt_t * jwt,
unsigned int type, jwk_t * sign_key,
int sign_key_x5u_flags, jwk_t * encrypt_key,
int encrypt_key_x5u_flags);
3200 int r_jwt_parsen(
jwt_t * jwt,
const char * token,
size_t token_len,
int x5u_flags);
3518 #ifndef DOXYGEN_SHOULD_SKIP_THIS 3541 int _r_deflate_payload(
const unsigned char * uncompressed,
size_t uncompressed_len,
unsigned char ** compressed,
size_t * compressed_len);
3543 int _r_inflate_payload(
const unsigned char * compressed,
size_t compressed_len,
unsigned char ** uncompressed,
size_t * uncompressed_len);
3551 #endif // __RHONABWY_H_ int r_jwt_set_enc_alg(jwt_t *jwt, jwa_alg alg)
Definition: jwt.c:834
int r_jwk_extract_pubkey(jwk_t *jwk_privkey, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jwk.c:834
Definition: rhonabwy.h:171
int r_jwt_set_claim_int_value(jwt_t *jwt, const char *key, rhn_int_t i_value)
Definition: jwt.c:204
Encryption algorithm, following parameter must be a jwa_enc value.
Definition: rhonabwy.h:198
const unsigned char * r_jwe_get_aad(jwe_t *jwe, size_t *aad_len)
Definition: jwe.c:2973
jwks_t * r_jwks_copy(jwks_t *jwks)
Definition: jwks.c:97
int r_jws_set_properties(jws_t *jws,...)
Definition: jws.c:2043
const char * r_jwe_get_header_str_value(jwe_t *jwe, const char *key)
Definition: jwe.c:3107
jwe_t * r_jwe_quick_parsen(const char *jwe_str, size_t jwe_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:4120
jwks_t * jwks_pubkey_enc
Definition: rhonabwy.h:300
int r_jws_set_header_json_t_value(jws_t *jws, const char *key, json_t *j_value)
Definition: jws.c:1074
Private key in PEM or DER format to sign the token, following parameter must be R_FORMAT_PEM or R_FOR...
Definition: rhonabwy.h:208
int r_jwks_empty(jwks_t *jwks)
Definition: jwks.c:144
int r_jwe_add_jwks(jwe_t *jwe, jwks_t *jwks_privkey, jwks_t *jwks_pubkey)
Definition: jwe.c:3184
int r_jws_add_keys_pem_der(jws_t *jws, int format, const unsigned char *privkey, size_t privkey_len, const unsigned char *pubkey, size_t pubkey_len)
Definition: jws.c:1262
JSON value to set the entire claims, following parameter must be json_t * j_value.
Definition: rhonabwy.h:195
jwa_alg r_str_to_jwa_alg(const char *alg)
Definition: misc.c:424
Definition: rhonabwy.h:136
int r_jwe_set_enc(jwe_t *jwe, jwa_enc enc)
Definition: jwe.c:3041
jwks_t * r_jwks_search_json_t(jwks_t *jwks, json_t *j_match)
Definition: jwks.c:471
Import from a json_t *, following parameter must be a const json_t * value.
Definition: rhonabwy.h:232
Definition: rhonabwy.h:126
int _r_inflate_payload(const unsigned char *compressed, size_t compressed_len, unsigned char **uncompressed, size_t *uncompressed_len)
Definition: misc.c:382
Definition: rhonabwy.h:119
Private key in GnuTLS format to decrypt the token, following parameter must be a gnutls_privkey_t val...
Definition: rhonabwy.h:223
json_t jwk_t
Definition: rhonabwy.h:111
int r_jwt_generate_enc_cypher_key(jwt_t *jwt)
Definition: jwt.c:901
Definition: rhonabwy.h:175
Public key in stringified JSON format to encrypt the token, following parameter must be a const char ...
Definition: rhonabwy.h:219
rhn_import
Definition: rhonabwy.h:229
Claims Integer value, following parameters must be const char * name, int i_value.
Definition: rhonabwy.h:192
json_t * r_jwk_export_to_json_t(jwk_t *jwk)
Definition: jwk.c:1780
int r_jwt_add_enc_jwks(jwt_t *jwt, jwks_t *jwks_privkey, jwks_t *jwks_pubkey)
Definition: jwt.c:584
rhn_int_t r_jwe_get_header_int_value(jwe_t *jwe, const char *key)
Definition: jwe.c:3114
jwt_t * r_jwt_quick_parsen(const char *token, size_t token_len, uint32_t parse_flags, int x5u_flags)
Definition: jwt.c:1316
jwks_t * r_jws_get_jwks_privkey(jws_t *jws)
Definition: jws.c:1365
jwks_t * r_jwe_get_jwks_privkey(jwe_t *jwe)
Definition: jwe.c:3398
int _r_json_set_str_value(json_t *j_json, const char *key, const char *str_value)
Definition: misc.c:192
int r_jwe_advanced_compact_parse(jwe_t *jwe, const char *jwe_str, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:3873
jwks_t * jwks_pubkey
Definition: rhonabwy.h:251
json_t * j_header
Definition: rhonabwy.h:265
json_t jwks_t
Definition: rhonabwy.h:112
rhn_opt
Definition: rhonabwy.h:180
int r_jwk_import_from_json_t(jwk_t *jwk, json_t *j_input)
Definition: jwk.c:902
Public key set in JWKS format to encrypt the token, following parameter must be a jwks_t * value...
Definition: rhonabwy.h:216
rhn_int_t r_jwt_get_claim_int_value(jwt_t *jwt, const char *key)
Definition: jwt.c:227
Definition: rhonabwy.h:150
int r_jwks_import_from_uri(jwks_t *jwks, const char *uri, int x5u_flags)
Definition: jwks.c:310
Definition: rhonabwy.h:173
Definition: rhonabwy.h:160
char * r_jws_get_full_header_str(jws_t *jws)
Definition: jws.c:1117
Additional Authenticated Data (AAD) for data encryption, following parameters must be const unsigned ...
Definition: rhonabwy.h:202
int r_jwk_import_from_symmetric_key(jwk_t *jwk, const unsigned char *key, size_t key_len)
Definition: jwk.c:1653
Definition: rhonabwy.h:165
char * r_jwe_serialize(jwe_t *jwe, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jwe.c:4247
jwks_t * r_jwt_get_enc_jwks_privkey(jwt_t *jwt)
Definition: jwt.c:798
int r_jwt_set_properties(jwt_t *jwt,...)
Definition: jwt.c:2161
Definition: rhonabwy.h:158
Definition: rhonabwy.h:163
int r_jwk_append_property_array(jwk_t *jwk, const char *key, const char *value)
Definition: jwk.c:2579
int r_jwe_generate_cypher_key(jwe_t *jwe)
Definition: jwe.c:2863
int r_jwk_append_x5c(jwk_t *jwk, int format, const unsigned char *input, size_t input_len)
Definition: jwk.c:2623
int r_jwe_advanced_compact_parsen(jwe_t *jwe, const char *jwe_str, size_t jwe_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:3877
unsigned char * auth_tag_b64url
Definition: rhonabwy.h:264
int r_jwks_export_to_pem_der(jwks_t *jwks, int format, unsigned char *output, size_t *output_len, int x5u_flags)
Definition: jwks.c:221
Definition: rhonabwy.h:139
json_t * r_jwks_export_to_json_t(jwks_t *jwks)
Definition: jwks.c:169
int r_jwe_add_keys_json_t(jwe_t *jwe, json_t *privkey, json_t *pubkey)
Definition: jwe.c:3256
int r_jwe_compact_parse(jwe_t *jwe, const char *jwe_str, int x5u_flags)
Definition: jwe.c:3869
size_t r_jwks_size(jwks_t *jwks)
Definition: jwks.c:68
Definition: rhonabwy.h:132
json_t * r_library_info_json_t(void)
Definition: misc.c:644
uint32_t parse_flags
Definition: rhonabwy.h:285
int r_jwt_generate_iv(jwt_t *jwt)
int r_jwt_parse_unsecure(jwt_t *jwt, const char *token, int x5u_flags)
Definition: jwt.c:1198
int r_jws_parse_json_t(jws_t *jws, json_t *jws_json, int x5u_flags)
Definition: jws.c:1543
int r_jws_parse_unsecure(jws_t *jws, const char *jws_str, int x5u_flags)
Definition: jws.c:1389
json_t * j_claims
Definition: rhonabwy.h:287
int r_jwks_init(jwks_t **jwks)
Definition: jwks.c:30
size_t key_len
Definition: rhonabwy.h:294
int r_jwe_decrypt_payload(jwe_t *jwe)
Definition: jwe.c:3578
json_t * r_jwe_serialize_json_t(jwe_t *jwe, jwks_t *jwks_pubkey, int x5u_flags, int mode)
Definition: jwe.c:4312
int r_jwt_advanced_parsen(jwt_t *jwt, const char *token, size_t token_len, uint32_t parse_flags, int x5u_flags)
Definition: jwt.c:1206
int r_jwk_is_valid_x5u(jwk_t *jwk, int x5u_flags)
Definition: jwk.c:403
int r_jwt_set_full_claims_json_str(jwt_t *jwt, const char *str_claims)
Definition: jwt.c:267
int r_jws_advanced_parsen_json_str(jws_t *jws, const char *jws_json_str, size_t jws_json_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1566
json_t * j_header
Definition: rhonabwy.h:248
int r_jws_parsen_unsecure(jws_t *jws, const char *jws_str, size_t jws_str_len, int x5u_flags)
Definition: jws.c:1393
Public key in stringified JSON format to verify the token signature, following parameter must be a co...
Definition: rhonabwy.h:213
unsigned char * payload
Definition: rhonabwy.h:252
int r_jwe_set_alg(jwe_t *jwe, jwa_alg alg)
Definition: jwe.c:3022
int r_jwe_set_payload(jwe_t *jwe, const unsigned char *payload, size_t payload_len)
Definition: jwe.c:2793
int r_jwe_set_full_unprotected_header_json_t(jwe_t *jwe, json_t *j_unprotected_header)
Definition: jwe.c:4489
int r_jwt_add_enc_keys_pem_der(jwt_t *jwt, int format, const unsigned char *privkey, size_t privkey_len, const unsigned char *pubkey, size_t pubkey_len)
Definition: jwt.c:695
int r_jwe_advanced_parse(jwe_t *jwe, const char *jwe_str, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:3838
char * r_jwt_serialize_encrypted(jwt_t *jwt, jwk_t *pubkey, int x5u_flags)
Definition: jwt.c:1055
int r_jwk_validate_x5c_chain(jwk_t *jwk, int x5u_flags)
Definition: jwk.c:2759
int r_jwk_generate_key_pair(jwk_t *jwk_privkey, jwk_t *jwk_pubkey, int type, unsigned int bits, const char *kid)
Definition: jwk.c:487
jwa_alg
Definition: rhonabwy.h:117
int r_jwe_add_key_symmetric(jwe_t *jwe, const unsigned char *key, size_t key_len)
Definition: jwe.c:3373
jwa_alg r_jwt_get_enc_alg(jwt_t *jwt)
Definition: jwt.c:846
int r_jwt_set_header_int_value(jwt_t *jwt, const char *key, rhn_int_t i_value)
Definition: jwt.c:144
Private key set in JWKS format to decrypt the token, following parameter must be a jwks_t * value...
Definition: rhonabwy.h:222
void r_global_close(void)
Definition: misc.c:59
int r_jwe_advanced_parsen_json_str(jwe_t *jwe, const char *jwe_json_str, size_t jwe_json_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:3974
int r_jwe_set_full_header_json_t(jwe_t *jwe, json_t *j_header)
Definition: jwe.c:4443
Definition: rhonabwy.h:130
jwa_alg alg
Definition: rhonabwy.h:267
char * r_library_info_json_str(void)
Definition: misc.c:703
gnutls_pubkey_t * r_jwks_export_to_gnutls_pubkey(jwks_t *jwks, size_t *len, int x5u_flags)
Definition: jwks.c:199
int r_jwk_set_property_array(jwk_t *jwk, const char *key, size_t index, const char *value)
Definition: jwk.c:2555
char * r_jwt_get_full_claims_str(jwt_t *jwt)
Definition: jwt.c:248
gnutls_cipher_algorithm_t _r_get_alg_from_enc(jwa_enc enc)
Definition: misc.c:306
jwa_alg r_jwe_get_alg(jwe_t *jwe)
Definition: jwe.c:3033
unsigned char * key
Definition: rhonabwy.h:273
size_t _r_get_key_size(jwa_enc enc)
Definition: misc.c:280
int r_jwt_add_sign_key_symmetric(jwt_t *jwt, const unsigned char *key, size_t key_len)
Definition: jwt.c:517
char * r_jwe_serialize_json_str(jwe_t *jwe, jwks_t *jwks_pubkey, int x5u_flags, int mode)
Definition: jwe.c:4305
jwk_t * r_jwks_get_by_kid(jwks_t *jwks, const char *kid)
Definition: jwks.c:84
const char * r_jws_get_kid(jws_t *jws)
Definition: jws.c:1036
Definition: rhonabwy.h:166
int r_jwk_import_from_json_str(jwk_t *jwk, const char *input)
Definition: jwk.c:885
const unsigned char * r_jwe_get_cypher_key(jwe_t *jwe, size_t *key_len)
Definition: jwe.c:2853
Definition: rhonabwy.h:125
Public key in JWK format to verify the token signature, following parameter must be a jwk_t * value...
Definition: rhonabwy.h:209
Definition: rhonabwy.h:122
int r_jwe_add_keys(jwe_t *jwe, jwk_t *jwk_privkey, jwk_t *jwk_pubkey)
Definition: jwe.c:3158
int r_jws_advanced_compact_parse(jws_t *jws, const char *jws_str, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1449
Import from an URL pointing to a x5u, following parameters must be x5u_flags (R_FLAG_IGNORE_SERVER_CE...
Definition: rhonabwy.h:238
Header JSON value, following parameters must be const char * name, json_t * j_value.
Definition: rhonabwy.h:185
Private key in JSON format to sign the token, following parameter must be a json_t * value...
Definition: rhonabwy.h:206
jws_t * jws
Definition: rhonabwy.h:288
Definition: rhonabwy.h:137
Definition: rhonabwy.h:118
int r_jwe_add_keys_json_str(jwe_t *jwe, const char *privkey, const char *pubkey)
Definition: jwe.c:3217
int r_global_init(void)
Definition: misc.c:37
char * r_jwe_get_full_unprotected_header_str(jwe_t *jwe)
Definition: jwe.c:3150
int r_jwe_parse(jwe_t *jwe, const char *jwe_str, int x5u_flags)
Definition: jwe.c:3811
int r_jwt_set_claim_json_t_value(jwt_t *jwt, const char *key, json_t *j_value)
Definition: jwt.c:212
json_t * r_jws_serialize_json_t(jws_t *jws, jwks_t *jwks_privkey, int x5u_flags, int mode)
Definition: jws.c:1930
unsigned char * iv
Definition: rhonabwy.h:275
int r_jwk_set_property_str(jwk_t *jwk, const char *key, const char *value)
Definition: jwk.c:2542
jws_t * r_jws_quick_parsen(const char *jws_str, size_t jws_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1761
json_t * r_jws_get_full_header_json_t(jws_t *jws)
Definition: jws.c:1110
jwks_t * r_jwe_get_jwks_pubkey(jwe_t *jwe)
Definition: jwe.c:3406
int r_jwk_equal(jwk_t *jwk1, jwk_t *jwk2)
Definition: jwk.c:1768
int r_jws_add_keys_json_str(jws_t *jws, const char *privkey, const char *pubkey)
Definition: jws.c:1184
int r_jwks_is_valid(jwks_t *jwks)
Definition: jwks.c:47
int r_jws_set_alg(jws_t *jws, jwa_alg alg)
Definition: jws.c:965
const char * r_jwa_enc_to_str(jwa_enc enc)
Definition: misc.c:618
int r_jws_add_jwks(jws_t *jws, jwks_t *jwks_privkey, jwks_t *jwks_pubkey)
Definition: jws.c:1151
int r_jws_add_keys_gnutls(jws_t *jws, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey)
Definition: jws.c:1301
int r_jwe_init(jwe_t **jwe)
Definition: jwe.c:2683
Import from a gnutls_x509_crt_t, following parameters must be gnutls_x509_crt_t.
Definition: rhonabwy.h:237
jwks_t * jwks_pubkey_sign
Definition: rhonabwy.h:298
int r_jwk_import_from_gnutls_privkey(jwk_t *jwk, gnutls_privkey_t key)
Definition: jwk.c:1047
int r_jwt_set_enc_cypher_key(jwt_t *jwt, const unsigned char *key, size_t key_len)
Definition: jwt.c:866
int r_jwks_remove_at(jwks_t *jwks, size_t index)
Definition: jwks.c:131
Definition: rhonabwy.h:148
int r_jwt_advanced_parse(jwt_t *jwt, const char *token, uint32_t parse_flags, int x5u_flags)
Definition: jwt.c:1202
int r_jws_advanced_parse_json_str(jws_t *jws, const char *jws_json_str, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1562
int r_jws_parse(jws_t *jws, const char *jws_str, int x5u_flags)
Definition: jws.c:1381
Definition: rhonabwy.h:129
int r_jwt_add_sign_keys(jwt_t *jwt, jwk_t *privkey, jwk_t *pubkey)
Definition: jwt.c:302
size_t payload_len
Definition: rhonabwy.h:253
json_t * r_jwt_get_full_claims_json_t(jwt_t *jwt)
Definition: jwt.c:241
Public key in PEM or DER format to verify the token signature, following parameter must be R_FORMAT_P...
Definition: rhonabwy.h:214
unsigned char * header_b64url
Definition: rhonabwy.h:245
int r_jwt_parsen(jwt_t *jwt, const char *token, size_t token_len, int x5u_flags)
Definition: jwt.c:1190
json_t * j_json_serialization
Definition: rhonabwy.h:254
int r_jwt_set_enc(jwt_t *jwt, jwa_enc enc)
Definition: jwt.c:854
json_t * _r_json_get_json_t_value(json_t *j_json, const char *key)
Definition: misc.c:264
jwa_alg enc_alg
Definition: rhonabwy.h:291
json_t * r_jwt_get_full_header_json_t(jwt_t *jwt)
Definition: jwt.c:181
rhn_int_t _r_json_get_int_value(json_t *j_json, const char *key)
Definition: misc.c:257
const char * r_jwt_get_claim_str_value(jwt_t *jwt, const char *key)
Definition: jwt.c:220
int r_jwt_add_enc_key_symmetric(jwt_t *jwt, const unsigned char *key, size_t key_len)
Definition: jwt.c:773
jwks_t * jwks_privkey
Definition: rhonabwy.h:269
int r_jwt_add_enc_keys(jwt_t *jwt, jwk_t *privkey, jwk_t *pubkey)
Definition: jwt.c:558
int r_jwt_set_sign_alg(jwt_t *jwt, jwa_alg alg)
Definition: jwt.c:814
Definition: rhonabwy.h:131
int r_jwt_add_sign_keys_json_str(jwt_t *jwt, const char *privkey, const char *pubkey)
Definition: jwt.c:361
const char * r_jwa_alg_to_str(jwa_alg alg)
Definition: misc.c:496
int r_jwk_get_property_array_size(jwk_t *jwk, const char *key)
Definition: jwk.c:2529
unsigned char * iv_b64url
Definition: rhonabwy.h:262
int r_jwe_set_header_str_value(jwe_t *jwe, const char *key, const char *str_value)
Definition: jwe.c:3064
int r_jwt_add_sign_keys_gnutls(jwt_t *jwt, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey)
Definition: jwt.c:478
jwks_t * r_jwks_quick_import(rhn_import,...)
Definition: jwks.c:336
Definition: rhonabwy.h:176
Claims Integer value, following parameters must be const char * name, int i_value.
Definition: rhonabwy.h:191
Definition: rhonabwy.h:174
Signature algorithm, following parameter must be a jwa_alg value.
Definition: rhonabwy.h:199
int r_jwe_parse_json_str(jwe_t *jwe, const char *jwe_json_str, int x5u_flags)
Definition: jwe.c:3951
Definition: rhonabwy.h:149
char * r_jwe_get_full_header_str(jwe_t *jwe)
Definition: jwe.c:3135
Import from an URL pointing to a jku, available for r_jwks_quick_import only, following parameters mu...
Definition: rhonabwy.h:241
unsigned char * header_b64url
Definition: rhonabwy.h:259
int r_jwe_set_full_header_json_str(jwe_t *jwe, const char *str_header)
Definition: jwe.c:4479
Definition: rhonabwy.h:133
int r_jwk_match_json_t(jwk_t *jwk, json_t *j_match)
Definition: jwk.c:2896
int r_jwe_set_aad(jwe_t *jwe, const unsigned char *aad, size_t aad_len)
Definition: jwe.c:2936
int type
Definition: rhonabwy.h:284
int r_jwe_set_header_json_t_value(jwe_t *jwe, const char *key, json_t *j_value)
Definition: jwe.c:3092
Private key in stringified JSON format to sign the token, following parameter must be a const char * ...
Definition: rhonabwy.h:207
jwa_enc r_str_to_jwa_enc(const char *enc)
Definition: misc.c:600
unsigned char * aad
Definition: rhonabwy.h:271
jwks_t * jwks_privkey_enc
Definition: rhonabwy.h:299
int r_jwt_decrypt_verify_signature_nested(jwt_t *jwt, jwk_t *verify_key, int verify_key_x5u_flags, jwk_t *decrypt_key, int decrypt_key_x5u_flags)
Definition: jwt.c:1420
Definition: rhonabwy.h:164
json_t * j_unprotected_header
Definition: rhonabwy.h:266
int r_jwt_decrypt_nested(jwt_t *jwt, jwk_t *decrypt_key, int decrypt_key_x5u_flags)
Definition: jwt.c:1564
int r_jwt_set_header_str_value(jwt_t *jwt, const char *key, const char *str_value)
Definition: jwt.c:136
Import from a X509 key in DER format, following parameters must be type (R_X509_TYPE_PUBKEY, R_X509_TYPE_PRIVKEY or R_X509_TYPE_CERTIFICATE), const unsigned char *, size_t.
Definition: rhonabwy.h:234
Header Integer value, following parameters must be const char * name, int i_value.
Definition: rhonabwy.h:182
int r_jwe_decrypt_key(jwe_t *jwe, jwk_t *jwk_privkey, int x5u_flags)
Definition: jwe.c:3785
jwks_t * jwks_privkey
Definition: rhonabwy.h:250
int r_jws_parsen(jws_t *jws, const char *jws_str, size_t jws_str_len, int x5u_flags)
Definition: jws.c:1385
const char * r_jwk_get_property_array(jwk_t *jwk, const char *key, size_t index)
Definition: jwk.c:2516
Import from a password, following parameter must be a const char * value.
Definition: rhonabwy.h:240
Public key in GnuTLS format to encrypt the token, following parameter must be a gnutls_pubkey_t value...
Definition: rhonabwy.h:217
int r_jwt_set_full_claims_json_t(jwt_t *jwt, json_t *j_claim)
Definition: jwt.c:256
char * r_jwt_get_full_header_str(jwt_t *jwt)
Definition: jwt.c:188
int token_mode
Definition: rhonabwy.h:280
unsigned char * payload
Definition: rhonabwy.h:277
Import from a stringified JSON, following parameter must be a const char * value. ...
Definition: rhonabwy.h:231
json_t * r_jwt_get_header_json_t_value(jwt_t *jwt, const char *key)
Definition: jwt.c:174
jwk_t * r_jwk_quick_import(rhn_import type,...)
Definition: jwk.c:1682
int r_jwe_set_iv(jwe_t *jwe, const unsigned char *iv, size_t iv_len)
Definition: jwe.c:2891
int _r_deflate_payload(const unsigned char *uncompressed, size_t uncompressed_len, unsigned char **compressed, size_t *compressed_len)
Definition: misc.c:339
jwks_t * r_jwt_get_enc_jwks_pubkey(jwt_t *jwt)
Definition: jwt.c:806
Stringified JSON value to set the entire header, following parameter must be const char * str_value...
Definition: rhonabwy.h:187
int r_jwe_advanced_parsen(jwe_t *jwe, const char *jwe_str, size_t jwe_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:3842
jwe_t * jwe
Definition: rhonabwy.h:289
Public key in PEM or DER format to encrypt the token, following parameter must be R_FORMAT_PEM or R_F...
Definition: rhonabwy.h:220
json_int_t rhn_int_t
Definition: rhonabwy.h:113
int r_jwt_add_enc_keys_gnutls(jwt_t *jwt, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey)
Definition: jwt.c:734
int r_jwks_import_from_json_t(jwks_t *jwks, json_t *j_input)
Definition: jwks.c:271
jwa_enc r_jwe_get_enc(jwe_t *jwe)
Definition: jwe.c:3052
Public key in JSON format to encrypt the token, following parameter must be a json_t * value...
Definition: rhonabwy.h:218
Definition: rhonabwy.h:143
Definition: rhonabwy.h:147
void r_jws_free(jws_t *jws)
Definition: jws.c:888
int r_jwks_append_jwk(jwks_t *jwks, jwk_t *jwk)
Definition: jwks.c:105
int r_jws_parsen_json_str(jws_t *jws, const char *jws_json_str, size_t jws_json_str_len, int x5u_flags)
Definition: jws.c:1547
Initial Value (IV) for data encryption, following parameters must be const unsigned char * value...
Definition: rhonabwy.h:201
Private key in JWK format to decrypt the token, following parameter must be a jwk_t * value...
Definition: rhonabwy.h:221
Header String value, following parameters must be const char * name, const char * str_value...
Definition: rhonabwy.h:184
const unsigned char * r_jwe_get_payload(jwe_t *jwe, size_t *payload_len)
Definition: jwe.c:2818
Definition: rhonabwy.h:142
Definition: rhonabwy.h:141
int r_jwt_set_header_json_t_value(jwt_t *jwt, const char *key, json_t *j_value)
Definition: jwt.c:152
int _r_json_set_json_t_value(json_t *j_json, const char *key, json_t *j_value)
Definition: misc.c:229
int _r_json_set_int_value(json_t *j_json, const char *key, rhn_int_t i_value)
Definition: misc.c:213
Stringified JSON value to set the entire claims, following parameter must be const char * str_value...
Definition: rhonabwy.h:196
gnutls_x509_crt_t r_jwk_export_to_gnutls_crt(jwk_t *jwk, int x5u_flags)
Definition: jwk.c:2356
int r_jws_advanced_compact_parsen(jws_t *jws, const char *jws_str, size_t jws_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1453
const unsigned char * r_jwt_get_enc_iv(jwt_t *jwt, size_t *iv_len)
Definition: jwt.c:952
char * r_jwt_serialize_nested(jwt_t *jwt, unsigned int type, jwk_t *sign_key, int sign_key_x5u_flags, jwk_t *encrypt_key, int encrypt_key_x5u_flags)
Definition: jwt.c:1105
int r_jws_add_keys(jws_t *jws, jwk_t *jwk_privkey, jwk_t *jwk_pubkey)
Definition: jws.c:1125
char * r_jwk_export_to_json_str(jwk_t *jwk, int pretty)
Definition: jwk.c:1772
json_t * r_jws_get_header_json_t_value(jws_t *jws, const char *key)
Definition: jws.c:1103
Definition: rhonabwy.h:120
int r_jwk_import_from_x5c(jwk_t *jwk, const char *x5c)
Definition: jwk.c:1631
jws_t * r_jws_quick_parse(const char *jws_str, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1757
unsigned char * ciphertext_b64url
Definition: rhonabwy.h:263
int r_jwt_token_type(const char *token)
Definition: jwt.c:2376
Private key in JSON format to decrypt the token, following parameter must be a json_t * value...
Definition: rhonabwy.h:224
int r_jwt_decrypt(jwt_t *jwt, jwk_t *privkey, int x5u_flags)
Definition: jwt.c:1366
int r_jwt_parsen_unsecure(jwt_t *jwt, const char *token, size_t token_len, int x5u_flags)
Definition: jwt.c:1194
size_t aad_len
Definition: rhonabwy.h:272
Definition: rhonabwy.h:156
Public key set in JWKS format to verify the token signature, following parameter must be a jwks_t * v...
Definition: rhonabwy.h:210
int r_jwk_export_to_symmetric_key(jwk_t *jwk, unsigned char *key, size_t *key_len)
Definition: jwk.c:2467
Public key in JSON format to verify the token signature, following parameter must be a json_t * value...
Definition: rhonabwy.h:212
jwa_alg alg
Definition: rhonabwy.h:249
jwa_enc
Definition: rhonabwy.h:170
Definition: rhonabwy.h:258
Definition: rhonabwy.h:167
gnutls_privkey_t r_jwk_export_to_gnutls_privkey(jwk_t *jwk)
Definition: jwk.c:1788
int r_jws_advanced_parsen(jws_t *jws, const char *jws_str, size_t jws_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1401
Private key set in JWKS format to sign the token, following parameter must be a jwks_t * value...
Definition: rhonabwy.h:204
int r_jwe_compact_parsen(jwe_t *jwe, const char *jwe_str, size_t jwe_str_len, int x5u_flags)
Definition: jwe.c:3865
void r_jwe_free(jwe_t *jwe)
Definition: jwe.c:2737
int r_jwk_init(jwk_t **jwk)
Definition: jwk.c:46
int r_jws_parse_json_str(jws_t *jws, const char *jws_json_str, int x5u_flags)
Definition: jws.c:1558
int r_jwt_get_type(jwt_t *jwt)
Definition: jwt.c:1333
jws_t * r_jws_copy(jws_t *jws)
Definition: jws.c:902
int r_jwt_verify_signature_nested(jwt_t *jwt, jwk_t *verify_key, int verify_key_x5u_flags)
Definition: jwt.c:1661
int token_mode
Definition: rhonabwy.h:255
size_t iv_len
Definition: rhonabwy.h:276
int r_jws_advanced_parse_json_t(jws_t *jws, json_t *jws_json, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1577
int r_jwt_set_enc_iv(jwt_t *jwt, const unsigned char *iv, size_t iv_len)
Definition: jwt.c:927
char * r_jwk_thumbprint(jwk_t *jwk, int hash, int x5u_flags)
Definition: jwk.c:2665
Cipher key to encrypt data, following parameters must be const unsigned char * value, size_t value_length.
Definition: rhonabwy.h:200
jwa_alg r_jwt_get_sign_alg(jwt_t *jwt)
Definition: jwt.c:826
jwt_t * r_jwt_quick_parse(const char *token, uint32_t parse_flags, int x5u_flags)
Definition: jwt.c:1312
json_t * _r_json_get_full_json_t(json_t *j_json)
Definition: misc.c:273
void r_jwk_free(jwk_t *jwk)
Definition: jwk.c:57
int r_jwt_set_claims(jwt_t *jwt,...)
Definition: jwt.c:1962
Definition: rhonabwy.h:144
int r_jwks_equal(jwks_t *jwks1, jwks_t *jwks2)
Definition: jwks.c:157
const unsigned char * r_jws_get_payload(jws_t *jws, size_t *payload_len)
Definition: jws.c:955
int r_jwt_add_enc_keys_json_str(jwt_t *jwt, const char *privkey, const char *pubkey)
Definition: jwt.c:617
const unsigned char * r_jwe_get_iv(jwe_t *jwe, size_t *iv_len)
Definition: jwe.c:2926
Definition: rhonabwy.h:146
Definition: rhonabwy.h:157
const char * r_jwe_get_kid(jwe_t *jwe)
Definition: jwe.c:3060
int r_jws_advanced_parse(jws_t *jws, const char *jws_str, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1397
int r_jws_compact_parse(jws_t *jws, const char *jws_str, int x5u_flags)
Definition: jws.c:1437
jwa_enc enc
Definition: rhonabwy.h:292
unsigned char * payload_b64url
Definition: rhonabwy.h:246
const unsigned char * r_jwt_get_enc_cypher_key(jwt_t *jwt, size_t *key_len)
Definition: jwt.c:891
jwe_t * r_jwe_copy(jwe_t *jwe)
Definition: jwe.c:2758
int r_jws_set_full_header_json_t(jws_t *jws, json_t *j_value)
Definition: jws.c:2006
jwa_alg sign_alg
Definition: rhonabwy.h:290
jwks_t * r_jwks_search_json_str(jwks_t *jwks, const char *str_match)
Definition: jwks.c:494
int r_jwe_decrypt(jwe_t *jwe, jwk_t *jwk_privkey, int x5u_flags)
Definition: jwe.c:4137
jwk_t * r_jwks_get_at(jwks_t *jwks, size_t index)
Definition: jwks.c:76
unsigned char * iv
Definition: rhonabwy.h:295
int r_jwe_encrypt_key(jwe_t *jwe, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jwe.c:3737
int r_jwk_is_valid(jwk_t *jwk)
Definition: jwk.c:63
int r_jws_compact_parse_unsecure(jws_t *jws, const char *jws_str, int x5u_flags)
Definition: jws.c:1445
Definition: rhonabwy.h:138
Private key in JWK format to sign the token, following parameter must be a jwk_t * value...
Definition: rhonabwy.h:203
int r_jws_compact_parsen_unsecure(jws_t *jws, const char *jws_str, size_t jws_str_len, int x5u_flags)
Definition: jws.c:1441
const char * _r_json_get_str_value(json_t *j_json, const char *key)
Definition: misc.c:250
int r_jwe_set_full_unprotected_header_json_str(jwe_t *jwe, const char *str_unprotected_header)
Definition: jwe.c:4505
End option list, mandatory at the end of the option list when using r_jwks_quick_import.
Definition: rhonabwy.h:230
JSON value to set the entire unprotected header, following parameter must be json_t * j_value...
Definition: rhonabwy.h:188
int r_jwk_delete_property_str(jwk_t *jwk, const char *key)
Definition: jwk.c:2597
unsigned char * aad_b64url
Definition: rhonabwy.h:261
size_t key_len
Definition: rhonabwy.h:274
Definition: rhonabwy.h:128
int r_jws_add_keys_json_t(jws_t *jws, json_t *privkey, json_t *pubkey)
Definition: jws.c:1223
const char * r_jws_get_header_str_value(jws_t *jws, const char *key)
Definition: jws.c:1089
int r_jwks_set_at(jwks_t *jwks, size_t index, jwk_t *jwk)
Definition: jwks.c:118
Definition: rhonabwy.h:140
int r_jwe_parsen_json_str(jwe_t *jwe, const char *jwe_json_str, size_t jwe_json_str_len, int x5u_flags)
Definition: jwe.c:3955
char * r_jws_serialize(jws_t *jws, jwk_t *jwk_privkey, int x5u_flags)
Definition: jws.c:1870
Definition: rhonabwy.h:155
int r_jwt_add_enc_keys_json_t(jwt_t *jwt, json_t *privkey, json_t *pubkey)
Definition: jwt.c:656
jwt_t * r_jwt_copy(jwt_t *jwt)
Definition: jwt.c:111
int r_jwe_set_cypher_key(jwe_t *jwe, const unsigned char *key, size_t key_len)
Definition: jwe.c:2828
JSON value to set the entire payload, following parameters must be const unsigned char * value...
Definition: rhonabwy.h:190
Public key in JWK format to encrypt the token, following parameter must be a jwk_t * value...
Definition: rhonabwy.h:215
int r_jwk_import_from_pem_der(jwk_t *jwk, int type, int format, const unsigned char *input, size_t input_len)
Definition: jwk.c:918
Import from a gnutls_privkey_t, following parameters must be gnutls_privkey_t.
Definition: rhonabwy.h:235
jwks_t * jwks_privkey_sign
Definition: rhonabwy.h:297
int r_jwk_import_from_gnutls_x509_crt(jwk_t *jwk, gnutls_x509_crt_t crt)
Definition: jwk.c:1573
rhn_int_t r_jwt_get_header_int_value(jwt_t *jwt, const char *key)
Definition: jwt.c:167
Claims JSON value, following parameters must be const char * name, json_t * j_value.
Definition: rhonabwy.h:194
jwks_t * r_jwt_get_sign_jwks_pubkey(jwt_t *jwt)
Definition: jwt.c:550
JSON value to set the entire header, following parameter must be json_t * j_value.
Definition: rhonabwy.h:186
int r_jws_compact_parsen(jws_t *jws, const char *jws_str, size_t jws_str_len, int x5u_flags)
Definition: jws.c:1424
Definition: rhonabwy.h:159
int r_jws_add_key_symmetric(jws_t *jws, const unsigned char *key, size_t key_len)
Definition: jws.c:1340
int r_jwt_set_full_header_json_str(jwt_t *jwt, const char *str_header)
Definition: jwt.c:2151
jwks_t * r_jws_get_jwks_pubkey(jws_t *jws)
Definition: jws.c:1373
jwk_t * r_jwk_copy(jwk_t *jwk)
Definition: jwk.c:1760
Import from a X509 key in PEM format, following parameters must be type (R_X509_TYPE_PUBKEY, R_X509_TYPE_PRIVKEY or R_X509_TYPE_CERTIFICATE), const unsigned char *, size_t.
Definition: rhonabwy.h:233
void r_free(void *data)
Definition: misc.c:713
Definition: rhonabwy.h:172
int r_jwe_encrypt_payload(jwe_t *jwe)
Definition: jwe.c:3414
int r_jwe_set_properties(jwe_t *jwe,...)
Definition: jwe.c:4515
int r_jwk_match_json_str(jwk_t *jwk, const char *str_match)
Definition: jwk.c:2917
char * r_jwt_serialize_signed_unsecure(jwt_t *jwt, jwk_t *privkey, int x5u_flags)
Definition: jwt.c:1014
int r_jwe_set_header_int_value(jwe_t *jwe, const char *key, rhn_int_t i_value)
Definition: jwe.c:3078
void r_jwt_free(jwt_t *jwt)
Definition: jwt.c:95
char * r_jws_serialize_unsecure(jws_t *jws, jwk_t *jwk_privkey, int x5u_flags)
Definition: jws.c:1878
int r_jwe_parsen(jwe_t *jwe, const char *jwe_str, size_t jwe_str_len, int x5u_flags)
Definition: jwe.c:3815
int r_jws_set_header_str_value(jws_t *jws, const char *key, const char *str_value)
Definition: jws.c:1046
int r_jwt_validate_claims(jwt_t *jwt,...)
Definition: jwt.c:1693
Header rhn_int_t value, following parameters must be const char * name, rhn_int_t i_value...
Definition: rhonabwy.h:183
Definition: rhonabwy.h:134
int r_jwk_delete_property_array_at(jwk_t *jwk, const char *key, size_t index)
Definition: jwk.c:2610
int r_jwk_key_type(jwk_t *jwk, unsigned int *bits, int x5u_flags)
Definition: jwk.c:640
int r_jwt_parse(jwt_t *jwt, const char *token, int x5u_flags)
Definition: jwt.c:1186
char * r_jws_serialize_json_str(jws_t *jws, jwks_t *jwks_privkey, int x5u_flags, int mode)
Definition: jws.c:1923
int r_jwk_import_from_password(jwk_t *jwk, const char *password)
Definition: jwk.c:1678
int r_jwe_add_keys_pem_der(jwe_t *jwe, int format, const unsigned char *privkey, size_t privkey_len, const unsigned char *pubkey, size_t pubkey_len)
Definition: jwe.c:3295
json_t * r_jwe_get_header_json_t_value(jwe_t *jwe, const char *key)
Definition: jwe.c:3121
const char * r_jwk_get_property_str(jwk_t *jwk, const char *key)
Definition: jwk.c:2504
Definition: rhonabwy.h:121
json_t * j_json_serialization
Definition: rhonabwy.h:279
int r_jwt_append_claims_json_t(jwt_t *jwt, json_t *j_claim)
Definition: jwt.c:284
int r_jwt_token_typen(const char *token, size_t token_len)
Definition: jwt.c:2380
int r_jws_init(jws_t **jws)
Definition: jws.c:845
Claims String value, following parameters must be const char * name, const char * str_value...
Definition: rhonabwy.h:193
size_t payload_len
Definition: rhonabwy.h:278
Private key in PEM or DER format to decrypt the token, following parameter must be R_FORMAT_PEM or R_...
Definition: rhonabwy.h:226
Definition: rhonabwy.h:283
unsigned char * key
Definition: rhonabwy.h:293
gnutls_pubkey_t r_jwk_export_to_gnutls_pubkey(jwk_t *jwk, int x5u_flags)
Definition: jwk.c:2085
int r_jwt_add_sign_keys_pem_der(jwt_t *jwt, int format, const unsigned char *privkey, size_t privkey_len, const unsigned char *pubkey, size_t pubkey_len)
Definition: jwt.c:439
End option list, mandatory at the end of the option list.
Definition: rhonabwy.h:181
Private key in GnuTLS format to sign the token, following parameter must be a gnutls_privkey_t value...
Definition: rhonabwy.h:205
int r_jws_set_header_int_value(jws_t *jws, const char *key, rhn_int_t i_value)
Definition: jws.c:1060
Definition: rhonabwy.h:177
char * r_jwks_export_to_json_str(jwks_t *jwks, int pretty)
Definition: jwks.c:161
Definition: rhonabwy.h:123
int r_jwks_import_from_json_str(jwks_t *jwks, const char *input)
Definition: jwks.c:248
unsigned char * signature_b64url
Definition: rhonabwy.h:247
jwa_enc enc
Definition: rhonabwy.h:268
Import from a symmetric key, following parameters must be const unsigned char *, size_t.
Definition: rhonabwy.h:239
Definition: rhonabwy.h:244
void r_jwks_free(jwks_t *jwks)
Definition: jwks.c:41
size_t iv_len
Definition: rhonabwy.h:296
rhn_claim_opt
Definition: rhonabwy.h:153
jwks_t * r_jwt_get_sign_jwks_privkey(jwt_t *jwt)
Definition: jwt.c:542
int r_jwk_export_to_pem_der(jwk_t *jwk, int format, unsigned char *output, size_t *output_len, int x5u_flags)
Definition: jwk.c:2411
Definition: rhonabwy.h:161
int r_jwe_parse_json_t(jwe_t *jwe, json_t *jwe_json, int x5u_flags)
Definition: jwe.c:3966
int r_jwt_set_full_header_json_t(jwt_t *jwt, json_t *j_header)
Definition: jwt.c:2107
Key management algorithm, following parameter must be a jwa_alg value.
Definition: rhonabwy.h:197
Definition: rhonabwy.h:154
jwa_alg r_jws_get_alg(jws_t *jws)
Definition: jws.c:1028
Import from a gnutls_pubkey_t, following parameters must be gnutls_pubkey_t.
Definition: rhonabwy.h:236
const char * r_jwt_get_enc_kid(jwt_t *jwt)
Definition: jwt.c:998
const char * r_jwt_get_header_str_value(jwt_t *jwt, const char *key)
Definition: jwt.c:160
Definition: rhonabwy.h:145
jwe_t * r_jwe_quick_parse(const char *jwe_str, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:4116
Definition: rhonabwy.h:162
int r_jwe_generate_iv(jwe_t *jwe)
Definition: jwe.c:2983
Definition: rhonabwy.h:135
int r_jws_set_full_header_json_str(jws_t *jws, const char *str_value)
Definition: jws.c:2033
rhn_int_t r_jws_get_header_int_value(jws_t *jws, const char *key)
Definition: jws.c:1096
Definition: rhonabwy.h:124
int r_jwk_import_from_gnutls_pubkey(jwk_t *jwk, gnutls_pubkey_t pub)
Definition: jwk.c:1360
int r_jwk_import_from_x5u(jwk_t *jwk, int x5u_flags, const char *x5u)
Definition: jwk.c:1609
jwks_t * jwks_pubkey
Definition: rhonabwy.h:270
int r_jwt_set_claim_str_value(jwt_t *jwt, const char *key, const char *str_value)
Definition: jwt.c:196
Private key in stringified JSON format to decrypt the token, following parameter must be a const char...
Definition: rhonabwy.h:225
json_t * r_jwe_get_full_header_json_t(jwe_t *jwe)
Definition: jwe.c:3128
int r_jwt_verify_signature(jwt_t *jwt, jwk_t *pubkey, int x5u_flags)
Definition: jwt.c:1341
char * r_jwt_serialize_signed(jwt_t *jwt, jwk_t *privkey, int x5u_flags)
Definition: jwt.c:1006
gnutls_privkey_t * r_jwks_export_to_gnutls_privkey(jwks_t *jwks, size_t *len)
Definition: jwks.c:177
int r_jwe_advanced_parse_json_t(jwe_t *jwe, json_t *jwe_json, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:3985
int r_jws_set_payload(jws_t *jws, const unsigned char *payload, size_t payload_len)
Definition: jws.c:930
int r_jwe_add_keys_gnutls(jwe_t *jwe, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey)
Definition: jwe.c:3334
int r_jws_verify_signature(jws_t *jws, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jws.c:1778
int r_jwt_add_sign_jwks(jwt_t *jwt, jwks_t *jwks_privkey, jwks_t *jwks_pubkey)
Definition: jwt.c:328
int r_jwt_init(jwt_t **jwt)
Definition: jwt.c:34
jwa_enc r_jwt_get_enc(jwt_t *jwt)
Definition: jwt.c:990
Public key in GnuTLS format to verify the token signature, following parameter must be a gnutls_pubke...
Definition: rhonabwy.h:211
unsigned char * encrypted_key_b64url
Definition: rhonabwy.h:260
json_t * r_jwe_get_full_unprotected_header_json_t(jwe_t *jwe)
Definition: jwe.c:3143
const char * r_jwt_get_sig_kid(jwt_t *jwt)
Definition: jwt.c:1002
json_t * j_header
Definition: rhonabwy.h:286
Definition: rhonabwy.h:127
int r_jwe_advanced_parse_json_str(jwe_t *jwe, const char *jwe_json_str, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:3970
Stringified JSON value to set the entire unprotected header, following parameter must be const char *...
Definition: rhonabwy.h:189
int r_jwt_add_sign_keys_json_t(jwt_t *jwt, json_t *privkey, json_t *pubkey)
Definition: jwt.c:400
json_t * r_jwt_get_claim_json_t_value(jwt_t *jwt, const char *key)
Definition: jwt.c:234