Rhonabwy
Javascript Object Signing and Encryption (JOSE) library - JWK, JWKS, JWS, JWE and JWT
rhonabwy.h
Go to the documentation of this file.
1 
25 #ifndef __RHONABWY_H_
26 #define __RHONABWY_H_
27 
28 #ifdef __cplusplus
29 extern "C"
30 {
31 #endif
32 
33 #include "rhonabwy-cfg.h"
34 
35 #include <jansson.h>
36 #include <gnutls/gnutls.h>
37 #include <nettle/version.h>
38 
39 #define RHN_BEGIN_CERT_TAG "-----BEGIN CERTIFICATE-----"
40 
47 #define RHN_OK 0
48 #define RHN_ERROR 1
49 #define RHN_ERROR_MEMORY 2
50 #define RHN_ERROR_PARAM 3
51 #define RHN_ERROR_UNSUPPORTED 4
52 #define RHN_ERROR_INVALID 5
53 
54 #define R_X509_TYPE_PUBKEY 1
55 #define R_X509_TYPE_PRIVKEY 2
56 #define R_X509_TYPE_CERTIFICATE 3
57 
58 #define R_FORMAT_PEM 0
59 #define R_FORMAT_DER 1
60 
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
70 
71 #define R_FLAG_IGNORE_SERVER_CERTIFICATE 0x00000001
72 #define R_FLAG_FOLLOW_REDIRECT 0x00000010
73 #define R_FLAG_IGNORE_REMOTE 0x00000100
74 
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
80 
81 #define R_JWT_CLAIM_NOW -1
82 #define R_JWT_CLAIM_PRESENT -2
83 
84 #define R_JWK_THUMB_SHA256 0
85 #define R_JWK_THUMB_SHA384 1
86 #define R_JWK_THUMB_SHA512 2
87 
88 #define R_JSON_MODE_COMPACT 0
89 #define R_JSON_MODE_GENERAL 1
90 #define R_JSON_MODE_FLATTENED 2
91 
102 typedef json_t jwk_t;
103 typedef json_t jwks_t;
104 typedef json_int_t rhn_int_t;
105 
106 #define RHONABWY_INTEGER_FORMAT JSON_INTEGER_FORMAT
107 
108 typedef enum {
141  R_JWA_ALG_ES256K = 32
143 
144 typedef enum {
158 } rhn_claim_opt;
159 
160 typedef enum {
169 
170 typedef enum {
186  RHN_OPT_ENC = 15,
189  RHN_OPT_IV = 18,
190  RHN_OPT_AAD = 19,
216 
217 typedef struct {
218  unsigned char * header_b64url;
219  unsigned char * payload_b64url;
220  unsigned char * signature_b64url;
221  json_t * j_header;
225  unsigned char * payload;
226  size_t payload_len;
229 } jws_t;
230 
231 typedef struct {
232  unsigned char * header_b64url;
233  unsigned char * encrypted_key_b64url;
234  unsigned char * aad_b64url;
235  unsigned char * iv_b64url;
236  unsigned char * ciphertext_b64url;
237  unsigned char * auth_tag_b64url;
238  json_t * j_header;
244  unsigned char * aad;
245  size_t aad_len;
246  unsigned char * key;
247  size_t key_len;
248  unsigned char * iv;
249  size_t iv_len;
250  unsigned char * payload;
251  size_t payload_len;
254 } jwe_t;
255 
256 typedef struct {
257  int type;
258  json_t * j_header;
259  json_t * j_claims;
265  unsigned char * key;
266  size_t key_len;
267  unsigned char * iv;
268  size_t iv_len;
273 } jwt_t;
274 
292 int r_global_init(void);
293 
297 void r_global_close(void);
298 
306 json_t * r_library_info_json_t(void);
307 
315 char * r_library_info_json_str(void);
316 
322 void r_free(void * data);
323 
329 int r_jwk_init(jwk_t ** jwk);
330 
335 void r_jwk_free(jwk_t * jwk);
336 
342 int r_jwks_init(jwks_t ** jwks);
343 
348 void r_jwks_free(jwks_t * jwks);
349 
355 int r_jws_init(jws_t ** jws);
356 
361 void r_jws_free(jws_t * jws);
362 
368 int r_jwe_init(jwe_t ** jwe);
369 
374 void r_jwe_free(jwe_t * jwe);
375 
381 int r_jwt_init(jwt_t ** jwt);
382 
387 void r_jwt_free(jwt_t * jwt);
388 
394 jwa_alg r_str_to_jwa_alg(const char * alg);
395 
402 const char * r_jwa_alg_to_str(jwa_alg alg);
403 
409 jwa_enc r_str_to_jwa_enc(const char * enc);
410 
417 const char * r_jwa_enc_to_str(jwa_enc enc);
418 
454 int r_jwk_key_type(jwk_t * jwk, unsigned int * bits, int x5u_flags);
455 
462 int r_jwk_is_valid(jwk_t * jwk);
463 
476 int r_jwk_is_valid_x5u(jwk_t * jwk, int x5u_flags);
477 
489 int r_jwk_generate_key_pair(jwk_t * jwk_privkey, jwk_t * jwk_pubkey, int type, unsigned int bits, const char * kid);
490 
507 const char * r_jwk_get_property_str(jwk_t * jwk, const char * key);
508 
516 const char * r_jwk_get_property_array(jwk_t * jwk, const char * key, size_t index);
517 
524 int r_jwk_get_property_array_size(jwk_t * jwk, const char * key);
525 
534 int r_jwk_set_property_str(jwk_t * jwk, const char * key, const char * value);
535 
545 int r_jwk_set_property_array(jwk_t * jwk, const char * key, size_t index, const char * value);
546 
555 int r_jwk_append_property_array(jwk_t * jwk, const char * key, const char * value);
556 
564 int r_jwk_delete_property_str(jwk_t * jwk, const char * key);
565 
574 int r_jwk_delete_property_array_at(jwk_t * jwk, const char * key, size_t index);
575 
585 int r_jwk_append_x5c(jwk_t * jwk, int format, const unsigned char * input, size_t input_len);
586 
604 int r_jwk_import_from_json_str(jwk_t * jwk, const char * input);
605 
613 int r_jwk_import_from_json_t(jwk_t * jwk, json_t * j_input);
614 
625 int r_jwk_import_from_pem_der(jwk_t * jwk, int type, int format, const unsigned char * input, size_t input_len);
626 
634 int r_jwk_import_from_gnutls_privkey(jwk_t * jwk, gnutls_privkey_t key);
635 
643 int r_jwk_import_from_gnutls_pubkey(jwk_t * jwk, gnutls_pubkey_t pub);
644 
652 int r_jwk_import_from_gnutls_x509_crt(jwk_t * jwk, gnutls_x509_crt_t crt);
653 
665 int r_jwk_import_from_x5u(jwk_t * jwk, int x5u_flags, const char * x5u);
666 
674 int r_jwk_import_from_x5c(jwk_t * jwk, const char * x5c);
675 
684 int r_jwk_import_from_symmetric_key(jwk_t * jwk, const unsigned char * key, size_t key_len);
685 
693 int r_jwk_import_from_password(jwk_t * jwk, const char * password);
694 
707 int r_jwk_extract_pubkey(jwk_t * jwk_privkey, jwk_t * jwk_pubkey, int x5u_flags);
708 
714 jwk_t * r_jwk_copy(jwk_t * jwk);
715 
722 int r_jwk_equal(jwk_t * jwk1, jwk_t * jwk2);
723 
740 char * r_jwk_export_to_json_str(jwk_t * jwk, int pretty);
741 
747 json_t * r_jwk_export_to_json_t(jwk_t * jwk);
748 
754 gnutls_privkey_t r_jwk_export_to_gnutls_privkey(jwk_t * jwk);
755 
767 gnutls_pubkey_t r_jwk_export_to_gnutls_pubkey(jwk_t * jwk, int x5u_flags);
768 
782 gnutls_x509_crt_t r_jwk_export_to_gnutls_crt(jwk_t * jwk, int x5u_flags);
783 
799 int r_jwk_export_to_pem_der(jwk_t * jwk, int format, unsigned char * output, size_t * output_len, int x5u_flags);
800 
809 int r_jwk_export_to_symmetric_key(jwk_t * jwk, unsigned char * key, size_t * key_len);
810 
827 char * r_jwk_thumbprint(jwk_t * jwk, int hash, int x5u_flags);
828 
841 int r_jwk_validate_x5c_chain(jwk_t * jwk, int x5u_flags);
842 
860 int r_jwks_is_valid(jwks_t * jwks);
861 
871 int r_jwks_import_from_json_str(jwks_t * jwks, const char * input);
872 
882 int r_jwks_import_from_json_t(jwks_t * jwks, json_t * j_input);
883 
897 int r_jwks_import_from_uri(jwks_t * jwks, const char * uri, int x5u_flags);
898 
904 jwks_t * r_jwks_copy(jwks_t * jwks);
905 
911 size_t r_jwks_size(jwks_t * jwks);
912 
920 jwk_t * r_jwks_get_at(jwks_t * jwks, size_t index);
921 
929 jwk_t * r_jwks_get_by_kid(jwks_t * jwks, const char * kid);
930 
937 int r_jwks_append_jwk(jwks_t * jwks, jwk_t * jwk);
938 
946 int r_jwks_set_at(jwks_t * jwks, size_t index, jwk_t * jwk);
947 
954 int r_jwks_remove_at(jwks_t * jwks, size_t index);
955 
961 int r_jwks_empty(jwks_t * jwks);
962 
970 int r_jwks_equal(jwks_t * jwks1, jwks_t * jwks2);
971 
978 char * r_jwks_export_to_json_str(jwks_t * jwks, int pretty);
979 
985 json_t * r_jwks_export_to_json_t(jwks_t * jwks);
986 
994 gnutls_privkey_t * r_jwks_export_to_gnutls_privkey(jwks_t * jwks, size_t * len);
995 
1008 gnutls_pubkey_t * r_jwks_export_to_gnutls_pubkey(jwks_t * jwks, size_t * len, int x5u_flags);
1009 
1025 int r_jwks_export_to_pem_der(jwks_t * jwks, int format, unsigned char * output, size_t * output_len, int x5u_flags);
1026 
1042 int r_jws_set_properties(jws_t * jws, ...);
1043 
1049 jws_t * r_jws_copy(jws_t * jws);
1050 
1058 int r_jws_set_payload(jws_t * jws, const unsigned char * payload, size_t payload_len);
1059 
1066 const unsigned char * r_jws_get_payload(jws_t * jws, size_t * payload_len);
1067 
1074 int r_jws_set_alg(jws_t * jws, jwa_alg alg);
1075 
1081 jwa_alg r_jws_get_alg(jws_t * jws);
1082 
1089 const char * r_jws_get_kid(jws_t * jws);
1090 
1098 int r_jws_set_header_str_value(jws_t * jws, const char * key, const char * str_value);
1099 
1107 int r_jws_set_header_int_value(jws_t * jws, const char * key, rhn_int_t i_value);
1108 
1116 int r_jws_set_header_json_t_value(jws_t * jws, const char * key, json_t * j_value);
1117 
1124 int r_jws_set_full_header_json_t(jws_t * jws, json_t * j_value);
1125 
1132 int r_jws_set_full_header_json_str(jws_t * jws, const char * str_value);
1133 
1140 const char * r_jws_get_header_str_value(jws_t * jws, const char * key);
1141 
1148 rhn_int_t r_jws_get_header_int_value(jws_t * jws, const char * key);
1149 
1156 json_t * r_jws_get_header_json_t_value(jws_t * jws, const char * key);
1157 
1163 json_t * r_jws_get_full_header_json_t(jws_t * jws);
1164 
1170 char * r_jws_get_full_header_str(jws_t * jws);
1171 
1179 int r_jws_add_keys(jws_t * jws, jwk_t * jwk_privkey, jwk_t * jwk_pubkey);
1180 
1188 int r_jws_add_jwks(jws_t * jws, jwks_t * jwks_privkey, jwks_t * jwks_pubkey);
1189 
1198 int r_jws_add_keys_json_str(jws_t * jws, const char * privkey, const char * pubkey);
1199 
1208 int r_jws_add_keys_json_t(jws_t * jws, json_t * privkey, json_t * pubkey);
1209 
1221 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);
1222 
1231 int r_jws_add_keys_gnutls(jws_t * jws, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey);
1232 
1240 int r_jws_add_key_symmetric(jws_t * jws, const unsigned char * key, size_t key_len);
1241 
1248 
1255 
1269 int r_jws_parse(jws_t * jws, const char * jws_str, int x5u_flags);
1270 
1285 int r_jws_parsen(jws_t * jws, const char * jws_str, size_t jws_str_len, int x5u_flags);
1286 
1301 int r_jws_parse_unsecure(jws_t * jws, const char * jws_str, int x5u_flags);
1302 
1318 int r_jws_parsen_unsecure(jws_t * jws, const char * jws_str, size_t jws_str_len, int x5u_flags);
1319 
1333 int r_jws_compact_parse(jws_t * jws, const char * jws_str, int x5u_flags);
1334 
1349 int r_jws_compact_parsen(jws_t * jws, const char * jws_str, size_t jws_str_len, int x5u_flags);
1350 
1366 int r_jws_compact_parsen_unsecure(jws_t * jws, const char * jws_str, size_t jws_str_len, int x5u_flags);
1367 
1382 int r_jws_compact_parse_unsecure(jws_t * jws, const char * jws_str, int x5u_flags);
1383 
1399 int r_jws_compact_parsen_unsecure(jws_t * jws, const char * jws_str, size_t jws_str_len, int x5u_flags);
1400 
1413 int r_jws_parse_json_str(jws_t * jws, const char * jws_json_str, int x5u_flags);
1414 
1428 int r_jws_parsen_json_str(jws_t * jws, const char * jws_json_str, size_t jws_json_str_len, int x5u_flags);
1429 
1442 int r_jws_parse_json_t(jws_t * jws, json_t * jws_json, int x5u_flags);
1443 
1461 int r_jws_verify_signature(jws_t * jws, jwk_t * jwk_pubkey, int x5u_flags);
1462 
1476 char * r_jws_serialize(jws_t * jws, jwk_t * jwk_privkey, int x5u_flags);
1477 
1492 char * r_jws_serialize_unsecure(jws_t * jws, jwk_t * jwk_privkey, int x5u_flags);
1493 
1516 json_t * r_jws_serialize_json_t(jws_t * jws, jwks_t * jwks_privkey, int x5u_flags, int mode);
1517 
1540 char * r_jws_serialize_json_str(jws_t * jws, jwks_t * jwks_privkey, int x5u_flags, int mode);
1541 
1557 int r_jwe_set_properties(jwe_t * jwe, ...);
1558 
1564 jwe_t * r_jwe_copy(jwe_t * jwe);
1565 
1573 int r_jwe_set_payload(jwe_t * jwe, const unsigned char * payload, size_t payload_len);
1574 
1581 const unsigned char * r_jwe_get_payload(jwe_t * jwe, size_t * payload_len);
1582 
1589 int r_jwe_set_alg(jwe_t * jwe, jwa_alg alg);
1590 
1596 jwa_alg r_jwe_get_alg(jwe_t * jwe);
1597 
1604 int r_jwe_set_enc(jwe_t * jwe, jwa_enc enc);
1605 
1611 jwa_enc r_jwe_get_enc(jwe_t * jwe);
1612 
1619 const char * r_jwe_get_kid(jwe_t * jwe);
1620 
1628 int r_jwe_set_header_str_value(jwe_t * jwe, const char * key, const char * str_value);
1629 
1637 int r_jwe_set_header_int_value(jwe_t * jwe, const char * key, rhn_int_t i_value);
1638 
1646 int r_jwe_set_header_json_t_value(jwe_t * jwe, const char * key, json_t * j_value);
1647 
1654 int r_jwe_set_full_header_json_t(jwe_t * jwe, json_t * j_header);
1655 
1662 int r_jwe_set_full_header_json_str(jwe_t * jwe, const char * str_header);
1663 
1671 int r_jwe_set_full_unprotected_header_json_t(jwe_t * jwe, json_t * j_unprotected_header);
1672 
1680 int r_jwe_set_full_unprotected_header_json_str(jwe_t * jwe, const char * str_unprotected_header);
1681 
1688 
1695 
1702 const char * r_jwe_get_header_str_value(jwe_t * jwe, const char * key);
1703 
1710 rhn_int_t r_jwe_get_header_int_value(jwe_t * jwe, const char * key);
1711 
1718 json_t * r_jwe_get_header_json_t_value(jwe_t * jwe, const char * key);
1719 
1725 json_t * r_jwe_get_full_header_json_t(jwe_t * jwe);
1726 
1732 char * r_jwe_get_full_header_str(jwe_t * jwe);
1733 
1741 int r_jwe_add_keys(jwe_t * jwe, jwk_t * jwk_privkey, jwk_t * jwk_pubkey);
1742 
1750 int r_jwe_add_jwks(jwe_t * jwe, jwks_t * jwks_privkey, jwks_t * jwks_pubkey);
1751 
1760 int r_jwe_add_keys_json_str(jwe_t * jwe, const char * privkey, const char * pubkey);
1761 
1770 int r_jwe_add_keys_json_t(jwe_t * jwe, json_t * privkey, json_t * pubkey);
1771 
1783 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);
1784 
1793 int r_jwe_add_keys_gnutls(jwe_t * jwe, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey);
1794 
1802 int r_jwe_add_key_symmetric(jwe_t * jwe, const unsigned char * key, size_t key_len);
1803 
1810 
1817 
1825 int r_jwe_set_cypher_key(jwe_t * jwe, const unsigned char * key, size_t key_len);
1826 
1833 const unsigned char * r_jwe_get_cypher_key(jwe_t * jwe, size_t * key_len);
1834 
1840 int r_jwe_generate_cypher_key(jwe_t * jwe);
1841 
1849 int r_jwe_set_iv(jwe_t * jwe, const unsigned char * iv, size_t iv_len);
1850 
1857 const unsigned char * r_jwe_get_iv(jwe_t * jwe, size_t * iv_len);
1858 
1864 int r_jwe_generate_iv(jwe_t * jwe);
1865 
1873 int r_jwe_set_aad(jwe_t * jwe, const unsigned char * aad, size_t aad_len);
1874 
1881 const unsigned char * r_jwe_get_aad(jwe_t * jwe, size_t * aad_len);
1882 
1888 int r_jwe_encrypt_payload(jwe_t * jwe);
1889 
1895 int r_jwe_decrypt_payload(jwe_t * jwe);
1896 
1909 int r_jwe_encrypt_key(jwe_t * jwe, jwk_t * jwk_pubkey, int x5u_flags);
1910 
1923 int r_jwe_decrypt_key(jwe_t * jwe, jwk_t * jwk_privkey, int x5u_flags);
1924 
1937 int r_jwe_parse(jwe_t * jwe, const char * jwe_str, int x5u_flags);
1938 
1952 int r_jwe_parsen(jwe_t * jwe, const char * jwe_str, size_t jwe_str_len, int x5u_flags);
1953 
1966 int r_jwe_compact_parse(jwe_t * jwe, const char * jwe_str, int x5u_flags);
1967 
1981 int r_jwe_compact_parsen(jwe_t * jwe, const char * jwe_str, size_t jwe_str_len, int x5u_flags);
1982 
1995 int r_jwe_parse_json_str(jwe_t * jwe, const char * jwe_json_str, int x5u_flags);
1996 
2010 int r_jwe_parsen_json_str(jwe_t * jwe, const char * jwe_json_str, size_t jwe_json_str_len, int x5u_flags);
2011 
2024 int r_jwe_parse_json_t(jwe_t * jwe, json_t * jwe_json, int x5u_flags);
2025 
2039 int r_jwe_decrypt(jwe_t * jwe, jwk_t * jwk_privkey, int x5u_flags);
2040 
2054 char * r_jwe_serialize(jwe_t * jwe, jwk_t * jwk_pubkey, int x5u_flags);
2055 
2078 char * r_jwe_serialize_json_str(jwe_t * jwe, jwks_t * jwks_pubkey, int x5u_flags, int mode);
2079 
2102 json_t * r_jwe_serialize_json_t(jwe_t * jwe, jwks_t * jwks_pubkey, int x5u_flags, int mode);
2103 
2119 int r_jwt_set_properties(jwt_t * jwt, ...);
2120 
2126 jwt_t * r_jwt_copy(jwt_t * jwt);
2127 
2135 int r_jwt_set_header_str_value(jwt_t * jwt, const char * key, const char * str_value);
2136 
2144 int r_jwt_set_header_int_value(jwt_t * jwt, const char * key, rhn_int_t i_value);
2145 
2153 int r_jwt_set_header_json_t_value(jwt_t * jwt, const char * key, json_t * j_value);
2154 
2161 int r_jwt_set_full_header_json_t(jwt_t * jwt, json_t * j_header);
2162 
2169 int r_jwt_set_full_header_json_str(jwt_t * jwt, const char * str_header);
2170 
2177 const char * r_jwt_get_header_str_value(jwt_t * jwt, const char * key);
2178 
2185 rhn_int_t r_jwt_get_header_int_value(jwt_t * jwt, const char * key);
2186 
2193 json_t * r_jwt_get_header_json_t_value(jwt_t * jwt, const char * key);
2194 
2200 json_t * r_jwt_get_full_header_json_t(jwt_t * jwt);
2201 
2207 char * r_jwt_get_full_header_str(jwt_t * jwt);
2208 
2216 int r_jwt_set_claim_str_value(jwt_t * jwt, const char * key, const char * str_value);
2217 
2225 int r_jwt_set_claim_int_value(jwt_t * jwt, const char * key, rhn_int_t i_value);
2226 
2234 int r_jwt_set_claim_json_t_value(jwt_t * jwt, const char * key, json_t * j_value);
2235 
2242 const char * r_jwt_get_claim_str_value(jwt_t * jwt, const char * key);
2243 
2250 rhn_int_t r_jwt_get_claim_int_value(jwt_t * jwt, const char * key);
2251 
2258 json_t * r_jwt_get_claim_json_t_value(jwt_t * jwt, const char * key);
2259 
2265 json_t * r_jwt_get_full_claims_json_t(jwt_t * jwt);
2266 
2272 char * r_jwt_get_full_claims_str(jwt_t * jwt);
2273 
2281 int r_jwt_set_full_claims_json_t(jwt_t * jwt, json_t * j_claim);
2282 
2290 int r_jwt_set_full_claims_json_str(jwt_t * jwt, const char * str_claims);
2291 
2299 int r_jwt_append_claims_json_t(jwt_t * jwt, json_t * j_claim);
2300 
2308 int r_jwt_add_sign_keys(jwt_t * jwt, jwk_t * privkey, jwk_t * pubkey);
2309 
2317 int r_jwt_add_sign_jwks(jwt_t * jwt, jwks_t * jwks_privkey, jwks_t * jwks_pubkey);
2318 
2327 int r_jwt_add_sign_keys_json_str(jwt_t * jwt, const char * privkey, const char * pubkey);
2328 
2337 int r_jwt_add_sign_keys_json_t(jwt_t * jwt, json_t * privkey, json_t * pubkey);
2338 
2350 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);
2351 
2360 int r_jwt_add_sign_keys_gnutls(jwt_t * jwt, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey);
2361 
2369 int r_jwt_add_sign_key_symmetric(jwt_t * jwt, const unsigned char * key, size_t key_len);
2370 
2377 
2384 
2392 int r_jwt_add_enc_keys(jwt_t * jwt, jwk_t * privkey, jwk_t * pubkey);
2393 
2401 int r_jwt_add_enc_jwks(jwt_t * jwt, jwks_t * jwks_privkey, jwks_t * jwks_pubkey);
2402 
2411 int r_jwt_add_enc_keys_json_str(jwt_t * jwt, const char * privkey, const char * pubkey);
2412 
2421 int r_jwt_add_enc_keys_json_t(jwt_t * jwt, json_t * privkey, json_t * pubkey);
2422 
2434 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);
2435 
2444 int r_jwt_add_enc_keys_gnutls(jwt_t * jwt, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey);
2445 
2453 int r_jwt_add_enc_key_symmetric(jwt_t * jwt, const unsigned char * key, size_t key_len);
2454 
2461 
2468 
2475 int r_jwt_set_sign_alg(jwt_t * jwt, jwa_alg alg);
2476 
2483 
2490 int r_jwt_set_enc_alg(jwt_t * jwt, jwa_alg alg);
2491 
2498 
2505 int r_jwt_set_enc(jwt_t * jwt, jwa_enc enc);
2506 
2512 jwa_enc r_jwt_get_enc(jwt_t * jwt);
2513 
2520 const char * r_jwt_get_enc_kid(jwt_t * jwt);
2521 
2528 const char * r_jwt_get_sig_kid(jwt_t * jwt);
2529 
2537 int r_jwt_set_enc_cypher_key(jwt_t * jwt, const unsigned char * key, size_t key_len);
2538 
2545 const unsigned char * r_jwt_get_enc_cypher_key(jwt_t * jwt, size_t * key_len);
2546 
2553 
2561 int r_jwt_set_enc_iv(jwt_t * jwt, const unsigned char * iv, size_t iv_len);
2562 
2569 const unsigned char * r_jwt_get_enc_iv(jwt_t * jwt, size_t * iv_len);
2570 
2577 
2590 char * r_jwt_serialize_signed(jwt_t * jwt, jwk_t * privkey, int x5u_flags);
2591 
2605 char * r_jwt_serialize_signed_unsecure(jwt_t * jwt, jwk_t * privkey, int x5u_flags);
2606 
2619 char * r_jwt_serialize_encrypted(jwt_t * jwt, jwk_t * pubkey, int x5u_flags);
2620 
2645 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);
2646 
2662 int r_jwt_parse(jwt_t * jwt, const char * token, int x5u_flags);
2663 
2680 int r_jwt_parsen(jwt_t * jwt, const char * token, size_t token_len, int x5u_flags);
2681 
2698 int r_jwt_parse_unsecure(jwt_t * jwt, const char * token, int x5u_flags);
2699 
2717 int r_jwt_parsen_unsecure(jwt_t * jwt, const char * token, size_t token_len, int x5u_flags);
2718 
2729 int r_jwt_get_type(jwt_t * jwt);
2730 
2746 int r_jwt_verify_signature(jwt_t * jwt, jwk_t * pubkey, int x5u_flags);
2747 
2761 int r_jwt_decrypt(jwt_t * jwt, jwk_t * privkey, int x5u_flags);
2762 
2785 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);
2786 
2801 int r_jwt_decrypt_nested(jwt_t * jwt, jwk_t * decrypt_key, int decrypt_key_x5u_flags);
2802 
2816 int r_jwt_verify_signature_nested(jwt_t * jwt, jwk_t * verify_key, int verify_key_x5u_flags);
2817 
2844 int r_jwt_validate_claims(jwt_t * jwt, ...);
2845 
2846 int r_jwt_set_claims(jwt_t * jwt, ...);
2847 
2852 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2853 
2857 int _r_json_set_str_value(json_t * j_json, const char * key, const char * str_value);
2858 
2859 int _r_json_set_int_value(json_t * j_json, const char * key, rhn_int_t i_value);
2860 
2861 int _r_json_set_json_t_value(json_t * j_json, const char * key, json_t * j_value);
2862 
2863 const char * _r_json_get_str_value(json_t * j_json, const char * key);
2864 
2865 rhn_int_t _r_json_get_int_value(json_t * j_json, const char * key);
2866 
2867 json_t * _r_json_get_json_t_value(json_t * j_json, const char * key);
2868 
2869 json_t * _r_json_get_full_json_t(json_t * j_json);
2870 
2871 size_t _r_get_key_size(jwa_enc enc);
2872 
2873 gnutls_cipher_algorithm_t _r_get_alg_from_enc(jwa_enc enc);
2874 
2875 int _r_deflate_payload(const unsigned char * uncompressed, size_t uncompressed_len, unsigned char ** compressed, size_t * compressed_len);
2876 
2877 int _r_inflate_payload(const unsigned char * compressed, size_t compressed_len, unsigned char ** uncompressed, size_t * uncompressed_len);
2878 
2879 #endif
2880 
2881 #ifdef __cplusplus
2882 }
2883 #endif
2884 
2885 #endif // __RHONABWY_H_
char * r_library_info_json_str(void)
Definition: misc.c:703
void r_jwe_free(jwe_t *jwe)
Definition: jwe.c:2540
const char * r_jwa_alg_to_str(jwa_alg alg)
Definition: misc.c:496
int r_jws_init(jws_t **jws)
Definition: jws.c:875
jwa_enc r_str_to_jwa_enc(const char *enc)
Definition: misc.c:600
void r_jws_free(jws_t *jws)
Definition: jws.c:918
void r_jwk_free(jwk_t *jwk)
Definition: jwk.c:50
void r_jwks_free(jwks_t *jwks)
Definition: jwks.c:41
void r_jwt_free(jwt_t *jwt)
Definition: jwt.c:94
int r_jwks_init(jwks_t **jwks)
Definition: jwks.c:30
jwa_alg r_str_to_jwa_alg(const char *alg)
Definition: misc.c:424
int r_jwe_init(jwe_t **jwe)
Definition: jwe.c:2486
void r_free(void *data)
Definition: misc.c:713
void r_global_close(void)
Definition: misc.c:59
int r_global_init(void)
Definition: misc.c:37
const char * r_jwa_enc_to_str(jwa_enc enc)
Definition: misc.c:618
int r_jwt_init(jwt_t **jwt)
Definition: jwt.c:34
json_t * r_library_info_json_t(void)
Definition: misc.c:644
int r_jwk_init(jwk_t **jwk)
Definition: jwk.c:39
gnutls_pubkey_t r_jwk_export_to_gnutls_pubkey(jwk_t *jwk, int x5u_flags)
Definition: jwk.c:2148
gnutls_privkey_t r_jwk_export_to_gnutls_privkey(jwk_t *jwk)
Definition: jwk.c:1816
char * r_jwk_thumbprint(jwk_t *jwk, int hash, int x5u_flags)
Definition: jwk.c:2753
gnutls_x509_crt_t r_jwk_export_to_gnutls_crt(jwk_t *jwk, int x5u_flags)
Definition: jwk.c:2440
int r_jwk_export_to_symmetric_key(jwk_t *jwk, unsigned char *key, size_t *key_len)
Definition: jwk.c:2560
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:2504
json_t * r_jwk_export_to_json_t(jwk_t *jwk)
Definition: jwk.c:1808
char * r_jwk_export_to_json_str(jwk_t *jwk, int pretty)
Definition: jwk.c:1800
int r_jwk_validate_x5c_chain(jwk_t *jwk, int x5u_flags)
Definition: jwk.c:2847
int r_jwk_import_from_password(jwk_t *jwk, const char *password)
Definition: jwk.c:1784
int r_jwk_import_from_json_str(jwk_t *jwk, const char *input)
Definition: jwk.c:809
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:842
int r_jwk_import_from_json_t(jwk_t *jwk, json_t *j_input)
Definition: jwk.c:826
int r_jwk_import_from_gnutls_x509_crt(jwk_t *jwk, gnutls_x509_crt_t crt)
Definition: jwk.c:1669
int r_jwk_import_from_symmetric_key(jwk_t *jwk, const unsigned char *key, size_t key_len)
Definition: jwk.c:1755
int r_jwk_import_from_x5c(jwk_t *jwk, const char *x5c)
Definition: jwk.c:1727
int r_jwk_import_from_gnutls_pubkey(jwk_t *jwk, gnutls_pubkey_t pub)
Definition: jwk.c:1406
jwk_t * r_jwk_copy(jwk_t *jwk)
Definition: jwk.c:1788
int r_jwk_equal(jwk_t *jwk1, jwk_t *jwk2)
Definition: jwk.c:1796
int r_jwk_extract_pubkey(jwk_t *jwk_privkey, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jwk.c:758
int r_jwk_import_from_x5u(jwk_t *jwk, int x5u_flags, const char *x5u)
Definition: jwk.c:1705
int r_jwk_import_from_gnutls_privkey(jwk_t *jwk, gnutls_privkey_t key)
Definition: jwk.c:959
char * r_jwe_get_full_header_str(jwe_t *jwe)
Definition: jwe.c:2956
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:3742
const unsigned char * r_jwe_get_payload(jwe_t *jwe, size_t *payload_len)
Definition: jwe.c:2621
int r_jwe_set_iv(jwe_t *jwe, const unsigned char *iv, size_t iv_len)
Definition: jwe.c:2694
json_t * r_jwe_get_full_unprotected_header_json_t(jwe_t *jwe)
Definition: jwe.c:2964
int r_jwe_set_properties(jwe_t *jwe,...)
Definition: jwe.c:4289
int r_jwe_set_header_json_t_value(jwe_t *jwe, const char *key, json_t *j_value)
Definition: jwe.c:2913
int r_jwe_encrypt_payload(jwe_t *jwe)
Definition: jwe.c:3235
char * r_jwe_serialize_json_str(jwe_t *jwe, jwks_t *jwks_pubkey, int x5u_flags, int mode)
Definition: jwe.c:4078
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:3116
int r_jwe_set_payload(jwe_t *jwe, const unsigned char *payload, size_t payload_len)
Definition: jwe.c:2596
int r_jwe_set_enc(jwe_t *jwe, jwa_enc enc)
Definition: jwe.c:2862
int r_jwe_decrypt_payload(jwe_t *jwe)
Definition: jwe.c:3382
jwa_enc r_jwe_get_enc(jwe_t *jwe)
Definition: jwe.c:2873
int r_jwe_parse(jwe_t *jwe, const char *jwe_str, int x5u_flags)
Definition: jwe.c:3590
int r_jwe_set_alg(jwe_t *jwe, jwa_alg alg)
Definition: jwe.c:2843
const char * r_jwe_get_header_str_value(jwe_t *jwe, const char *key)
Definition: jwe.c:2928
int r_jwe_set_full_unprotected_header_json_t(jwe_t *jwe, json_t *j_unprotected_header)
Definition: jwe.c:4262
const unsigned char * r_jwe_get_aad(jwe_t *jwe, size_t *aad_len)
Definition: jwe.c:2788
int r_jwe_add_keys_gnutls(jwe_t *jwe, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey)
Definition: jwe.c:3155
int r_jwe_generate_iv(jwe_t *jwe)
Definition: jwe.c:2798
int r_jwe_set_full_unprotected_header_json_str(jwe_t *jwe, const char *str_unprotected_header)
Definition: jwe.c:4279
int r_jwe_generate_cypher_key(jwe_t *jwe)
Definition: jwe.c:2666
const unsigned char * r_jwe_get_iv(jwe_t *jwe, size_t *iv_len)
Definition: jwe.c:2735
int r_jwe_add_keys(jwe_t *jwe, jwk_t *jwk_privkey, jwk_t *jwk_pubkey)
Definition: jwe.c:2979
jwks_t * r_jwe_get_jwks_pubkey(jwe_t *jwe)
Definition: jwe.c:3227
int r_jwe_parse_json_str(jwe_t *jwe, const char *jwe_json_str, int x5u_flags)
Definition: jwe.c:3738
int r_jwe_set_cypher_key(jwe_t *jwe, const unsigned char *key, size_t key_len)
Definition: jwe.c:2631
int r_jwe_add_keys_json_str(jwe_t *jwe, const char *privkey, const char *pubkey)
Definition: jwe.c:3038
int r_jwe_compact_parse(jwe_t *jwe, const char *jwe_str, int x5u_flags)
Definition: jwe.c:3734
char * r_jwe_get_full_unprotected_header_str(jwe_t *jwe)
Definition: jwe.c:2971
json_t * r_jwe_serialize_json_t(jwe_t *jwe, jwks_t *jwks_pubkey, int x5u_flags, int mode)
Definition: jwe.c:4085
int r_jwe_add_keys_json_t(jwe_t *jwe, json_t *privkey, json_t *pubkey)
Definition: jwe.c:3077
jwks_t * r_jwe_get_jwks_privkey(jwe_t *jwe)
Definition: jwe.c:3219
int r_jwe_set_full_header_json_t(jwe_t *jwe, json_t *j_header)
Definition: jwe.c:4216
jwe_t * r_jwe_copy(jwe_t *jwe)
Definition: jwe.c:2561
int r_jwe_parsen(jwe_t *jwe, const char *jwe_str, size_t jwe_str_len, int x5u_flags)
Definition: jwe.c:3594
int r_jwe_add_key_symmetric(jwe_t *jwe, const unsigned char *key, size_t key_len)
Definition: jwe.c:3194
int r_jwe_decrypt(jwe_t *jwe, jwk_t *jwk_privkey, int x5u_flags)
Definition: jwe.c:3910
int r_jwe_decrypt_key(jwe_t *jwe, jwk_t *jwk_privkey, int x5u_flags)
Definition: jwe.c:3564
int r_jwe_compact_parsen(jwe_t *jwe, const char *jwe_str, size_t jwe_str_len, int x5u_flags)
Definition: jwe.c:3617
int r_jwe_set_aad(jwe_t *jwe, const unsigned char *aad, size_t aad_len)
Definition: jwe.c:2745
json_t * r_jwe_get_header_json_t_value(jwe_t *jwe, const char *key)
Definition: jwe.c:2942
rhn_int_t r_jwe_get_header_int_value(jwe_t *jwe, const char *key)
Definition: jwe.c:2935
int r_jwe_parse_json_t(jwe_t *jwe, json_t *jwe_json, int x5u_flags)
Definition: jwe.c:3753
jwa_alg r_jwe_get_alg(jwe_t *jwe)
Definition: jwe.c:2854
int r_jwe_encrypt_key(jwe_t *jwe, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jwe.c:3516
int r_jwe_set_full_header_json_str(jwe_t *jwe, const char *str_header)
Definition: jwe.c:4252
json_t * r_jwe_get_full_header_json_t(jwe_t *jwe)
Definition: jwe.c:2949
int r_jwe_set_header_str_value(jwe_t *jwe, const char *key, const char *str_value)
Definition: jwe.c:2885
char * r_jwe_serialize(jwe_t *jwe, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jwe.c:4020
const unsigned char * r_jwe_get_cypher_key(jwe_t *jwe, size_t *key_len)
Definition: jwe.c:2656
int r_jwe_set_header_int_value(jwe_t *jwe, const char *key, rhn_int_t i_value)
Definition: jwe.c:2899
int r_jwe_add_jwks(jwe_t *jwe, jwks_t *jwks_privkey, jwks_t *jwks_pubkey)
Definition: jwe.c:3005
const char * r_jwe_get_kid(jwe_t *jwe)
Definition: jwe.c:2881
int r_jwk_set_property_array(jwk_t *jwk, const char *key, size_t index, const char *value)
Definition: jwk.c:2639
const char * r_jwk_get_property_str(jwk_t *jwk, const char *key)
Definition: jwk.c:2588
int r_jwk_delete_property_str(jwk_t *jwk, const char *key)
Definition: jwk.c:2681
int r_jwk_append_property_array(jwk_t *jwk, const char *key, const char *value)
Definition: jwk.c:2663
int r_jwk_set_property_str(jwk_t *jwk, const char *key, const char *value)
Definition: jwk.c:2626
int r_jwk_append_x5c(jwk_t *jwk, int format, const unsigned char *input, size_t input_len)
Definition: jwk.c:2707
int r_jwk_get_property_array_size(jwk_t *jwk, const char *key)
Definition: jwk.c:2613
const char * r_jwk_get_property_array(jwk_t *jwk, const char *key, size_t index)
Definition: jwk.c:2600
int r_jwk_delete_property_array_at(jwk_t *jwk, const char *key, size_t index)
Definition: jwk.c:2694
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:433
int r_jwk_is_valid_x5u(jwk_t *jwk, int x5u_flags)
Definition: jwk.c:382
int r_jwk_key_type(jwk_t *jwk, unsigned int *bits, int x5u_flags)
Definition: jwk.c:586
int r_jwk_is_valid(jwk_t *jwk)
Definition: jwk.c:56
size_t r_jwks_size(jwks_t *jwks)
Definition: jwks.c:68
int r_jwks_import_from_uri(jwks_t *jwks, const char *uri, int x5u_flags)
Definition: jwks.c:310
jwks_t * r_jwks_copy(jwks_t *jwks)
Definition: jwks.c:97
json_t * r_jwks_export_to_json_t(jwks_t *jwks)
Definition: jwks.c:169
int r_jwks_equal(jwks_t *jwks1, jwks_t *jwks2)
Definition: jwks.c:157
gnutls_privkey_t * r_jwks_export_to_gnutls_privkey(jwks_t *jwks, size_t *len)
Definition: jwks.c:177
int r_jwks_import_from_json_t(jwks_t *jwks, json_t *j_input)
Definition: jwks.c:271
int r_jwks_remove_at(jwks_t *jwks, size_t index)
Definition: jwks.c:131
jwk_t * r_jwks_get_by_kid(jwks_t *jwks, const char *kid)
Definition: jwks.c:84
int r_jwks_is_valid(jwks_t *jwks)
Definition: jwks.c:47
int r_jwks_set_at(jwks_t *jwks, size_t index, jwk_t *jwk)
Definition: jwks.c:118
int r_jwks_append_jwk(jwks_t *jwks, jwk_t *jwk)
Definition: jwks.c:105
int r_jwks_import_from_json_str(jwks_t *jwks, const char *input)
Definition: jwks.c:248
char * r_jwks_export_to_json_str(jwks_t *jwks, int pretty)
Definition: jwks.c:161
jwk_t * r_jwks_get_at(jwks_t *jwks, size_t index)
Definition: jwks.c:76
int r_jwks_empty(jwks_t *jwks)
Definition: jwks.c:144
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
gnutls_pubkey_t * r_jwks_export_to_gnutls_pubkey(jwks_t *jwks, size_t *len, int x5u_flags)
Definition: jwks.c:199
int r_jws_set_full_header_json_t(jws_t *jws, json_t *j_value)
Definition: jws.c:2042
int r_jws_compact_parsen_unsecure(jws_t *jws, const char *jws_str, size_t jws_str_len, int x5u_flags)
Definition: jws.c:1472
int r_jws_verify_signature(jws_t *jws, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jws.c:1814
jws_t * r_jws_copy(jws_t *jws)
Definition: jws.c:932
int r_jws_set_header_str_value(jws_t *jws, const char *key, const char *str_value)
Definition: jws.c:1076
int r_jws_add_keys(jws_t *jws, jwk_t *jwk_privkey, jwk_t *jwk_pubkey)
Definition: jws.c:1155
int r_jws_add_key_symmetric(jws_t *jws, const unsigned char *key, size_t key_len)
Definition: jws.c:1370
const unsigned char * r_jws_get_payload(jws_t *jws, size_t *payload_len)
Definition: jws.c:985
rhn_int_t r_jws_get_header_int_value(jws_t *jws, const char *key)
Definition: jws.c:1126
int r_jws_set_properties(jws_t *jws,...)
Definition: jws.c:2080
jwks_t * r_jws_get_jwks_privkey(jws_t *jws)
Definition: jws.c:1395
const char * r_jws_get_kid(jws_t *jws)
Definition: jws.c:1066
int r_jws_parsen_unsecure(jws_t *jws, const char *jws_str, size_t jws_str_len, int x5u_flags)
Definition: jws.c:1432
int r_jws_parse_unsecure(jws_t *jws, const char *jws_str, int x5u_flags)
Definition: jws.c:1428
int r_jws_set_header_json_t_value(jws_t *jws, const char *key, json_t *j_value)
Definition: jws.c:1104
char * r_jws_get_full_header_str(jws_t *jws)
Definition: jws.c:1147
int r_jws_parsen(jws_t *jws, const char *jws_str, size_t jws_str_len, int x5u_flags)
Definition: jws.c:1415
int r_jws_compact_parsen(jws_t *jws, const char *jws_str, size_t jws_str_len, int x5u_flags)
Definition: jws.c:1455
char * r_jws_serialize(jws_t *jws, jwk_t *jwk_privkey, int x5u_flags)
Definition: jws.c:1906
json_t * r_jws_get_full_header_json_t(jws_t *jws)
Definition: jws.c:1140
char * r_jws_serialize_json_str(jws_t *jws, jwks_t *jwks_privkey, int x5u_flags, int mode)
Definition: jws.c:1959
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:1799
json_t * r_jws_serialize_json_t(jws_t *jws, jwks_t *jwks_privkey, int x5u_flags, int mode)
Definition: jws.c:1966
int r_jws_parse_json_t(jws_t *jws, json_t *jws_json, int x5u_flags)
Definition: jws.c:1596
int r_jws_add_keys_json_str(jws_t *jws, const char *privkey, const char *pubkey)
Definition: jws.c:1214
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:1292
char * r_jws_serialize_unsecure(jws_t *jws, jwk_t *jwk_privkey, int x5u_flags)
Definition: jws.c:1914
int r_jws_add_keys_gnutls(jws_t *jws, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey)
Definition: jws.c:1331
json_t * r_jws_get_header_json_t_value(jws_t *jws, const char *key)
Definition: jws.c:1133
int r_jws_compact_parse_unsecure(jws_t *jws, const char *jws_str, int x5u_flags)
Definition: jws.c:1592
int r_jws_add_jwks(jws_t *jws, jwks_t *jwks_privkey, jwks_t *jwks_pubkey)
Definition: jws.c:1181
int r_jws_set_payload(jws_t *jws, const unsigned char *payload, size_t payload_len)
Definition: jws.c:960
jwa_alg r_jws_get_alg(jws_t *jws)
Definition: jws.c:1058
int r_jws_set_full_header_json_str(jws_t *jws, const char *str_value)
Definition: jws.c:2070
int r_jws_parse_json_str(jws_t *jws, const char *jws_json_str, int x5u_flags)
Definition: jws.c:1810
int r_jws_compact_parse(jws_t *jws, const char *jws_str, int x5u_flags)
Definition: jws.c:1468
int r_jws_parse(jws_t *jws, const char *jws_str, int x5u_flags)
Definition: jws.c:1411
int r_jws_add_keys_json_t(jws_t *jws, json_t *privkey, json_t *pubkey)
Definition: jws.c:1253
const char * r_jws_get_header_str_value(jws_t *jws, const char *key)
Definition: jws.c:1119
int r_jws_set_alg(jws_t *jws, jwa_alg alg)
Definition: jws.c:995
jwks_t * r_jws_get_jwks_pubkey(jws_t *jws)
Definition: jws.c:1403
int r_jws_set_header_int_value(jws_t *jws, const char *key, rhn_int_t i_value)
Definition: jws.c:1090
char * r_jwt_serialize_signed(jwt_t *jwt, jwk_t *privkey, int x5u_flags)
Definition: jwt.c:1005
int r_jwt_set_sign_alg(jwt_t *jwt, jwa_alg alg)
Definition: jwt.c:813
jwks_t * r_jwt_get_sign_jwks_privkey(jwt_t *jwt)
Definition: jwt.c:541
int r_jwt_add_enc_key_symmetric(jwt_t *jwt, const unsigned char *key, size_t key_len)
Definition: jwt.c:772
int r_jwt_set_claims(jwt_t *jwt,...)
Definition: jwt.c:1879
int r_jwt_decrypt_nested(jwt_t *jwt, jwk_t *decrypt_key, int decrypt_key_x5u_flags)
Definition: jwt.c:1568
int r_jwt_set_header_json_t_value(jwt_t *jwt, const char *key, json_t *j_value)
Definition: jwt.c:151
int r_jwt_verify_signature(jwt_t *jwt, jwk_t *pubkey, int x5u_flags)
Definition: jwt.c:1345
char * r_jwt_get_full_claims_str(jwt_t *jwt)
Definition: jwt.c:247
int r_jwt_add_sign_keys_json_t(jwt_t *jwt, json_t *privkey, json_t *pubkey)
Definition: jwt.c:399
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:438
jwks_t * r_jwt_get_enc_jwks_pubkey(jwt_t *jwt)
Definition: jwt.c:805
jwt_t * r_jwt_copy(jwt_t *jwt)
Definition: jwt.c:110
jwa_alg r_jwt_get_enc_alg(jwt_t *jwt)
Definition: jwt.c:845
char * r_jwt_serialize_signed_unsecure(jwt_t *jwt, jwk_t *privkey, int x5u_flags)
Definition: jwt.c:1013
int r_jwt_set_enc_iv(jwt_t *jwt, const unsigned char *iv, size_t iv_len)
Definition: jwt.c:926
const char * r_jwt_get_sig_kid(jwt_t *jwt)
Definition: jwt.c:1001
int r_jwt_parse_unsecure(jwt_t *jwt, const char *token, int x5u_flags)
Definition: jwt.c:1333
rhn_int_t r_jwt_get_claim_int_value(jwt_t *jwt, const char *key)
Definition: jwt.c:226
jwa_enc r_jwt_get_enc(jwt_t *jwt)
Definition: jwt.c:989
jwks_t * r_jwt_get_sign_jwks_pubkey(jwt_t *jwt)
Definition: jwt.c:549
json_t * r_jwt_get_claim_json_t_value(jwt_t *jwt, const char *key)
Definition: jwt.c:233
int r_jwt_set_enc_alg(jwt_t *jwt, jwa_alg alg)
Definition: jwt.c:833
int r_jwt_set_full_header_json_t(jwt_t *jwt, json_t *j_header)
Definition: jwt.c:2004
int r_jwt_decrypt(jwt_t *jwt, jwk_t *privkey, int x5u_flags)
Definition: jwt.c:1370
int r_jwt_set_full_claims_json_str(jwt_t *jwt, const char *str_claims)
Definition: jwt.c:266
int r_jwt_set_claim_str_value(jwt_t *jwt, const char *key, const char *str_value)
Definition: jwt.c:195
int r_jwt_set_enc_cypher_key(jwt_t *jwt, const unsigned char *key, size_t key_len)
Definition: jwt.c:865
const unsigned char * r_jwt_get_enc_iv(jwt_t *jwt, size_t *iv_len)
Definition: jwt.c:951
int r_jwt_parsen(jwt_t *jwt, const char *token, size_t token_len, int x5u_flags)
Definition: jwt.c:1189
int r_jwt_set_claim_int_value(jwt_t *jwt, const char *key, rhn_int_t i_value)
Definition: jwt.c:203
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:694
jwa_alg r_jwt_get_sign_alg(jwt_t *jwt)
Definition: jwt.c:825
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:1424
int r_jwt_set_claim_json_t_value(jwt_t *jwt, const char *key, json_t *j_value)
Definition: jwt.c:211
int r_jwt_verify_signature_nested(jwt_t *jwt, jwk_t *verify_key, int verify_key_x5u_flags)
Definition: jwt.c:1665
int r_jwt_set_properties(jwt_t *jwt,...)
Definition: jwt.c:2059
rhn_int_t r_jwt_get_header_int_value(jwt_t *jwt, const char *key)
Definition: jwt.c:166
int r_jwt_add_enc_jwks(jwt_t *jwt, jwks_t *jwks_privkey, jwks_t *jwks_pubkey)
Definition: jwt.c:583
int r_jwt_add_sign_keys_gnutls(jwt_t *jwt, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey)
Definition: jwt.c:477
int r_jwt_add_enc_keys_json_str(jwt_t *jwt, const char *privkey, const char *pubkey)
Definition: jwt.c:616
int r_jwt_validate_claims(jwt_t *jwt,...)
Definition: jwt.c:1697
int r_jwt_add_sign_key_symmetric(jwt_t *jwt, const unsigned char *key, size_t key_len)
Definition: jwt.c:516
char * r_jwt_get_full_header_str(jwt_t *jwt)
Definition: jwt.c:187
int r_jwt_parsen_unsecure(jwt_t *jwt, const char *token, size_t token_len, int x5u_flags)
Definition: jwt.c:1202
int r_jwt_set_header_str_value(jwt_t *jwt, const char *key, const char *str_value)
Definition: jwt.c:135
int r_jwt_parse(jwt_t *jwt, const char *token, int x5u_flags)
Definition: jwt.c:1185
int r_jwt_set_full_claims_json_t(jwt_t *jwt, json_t *j_claim)
Definition: jwt.c:255
const char * r_jwt_get_enc_kid(jwt_t *jwt)
Definition: jwt.c:997
int r_jwt_add_sign_keys(jwt_t *jwt, jwk_t *privkey, jwk_t *pubkey)
Definition: jwt.c:301
int r_jwt_append_claims_json_t(jwt_t *jwt, json_t *j_claim)
Definition: jwt.c:283
int r_jwt_add_sign_keys_json_str(jwt_t *jwt, const char *privkey, const char *pubkey)
Definition: jwt.c:360
int r_jwt_set_enc(jwt_t *jwt, jwa_enc enc)
Definition: jwt.c:853
int r_jwt_add_sign_jwks(jwt_t *jwt, jwks_t *jwks_privkey, jwks_t *jwks_pubkey)
Definition: jwt.c:327
int r_jwt_add_enc_keys(jwt_t *jwt, jwk_t *privkey, jwk_t *pubkey)
Definition: jwt.c:557
int r_jwt_add_enc_keys_json_t(jwt_t *jwt, json_t *privkey, json_t *pubkey)
Definition: jwt.c:655
json_t * r_jwt_get_header_json_t_value(jwt_t *jwt, const char *key)
Definition: jwt.c:173
json_t * r_jwt_get_full_header_json_t(jwt_t *jwt)
Definition: jwt.c:180
const unsigned char * r_jwt_get_enc_cypher_key(jwt_t *jwt, size_t *key_len)
Definition: jwt.c:890
int r_jwt_set_full_header_json_str(jwt_t *jwt, const char *str_header)
Definition: jwt.c:2049
int r_jwt_set_header_int_value(jwt_t *jwt, const char *key, rhn_int_t i_value)
Definition: jwt.c:143
char * r_jwt_serialize_encrypted(jwt_t *jwt, jwk_t *pubkey, int x5u_flags)
Definition: jwt.c:1054
const char * r_jwt_get_claim_str_value(jwt_t *jwt, const char *key)
Definition: jwt.c:219
json_t * r_jwt_get_full_claims_json_t(jwt_t *jwt)
Definition: jwt.c:240
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:1104
const char * r_jwt_get_header_str_value(jwt_t *jwt, const char *key)
Definition: jwt.c:159
int r_jwt_generate_iv(jwt_t *jwt)
int r_jwt_add_enc_keys_gnutls(jwt_t *jwt, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey)
Definition: jwt.c:733
int r_jwt_generate_enc_cypher_key(jwt_t *jwt)
Definition: jwt.c:900
jwks_t * r_jwt_get_enc_jwks_privkey(jwt_t *jwt)
Definition: jwt.c:797
int r_jwt_get_type(jwt_t *jwt)
Definition: jwt.c:1337
jwa_enc
Definition: rhonabwy.h:160
rhn_opt
Definition: rhonabwy.h:170
json_int_t rhn_int_t
Definition: rhonabwy.h:104
rhn_claim_opt
Definition: rhonabwy.h:144
jwa_alg
Definition: rhonabwy.h:108
json_t jwk_t
Definition: rhonabwy.h:102
json_t jwks_t
Definition: rhonabwy.h:103
@ R_JWA_ENC_UNKNOWN
Definition: rhonabwy.h:161
@ R_JWA_ENC_A192GCM
Definition: rhonabwy.h:166
@ R_JWA_ENC_A128GCM
Definition: rhonabwy.h:165
@ R_JWA_ENC_A128CBC
Definition: rhonabwy.h:162
@ R_JWA_ENC_A256GCM
Definition: rhonabwy.h:167
@ R_JWA_ENC_A192CBC
Definition: rhonabwy.h:163
@ R_JWA_ENC_A256CBC
Definition: rhonabwy.h:164
@ RHN_OPT_VERIFY_KEY_JWKS
Public key set in JWKS format to verify the token signature, following parameter must be a jwks_t * v...
Definition: rhonabwy.h:198
@ RHN_OPT_SIG_ALG
Signature algorithm, following parameter must be a jwa_alg value.
Definition: rhonabwy.h:187
@ RHN_OPT_HEADER_JSON_T_VALUE
Header JSON value, following parameters must be const char * name, json_t * j_value.
Definition: rhonabwy.h:174
@ RHN_OPT_HEADER_INT_VALUE
Header Integer value, following parameters must be const char * name, int i_value.
Definition: rhonabwy.h:172
@ RHN_OPT_DECRYPT_KEY_JWK
Private key in JWK format to decrypt the token, following parameter must be a jwk_t * value.
Definition: rhonabwy.h:209
@ RHN_OPT_SIGN_KEY_JSON_T
Private key in JSON format to sign the token, following parameter must be a json_t * value.
Definition: rhonabwy.h:194
@ RHN_OPT_ENCRYPT_KEY_JSON_T
Public key in JSON format to encrypt the token, following parameter must be a json_t * value.
Definition: rhonabwy.h:206
@ RHN_OPT_HEADER_FULL_JSON_STR
Stringified JSON value to set the entire header, following parameter must be const char * str_value.
Definition: rhonabwy.h:176
@ RHN_OPT_DECRYPT_KEY_JWKS
Private key set in JWKS format to decrypt the token, following parameter must be a jwks_t * value.
Definition: rhonabwy.h:210
@ RHN_OPT_ENCRYPT_KEY_JSON_STR
Public key in stringified JSON format to encrypt the token, following parameter must be a const char ...
Definition: rhonabwy.h:207
@ RHN_OPT_VERIFY_KEY_JWK
Public key in JWK format to verify the token signature, following parameter must be a jwk_t * value.
Definition: rhonabwy.h:197
@ RHN_OPT_DECRYPT_KEY_JSON_STR
Private key in stringified JSON format to decrypt the token, following parameter must be a const char...
Definition: rhonabwy.h:213
@ RHN_OPT_ENCRYPT_KEY_GNUTLS
Public key in GnuTLS format to encrypt the token, following parameter must be a gnutls_pubkey_t value...
Definition: rhonabwy.h:205
@ RHN_OPT_VERIFY_KEY_GNUTLS
Public key in GnuTLS format to verify the token signature, following parameter must be a gnutls_pubke...
Definition: rhonabwy.h:199
@ RHN_OPT_SIGN_KEY_GNUTLS
Private key in GnuTLS format to sign the token, following parameter must be a gnutls_privkey_t value.
Definition: rhonabwy.h:193
@ RHN_OPT_HEADER_STR_VALUE
Header String value, following parameters must be const char * name, const char * str_value.
Definition: rhonabwy.h:173
@ RHN_OPT_ENCRYPT_KEY_PEM_DER
Public key in PEM or DER format to encrypt the token, following parameter must be R_FORMAT_PEM or R_F...
Definition: rhonabwy.h:208
@ RHN_OPT_UN_HEADER_FULL_JSON_STR
Stringified JSON value to set the entire unprotected header, following parameter must be const char *...
Definition: rhonabwy.h:178
@ RHN_OPT_AAD
Additional Authenticated Data (AAD) for data encryption, following parameters must be const unsigned ...
Definition: rhonabwy.h:190
@ RHN_OPT_HEADER_FULL_JSON_T
JSON value to set the entire header, following parameter must be json_t * j_value.
Definition: rhonabwy.h:175
@ RHN_OPT_CLAIM_INT_VALUE
Claims Integer value, following parameters must be const char * name, int i_value.
Definition: rhonabwy.h:180
@ RHN_OPT_VERIFY_KEY_JSON_STR
Public key in stringified JSON format to verify the token signature, following parameter must be a co...
Definition: rhonabwy.h:201
@ RHN_OPT_CIPHER_KEY
Cipher key to encrypt data, following parameters must be const unsigned char * value,...
Definition: rhonabwy.h:188
@ RHN_OPT_SIGN_KEY_JWK
Private key in JWK format to sign the token, following parameter must be a jwk_t * value.
Definition: rhonabwy.h:191
@ RHN_OPT_VERIFY_KEY_PEM_DER
Public key in PEM or DER format to verify the token signature, following parameter must be R_FORMAT_P...
Definition: rhonabwy.h:202
@ RHN_OPT_CLAIM_FULL_JSON_STR
Stringified JSON value to set the entire claims, following parameter must be const char * str_value.
Definition: rhonabwy.h:184
@ RHN_OPT_CLAIM_STR_VALUE
Claims String value, following parameters must be const char * name, const char * str_value.
Definition: rhonabwy.h:181
@ RHN_OPT_IV
Initial Value (IV) for data encryption, following parameters must be const unsigned char * value,...
Definition: rhonabwy.h:189
@ RHN_OPT_SIGN_KEY_PEM_DER
Private key in PEM or DER format to sign the token, following parameter must be R_FORMAT_PEM or R_FOR...
Definition: rhonabwy.h:196
@ RHN_OPT_DECRYPT_KEY_JSON_T
Private key in JSON format to decrypt the token, following parameter must be a json_t * value.
Definition: rhonabwy.h:212
@ RHN_OPT_CLAIM_JSON_T_VALUE
Claims JSON value, following parameters must be const char * name, json_t * j_value.
Definition: rhonabwy.h:182
@ RHN_OPT_DECRYPT_KEY_PEM_DER
Private key in PEM or DER format to decrypt the token, following parameter must be R_FORMAT_PEM or R_...
Definition: rhonabwy.h:214
@ RHN_OPT_SIGN_KEY_JWKS
Private key set in JWKS format to sign the token, following parameter must be a jwks_t * value.
Definition: rhonabwy.h:192
@ RHN_OPT_SIGN_KEY_JSON_STR
Private key in stringified JSON format to sign the token, following parameter must be a const char * ...
Definition: rhonabwy.h:195
@ RHN_OPT_UN_HEADER_FULL_JSON_T
JSON value to set the entire unprotected header, following parameter must be json_t * j_value.
Definition: rhonabwy.h:177
@ RHN_OPT_CLAIM_FULL_JSON_T
JSON value to set the entire claims, following parameter must be json_t * j_value.
Definition: rhonabwy.h:183
@ RHN_OPT_ENC_ALG
Key management algorithm, following parameter must be a jwa_alg value.
Definition: rhonabwy.h:185
@ RHN_OPT_VERIFY_KEY_JSON_T
Public key in JSON format to verify the token signature, following parameter must be a json_t * value...
Definition: rhonabwy.h:200
@ RHN_OPT_DECRYPT_KEY_GNUTLS
Private key in GnuTLS format to decrypt the token, following parameter must be a gnutls_privkey_t val...
Definition: rhonabwy.h:211
@ RHN_OPT_ENC
Encryption algorithm, following parameter must be a jwa_enc value.
Definition: rhonabwy.h:186
@ RHN_OPT_NONE
End option list, mandatory at the end of the option list.
Definition: rhonabwy.h:171
@ RHN_OPT_PAYLOAD
JSON value to set the entire payload, following parameters must be const unsigned char * value,...
Definition: rhonabwy.h:179
@ RHN_OPT_ENCRYPT_KEY_JWKS
Public key set in JWKS format to encrypt the token, following parameter must be a jwks_t * value.
Definition: rhonabwy.h:204
@ RHN_OPT_ENCRYPT_KEY_JWK
Public key in JWK format to encrypt the token, following parameter must be a jwk_t * value.
Definition: rhonabwy.h:203
@ R_JWT_CLAIM_ISS
Definition: rhonabwy.h:146
@ R_JWT_CLAIM_SUB
Definition: rhonabwy.h:147
@ R_JWT_CLAIM_NBF
Definition: rhonabwy.h:150
@ R_JWT_CLAIM_JSN
Definition: rhonabwy.h:155
@ R_JWT_CLAIM_IAT
Definition: rhonabwy.h:151
@ R_JWT_CLAIM_TYP
Definition: rhonabwy.h:156
@ R_JWT_CLAIM_STR
Definition: rhonabwy.h:153
@ R_JWT_CLAIM_INT
Definition: rhonabwy.h:154
@ R_JWT_CLAIM_EXP
Definition: rhonabwy.h:149
@ R_JWT_CLAIM_NOP
Definition: rhonabwy.h:145
@ R_JWT_CLAIM_AUD
Definition: rhonabwy.h:148
@ R_JWT_CLAIM_CTY
Definition: rhonabwy.h:157
@ R_JWT_CLAIM_JTI
Definition: rhonabwy.h:152
@ R_JWA_ALG_A256KW
Definition: rhonabwy.h:129
@ R_JWA_ALG_A192GCMKW
Definition: rhonabwy.h:136
@ R_JWA_ALG_ES384
Definition: rhonabwy.h:118
@ R_JWA_ALG_A192KW
Definition: rhonabwy.h:128
@ R_JWA_ALG_PBES2_H384
Definition: rhonabwy.h:139
@ R_JWA_ALG_HS384
Definition: rhonabwy.h:112
@ R_JWA_ALG_EDDSA
Definition: rhonabwy.h:120
@ R_JWA_ALG_DIR
Definition: rhonabwy.h:130
@ R_JWA_ALG_A128KW
Definition: rhonabwy.h:127
@ R_JWA_ALG_HS512
Definition: rhonabwy.h:113
@ R_JWA_ALG_PS512
Definition: rhonabwy.h:123
@ R_JWA_ALG_PS384
Definition: rhonabwy.h:122
@ R_JWA_ALG_PBES2_H512
Definition: rhonabwy.h:140
@ R_JWA_ALG_NONE
Definition: rhonabwy.h:110
@ R_JWA_ALG_RSA1_5
Definition: rhonabwy.h:124
@ R_JWA_ALG_ES256
Definition: rhonabwy.h:117
@ R_JWA_ALG_RSA_OAEP_256
Definition: rhonabwy.h:126
@ R_JWA_ALG_A128GCMKW
Definition: rhonabwy.h:135
@ R_JWA_ALG_ECDH_ES_A192KW
Definition: rhonabwy.h:133
@ R_JWA_ALG_ES512
Definition: rhonabwy.h:119
@ R_JWA_ALG_RS512
Definition: rhonabwy.h:116
@ R_JWA_ALG_RS256
Definition: rhonabwy.h:114
@ R_JWA_ALG_A256GCMKW
Definition: rhonabwy.h:137
@ R_JWA_ALG_ES256K
Definition: rhonabwy.h:141
@ R_JWA_ALG_RS384
Definition: rhonabwy.h:115
@ R_JWA_ALG_UNKNOWN
Definition: rhonabwy.h:109
@ R_JWA_ALG_ECDH_ES_A128KW
Definition: rhonabwy.h:132
@ R_JWA_ALG_ECDH_ES
Definition: rhonabwy.h:131
@ R_JWA_ALG_HS256
Definition: rhonabwy.h:111
@ R_JWA_ALG_PS256
Definition: rhonabwy.h:121
@ R_JWA_ALG_PBES2_H256
Definition: rhonabwy.h:138
@ R_JWA_ALG_RSA_OAEP
Definition: rhonabwy.h:125
@ R_JWA_ALG_ECDH_ES_A256KW
Definition: rhonabwy.h:134
int _r_inflate_payload(const unsigned char *compressed, size_t compressed_len, unsigned char **uncompressed, size_t *uncompressed_len)
Definition: misc.c:382
rhn_int_t _r_json_get_int_value(json_t *j_json, const char *key)
Definition: misc.c:257
size_t _r_get_key_size(jwa_enc enc)
Definition: misc.c:280
int _r_deflate_payload(const unsigned char *uncompressed, size_t uncompressed_len, unsigned char **compressed, size_t *compressed_len)
Definition: misc.c:339
int _r_json_set_json_t_value(json_t *j_json, const char *key, json_t *j_value)
Definition: misc.c:229
const char * _r_json_get_str_value(json_t *j_json, const char *key)
Definition: misc.c:250
json_t * _r_json_get_full_json_t(json_t *j_json)
Definition: misc.c:273
int _r_json_set_str_value(json_t *j_json, const char *key, const char *str_value)
Definition: misc.c:192
gnutls_cipher_algorithm_t _r_get_alg_from_enc(jwa_enc enc)
Definition: misc.c:306
json_t * _r_json_get_json_t_value(json_t *j_json, const char *key)
Definition: misc.c:264
int _r_json_set_int_value(json_t *j_json, const char *key, rhn_int_t i_value)
Definition: misc.c:213
Definition: rhonabwy.h:231
size_t payload_len
Definition: rhonabwy.h:251
json_t * j_header
Definition: rhonabwy.h:238
unsigned char * iv
Definition: rhonabwy.h:248
jwa_enc enc
Definition: rhonabwy.h:241
json_t * j_json_serialization
Definition: rhonabwy.h:252
jwks_t * jwks_privkey
Definition: rhonabwy.h:242
unsigned char * iv_b64url
Definition: rhonabwy.h:235
size_t key_len
Definition: rhonabwy.h:247
unsigned char * auth_tag_b64url
Definition: rhonabwy.h:237
unsigned char * aad_b64url
Definition: rhonabwy.h:234
size_t aad_len
Definition: rhonabwy.h:245
unsigned char * header_b64url
Definition: rhonabwy.h:232
unsigned char * ciphertext_b64url
Definition: rhonabwy.h:236
jwa_alg alg
Definition: rhonabwy.h:240
unsigned char * key
Definition: rhonabwy.h:246
unsigned char * aad
Definition: rhonabwy.h:244
jwks_t * jwks_pubkey
Definition: rhonabwy.h:243
unsigned char * payload
Definition: rhonabwy.h:250
size_t iv_len
Definition: rhonabwy.h:249
unsigned char * encrypted_key_b64url
Definition: rhonabwy.h:233
json_t * j_unprotected_header
Definition: rhonabwy.h:239
int token_mode
Definition: rhonabwy.h:253
Definition: rhonabwy.h:217
int token_mode
Definition: rhonabwy.h:228
size_t payload_len
Definition: rhonabwy.h:226
jwks_t * jwks_pubkey
Definition: rhonabwy.h:224
jwks_t * jwks_privkey
Definition: rhonabwy.h:223
unsigned char * payload
Definition: rhonabwy.h:225
json_t * j_json_serialization
Definition: rhonabwy.h:227
unsigned char * payload_b64url
Definition: rhonabwy.h:219
json_t * j_header
Definition: rhonabwy.h:221
unsigned char * signature_b64url
Definition: rhonabwy.h:220
jwa_alg alg
Definition: rhonabwy.h:222
unsigned char * header_b64url
Definition: rhonabwy.h:218
Definition: rhonabwy.h:256
jwa_alg enc_alg
Definition: rhonabwy.h:263
jwks_t * jwks_privkey_sign
Definition: rhonabwy.h:269
json_t * j_claims
Definition: rhonabwy.h:259
jwa_alg sign_alg
Definition: rhonabwy.h:262
jwa_enc enc
Definition: rhonabwy.h:264
size_t key_len
Definition: rhonabwy.h:266
jwks_t * jwks_pubkey_enc
Definition: rhonabwy.h:272
int type
Definition: rhonabwy.h:257
unsigned char * iv
Definition: rhonabwy.h:267
jws_t * jws
Definition: rhonabwy.h:260
jwks_t * jwks_privkey_enc
Definition: rhonabwy.h:271
jwe_t * jwe
Definition: rhonabwy.h:261
unsigned char * key
Definition: rhonabwy.h:265
json_t * j_header
Definition: rhonabwy.h:258
size_t iv_len
Definition: rhonabwy.h:268
jwks_t * jwks_pubkey_sign
Definition: rhonabwy.h:270