Rhonabwy: include/rhonabwy.h Source File

Rhonabwy Create, modify, parse or export Json Web Keys as defined in the RFC 7517

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_ECDSA 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
105 typedef enum {
106 R_JWA_ALG_UNKNOWN = 0,
107 R_JWA_ALG_NONE = 1,
108 R_JWA_ALG_HS256 = 2,
109 R_JWA_ALG_HS384 = 3,
110 R_JWA_ALG_HS512 = 4,
111 R_JWA_ALG_RS256 = 5,
112 R_JWA_ALG_RS384 = 6,
113 R_JWA_ALG_RS512 = 7,
114 R_JWA_ALG_ES256 = 8,
115 R_JWA_ALG_ES384 = 9,
116 R_JWA_ALG_ES512 = 10,
117 R_JWA_ALG_EDDSA = 11,
118 R_JWA_ALG_PS256 = 12,
119 R_JWA_ALG_PS384 = 13,
120 R_JWA_ALG_PS512 = 14,
121 R_JWA_ALG_RSA1_5 = 15,
122 R_JWA_ALG_RSA_OAEP = 16,
123 R_JWA_ALG_RSA_OAEP_256 = 17,
124 R_JWA_ALG_A128KW = 18,
125 R_JWA_ALG_A192KW = 19,
126 R_JWA_ALG_A256KW = 20,
127 R_JWA_ALG_DIR = 21,
128 R_JWA_ALG_ECDH_ES = 22,
129 R_JWA_ALG_ECDH_ES_A128KW = 23,
130 R_JWA_ALG_ECDH_ES_A192KW = 24,
131 R_JWA_ALG_ECDH_ES_A256KW = 25,
132 R_JWA_ALG_A128GCMKW = 26,
133 R_JWA_ALG_A192GCMKW = 27,
134 R_JWA_ALG_A256GCMKW = 28,
135 R_JWA_ALG_PBES2_H256 = 29,
136 R_JWA_ALG_PBES2_H384 = 30,
137 R_JWA_ALG_PBES2_H512 = 31,
138 R_JWA_ALG_ES256K = 32
139 } jwa_alg;
140
141 typedef enum {
142 R_JWT_CLAIM_NOP = 0,
143 R_JWT_CLAIM_ISS = 1,
144 R_JWT_CLAIM_SUB = 2,
145 R_JWT_CLAIM_AUD = 3,
146 R_JWT_CLAIM_EXP = 4,
147 R_JWT_CLAIM_NBF = 5,
148 R_JWT_CLAIM_IAT = 6,
149 R_JWT_CLAIM_JTI = 7,
150 R_JWT_CLAIM_STR = 8,
151 R_JWT_CLAIM_INT = 9,
152 R_JWT_CLAIM_JSN = 10,
153 R_JWT_CLAIM_TYP = 11,
154 R_JWT_CLAIM_CTY = 12,
155 } rhn_claim_opt;
156
157 typedef enum {
158 R_JWA_ENC_UNKNOWN = 0,
159 R_JWA_ENC_A128CBC = 1,
160 R_JWA_ENC_A192CBC = 2,
161 R_JWA_ENC_A256CBC = 3,
162 R_JWA_ENC_A128GCM = 4,
163 R_JWA_ENC_A192GCM = 5,
164 R_JWA_ENC_A256GCM = 6
165 } jwa_enc;
166
167 typedef enum {
168 RHN_OPT_NONE = 0,
169 RHN_OPT_HEADER_INT_VALUE = 1,
170 RHN_OPT_HEADER_STR_VALUE = 2,
171 RHN_OPT_HEADER_JSON_T_VALUE = 3,
172 RHN_OPT_HEADER_FULL_JSON_T = 4,
173 RHN_OPT_HEADER_FULL_JSON_STR = 5,
174 RHN_OPT_UN_HEADER_FULL_JSON_T = 6,
175 RHN_OPT_UN_HEADER_FULL_JSON_STR = 7,
176 RHN_OPT_PAYLOAD = 8,
177 RHN_OPT_CLAIM_INT_VALUE = 9,
178 RHN_OPT_CLAIM_STR_VALUE = 10,
179 RHN_OPT_CLAIM_JSON_T_VALUE = 11,
180 RHN_OPT_CLAIM_FULL_JSON_T = 12,
181 RHN_OPT_CLAIM_FULL_JSON_STR = 13,
182 RHN_OPT_ENC_ALG = 14,
183 RHN_OPT_ENC = 15,
184 RHN_OPT_SIG_ALG = 16,
185 RHN_OPT_CIPHER_KEY = 17,
186 RHN_OPT_IV = 18,
187 RHN_OPT_AAD = 19,
188 RHN_OPT_SIGN_KEY_JWK = 20,
189 RHN_OPT_SIGN_KEY_JWKS = 21,
190 RHN_OPT_SIGN_KEY_GNUTLS = 22,
191 RHN_OPT_SIGN_KEY_JSON_T = 23,
192 RHN_OPT_SIGN_KEY_JSON_STR = 24,
193 RHN_OPT_SIGN_KEY_PEM_DER = 25,
194 RHN_OPT_VERIFY_KEY_JWK = 26,
195 RHN_OPT_VERIFY_KEY_JWKS = 27,
196 RHN_OPT_VERIFY_KEY_GNUTLS = 28,
197 RHN_OPT_VERIFY_KEY_JSON_T = 29,
198 RHN_OPT_VERIFY_KEY_JSON_STR = 30,
199 RHN_OPT_VERIFY_KEY_PEM_DER = 31,
200 RHN_OPT_ENCRYPT_KEY_JWK = 32,
201 RHN_OPT_ENCRYPT_KEY_JWKS = 33,
202 RHN_OPT_ENCRYPT_KEY_GNUTLS = 34,
203 RHN_OPT_ENCRYPT_KEY_JSON_T = 35,
204 RHN_OPT_ENCRYPT_KEY_JSON_STR = 36,
205 RHN_OPT_ENCRYPT_KEY_PEM_DER = 37,
206 RHN_OPT_DECRYPT_KEY_JWK = 38,
207 RHN_OPT_DECRYPT_KEY_JWKS = 39,
208 RHN_OPT_DECRYPT_KEY_GNUTLS = 40,
209 RHN_OPT_DECRYPT_KEY_JSON_T = 41,
210 RHN_OPT_DECRYPT_KEY_JSON_STR = 42,
211 RHN_OPT_DECRYPT_KEY_PEM_DER = 43
212 } rhn_opt;
213
214 typedef struct {
215 unsigned char * header_b64url;
216 unsigned char * payload_b64url;
217 unsigned char * signature_b64url;
218 json_t * j_header;
219 jwa_alg alg;
220 jwks_t * jwks_privkey;
221 jwks_t * jwks_pubkey;
222 unsigned char * payload;
223 size_t payload_len;
224 json_t * j_json_serialization;
225 int token_mode;
226 } jws_t;
227
228 typedef struct {
229 unsigned char * header_b64url;
230 unsigned char * encrypted_key_b64url;
231 unsigned char * aad_b64url;
232 unsigned char * iv_b64url;
233 unsigned char * ciphertext_b64url;
234 unsigned char * auth_tag_b64url;
235 json_t * j_header;
236 json_t * j_unprotected_header;
237 jwa_alg alg;
238 jwa_enc enc;
239 jwks_t * jwks_privkey;
240 jwks_t * jwks_pubkey;
241 unsigned char * aad;
242 size_t aad_len;
243 unsigned char * key;
244 size_t key_len;
245 unsigned char * iv;
246 size_t iv_len;
247 unsigned char * payload;
248 size_t payload_len;
249 json_t * j_json_serialization;
250 int token_mode;
251 } jwe_t;
252
253 typedef struct {
254 int type;
255 json_t * j_header;
256 json_t * j_claims;
257 jws_t * jws;
258 jwe_t * jwe;
259 jwa_alg sign_alg;
260 jwa_alg enc_alg;
261 jwa_enc enc;
262 unsigned char * key;
263 size_t key_len;
264 unsigned char * iv;
265 size_t iv_len;
266 jwks_t * jwks_privkey_sign;
267 jwks_t * jwks_pubkey_sign;
268 jwks_t * jwks_privkey_enc;
269 jwks_t * jwks_pubkey_enc;
270 } jwt_t;
271
289 int r_global_init();
290
294 void r_global_close();
295
303 json_t * r_library_info_json_t();
304
312 char * r_library_info_json_str();
313
319 void r_free(void * data);
320
326 int r_jwk_init(jwk_t ** jwk);
327
332 void r_jwk_free(jwk_t * jwk);
333
339 int r_jwks_init(jwks_t ** jwks);
340
345 void r_jwks_free(jwks_t * jwks);
346
352 int r_jws_init(jws_t ** jws);
353
358 void r_jws_free(jws_t * jws);
359
365 int r_jwe_init(jwe_t ** jwe);
366
371 void r_jwe_free(jwe_t * jwe);
372
378 int r_jwt_init(jwt_t ** jwt);
379
384 void r_jwt_free(jwt_t * jwt);
385
391 jwa_alg r_str_to_jwa_alg(const char * alg);
392
399 const char * r_jwa_alg_to_str(jwa_alg alg);
400
406 jwa_enc r_str_to_jwa_enc(const char * enc);
407
414 const char * r_jwa_enc_to_str(jwa_enc enc);
415
451 int r_jwk_key_type(jwk_t * jwk, unsigned int * bits, int x5u_flags);
452
459 int r_jwk_is_valid(jwk_t * jwk);
460
473 int r_jwk_is_valid_x5u(jwk_t * jwk, int x5u_flags);
474
486 int r_jwk_generate_key_pair(jwk_t * jwk_privkey, jwk_t * jwk_pubkey, int type, unsigned int bits, const char * kid);
487
504 const char * r_jwk_get_property_str(jwk_t * jwk, const char * key);
505
513 const char * r_jwk_get_property_array(jwk_t * jwk, const char * key, size_t index);
514
521 int r_jwk_get_property_array_size(jwk_t * jwk, const char * key);
522
531 int r_jwk_set_property_str(jwk_t * jwk, const char * key, const char * value);
532
542 int r_jwk_set_property_array(jwk_t * jwk, const char * key, size_t index, const char * value);
543
552 int r_jwk_append_property_array(jwk_t * jwk, const char * key, const char * value);
553
561 int r_jwk_delete_property_str(jwk_t * jwk, const char * key);
562
571 int r_jwk_delete_property_array_at(jwk_t * jwk, const char * key, size_t index);
572
582 int r_jwk_append_x5c(jwk_t * jwk, int format, const unsigned char * input, size_t input_len);
583
601 int r_jwk_import_from_json_str(jwk_t * jwk, const char * input);
602
610 int r_jwk_import_from_json_t(jwk_t * jwk, json_t * j_input);
611
622 int r_jwk_import_from_pem_der(jwk_t * jwk, int type, int format, const unsigned char * input, size_t input_len);
623
631 int r_jwk_import_from_gnutls_privkey(jwk_t * jwk, gnutls_privkey_t key);
632
640 int r_jwk_import_from_gnutls_pubkey(jwk_t * jwk, gnutls_pubkey_t pub);
641
649 int r_jwk_import_from_gnutls_x509_crt(jwk_t * jwk, gnutls_x509_crt_t crt);
650
662 int r_jwk_import_from_x5u(jwk_t * jwk, int x5u_flags, const char * x5u);
663
672 int r_jwk_import_from_symmetric_key(jwk_t * jwk, const unsigned char * key, size_t key_len);
673
681 int r_jwk_import_from_password(jwk_t * jwk, const char * password);
682
695 int r_jwk_extract_pubkey(jwk_t * jwk_privkey, jwk_t * jwk_pubkey, int x5u_flags);
696
702 jwk_t * r_jwk_copy(jwk_t * jwk);
703
710 int r_jwk_equal(jwk_t * jwk1, jwk_t * jwk2);
711
728 char * r_jwk_export_to_json_str(jwk_t * jwk, int pretty);
729
735 json_t * r_jwk_export_to_json_t(jwk_t * jwk);
736
742 gnutls_privkey_t r_jwk_export_to_gnutls_privkey(jwk_t * jwk);
743
755 gnutls_pubkey_t r_jwk_export_to_gnutls_pubkey(jwk_t * jwk, int x5u_flags);
756
770 gnutls_x509_crt_t r_jwk_export_to_gnutls_crt(jwk_t * jwk, int x5u_flags);
771
787 int r_jwk_export_to_pem_der(jwk_t * jwk, int format, unsigned char * output, size_t * output_len, int x5u_flags);
788
797 int r_jwk_export_to_symmetric_key(jwk_t * jwk, unsigned char * key, size_t * key_len);
798
815 char * r_jwk_thumbprint(jwk_t * jwk, int hash, int x5u_flags);
816
829 int r_jwk_validate_x5c_chain(jwk_t * jwk, int x5u_flags);
830
848 int r_jwks_is_valid(jwks_t * jwks);
849
859 int r_jwks_import_from_str(jwks_t * jwks, const char * input);
860
870 int r_jwks_import_from_json_t(jwks_t * jwks, json_t * j_input);
871
885 int r_jwks_import_from_uri(jwks_t * jwks, const char * uri, int x5u_flags);
886
892 jwks_t * r_jwks_copy(jwks_t * jwks);
893
899 size_t r_jwks_size(jwks_t * jwks);
900
908 jwk_t * r_jwks_get_at(jwks_t * jwks, size_t index);
909
917 jwk_t * r_jwks_get_by_kid(jwks_t * jwks, const char * kid);
918
925 int r_jwks_append_jwk(jwks_t * jwks, jwk_t * jwk);
926
934 int r_jwks_set_at(jwks_t * jwks, size_t index, jwk_t * jwk);
935
942 int r_jwks_remove_at(jwks_t * jwks, size_t index);
943
949 int r_jwks_empty(jwks_t * jwks);
950
958 int r_jwks_equal(jwks_t * jwks1, jwks_t * jwks2);
959
966 char * r_jwks_export_to_json_str(jwks_t * jwks, int pretty);
967
973 json_t * r_jwks_export_to_json_t(jwks_t * jwks);
974
982 gnutls_privkey_t * r_jwks_export_to_gnutls_privkey(jwks_t * jwks, size_t * len);
983
996 gnutls_pubkey_t * r_jwks_export_to_gnutls_pubkey(jwks_t * jwks, size_t * len, int x5u_flags);
997
1013 int r_jwks_export_to_pem_der(jwks_t * jwks, int format, unsigned char * output, size_t * output_len, int x5u_flags);
1014
1028 int r_jws_set_properties(jws_t * jws, ...);
1029
1035 jws_t * r_jws_copy(jws_t * jws);
1036
1044 int r_jws_set_payload(jws_t * jws, const unsigned char * payload, size_t payload_len);
1045
1052 const unsigned char * r_jws_get_payload(jws_t * jws, size_t * payload_len);
1053
1060 int r_jws_set_alg(jws_t * jws, jwa_alg alg);
1061
1067 jwa_alg r_jws_get_alg(jws_t * jws);
1068
1075 const char * r_jws_get_kid(jws_t * jws);
1076
1084 int r_jws_set_header_str_value(jws_t * jws, const char * key, const char * str_value);
1085
1093 int r_jws_set_header_int_value(jws_t * jws, const char * key, int i_value);
1094
1102 int r_jws_set_header_json_t_value(jws_t * jws, const char * key, json_t * j_value);
1103
1110 int r_jws_set_full_header_json_t(jws_t * jws, json_t * j_value);
1111
1118 int r_jws_set_full_header_json_str(jws_t * jws, const char * str_value);
1119
1126 const char * r_jws_get_header_str_value(jws_t * jws, const char * key);
1127
1134 int r_jws_get_header_int_value(jws_t * jws, const char * key);
1135
1142 json_t * r_jws_get_header_json_t_value(jws_t * jws, const char * key);
1143
1149 json_t * r_jws_get_full_header_json_t(jws_t * jws);
1150
1156 char * r_jws_get_full_header_str(jws_t * jws);
1157
1165 int r_jws_add_keys(jws_t * jws, jwk_t * jwk_privkey, jwk_t * jwk_pubkey);
1166
1174 int r_jws_add_jwks(jws_t * jws, jwks_t * jwks_privkey, jwks_t * jwks_pubkey);
1175
1184 int r_jws_add_keys_json_str(jws_t * jws, const char * privkey, const char * pubkey);
1185
1194 int r_jws_add_keys_json_t(jws_t * jws, json_t * privkey, json_t * pubkey);
1195
1207 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);
1208
1217 int r_jws_add_keys_gnutls(jws_t * jws, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey);
1218
1226 int r_jws_add_key_symmetric(jws_t * jws, const unsigned char * key, size_t key_len);
1227
1233 jwks_t * r_jws_get_jwks_privkey(jws_t * jws);
1234
1240 jwks_t * r_jws_get_jwks_pubkey(jws_t * jws);
1241
1255 int r_jws_parse(jws_t * jws, const char * jws_str, int x5u_flags);
1256
1271 int r_jws_parsen(jws_t * jws, const char * jws_str, size_t jws_str_len, int x5u_flags);
1272
1286 int r_jws_compact_parse(jws_t * jws, const char * jws_str, int x5u_flags);
1287
1302 int r_jws_compact_parsen(jws_t * jws, const char * jws_str, size_t jws_str_len, int x5u_flags);
1303
1316 int r_jws_parse_json_str(jws_t * jws, const char * jws_json_str, int x5u_flags);
1317
1331 int r_jws_parsen_json_str(jws_t * jws, const char * jws_json_str, size_t jws_json_str_len, int x5u_flags);
1332
1345 int r_jws_parse_json_t(jws_t * jws, json_t * jws_json, int x5u_flags);
1346
1364 int r_jws_verify_signature(jws_t * jws, jwk_t * jwk_pubkey, int x5u_flags);
1365
1379 char * r_jws_serialize(jws_t * jws, jwk_t * jwk_privkey, int x5u_flags);
1380
1403 json_t * r_jws_serialize_json_t(jws_t * jws, jwks_t * jwks_privkey, int x5u_flags, int mode);
1404
1427 char * r_jws_serialize_json_str(jws_t * jws, jwks_t * jwks_privkey, int x5u_flags, int mode);
1428
1442 int r_jwe_set_properties(jwe_t * jwe, ...);
1443
1449 jwe_t * r_jwe_copy(jwe_t * jwe);
1450
1458 int r_jwe_set_payload(jwe_t * jwe, const unsigned char * payload, size_t payload_len);
1459
1466 const unsigned char * r_jwe_get_payload(jwe_t * jwe, size_t * payload_len);
1467
1474 int r_jwe_set_alg(jwe_t * jwe, jwa_alg alg);
1475
1481 jwa_alg r_jwe_get_alg(jwe_t * jwe);
1482
1489 int r_jwe_set_enc(jwe_t * jwe, jwa_enc enc);
1490
1496 jwa_enc r_jwe_get_enc(jwe_t * jwe);
1497
1504 const char * r_jwe_get_kid(jwe_t * jwe);
1505
1513 int r_jwe_set_header_str_value(jwe_t * jwe, const char * key, const char * str_value);
1514
1522 int r_jwe_set_header_int_value(jwe_t * jwe, const char * key, int i_value);
1523
1531 int r_jwe_set_header_json_t_value(jwe_t * jwe, const char * key, json_t * j_value);
1532
1539 int r_jwe_set_full_header_json_t(jwe_t * jwe, json_t * j_header);
1540
1547 int r_jwe_set_full_header_json_str(jwe_t * jwe, const char * str_header);
1548
1556 int r_jwe_set_full_unprotected_header_json_t(jwe_t * jwe, json_t * j_unprotected_header);
1557
1565 int r_jwe_set_full_unprotected_header_json_str(jwe_t * jwe, const char * str_unprotected_header);
1566
1572 json_t * r_jwe_get_full_unprotected_header_json_t(jwe_t * jwe);
1573
1579 char * r_jwe_get_full_unprotected_header_str(jwe_t * jwe);
1580
1587 const char * r_jwe_get_header_str_value(jwe_t * jwe, const char * key);
1588
1595 int r_jwe_get_header_int_value(jwe_t * jwe, const char * key);
1596
1603 json_t * r_jwe_get_header_json_t_value(jwe_t * jwe, const char * key);
1604
1610 json_t * r_jwe_get_full_header_json_t(jwe_t * jwe);
1611
1617 char * r_jwe_get_full_header_str(jwe_t * jwe);
1618
1626 int r_jwe_add_keys(jwe_t * jwe, jwk_t * jwk_privkey, jwk_t * jwk_pubkey);
1627
1635 int r_jwe_add_jwks(jwe_t * jwe, jwks_t * jwks_privkey, jwks_t * jwks_pubkey);
1636
1645 int r_jwe_add_keys_json_str(jwe_t * jwe, const char * privkey, const char * pubkey);
1646
1655 int r_jwe_add_keys_json_t(jwe_t * jwe, json_t * privkey, json_t * pubkey);
1656
1668 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);
1669
1678 int r_jwe_add_keys_gnutls(jwe_t * jwe, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey);
1679
1687 int r_jwe_add_key_symmetric(jwe_t * jwe, const unsigned char * key, size_t key_len);
1688
1694 jwks_t * r_jwe_get_jwks_privkey(jwe_t * jwe);
1695
1701 jwks_t * r_jwe_get_jwks_pubkey(jwe_t * jwe);
1702
1710 int r_jwe_set_cypher_key(jwe_t * jwe, const unsigned char * key, size_t key_len);
1711
1718 const unsigned char * r_jwe_get_cypher_key(jwe_t * jwe, size_t * key_len);
1719
1725 int r_jwe_generate_cypher_key(jwe_t * jwe);
1726
1734 int r_jwe_set_iv(jwe_t * jwe, const unsigned char * iv, size_t iv_len);
1735
1742 const unsigned char * r_jwe_get_iv(jwe_t * jwe, size_t * iv_len);
1743
1749 int r_jwe_generate_iv(jwe_t * jwe);
1750
1758 int r_jwe_set_aad(jwe_t * jwe, const unsigned char * aad, size_t aad_len);
1759
1766 const unsigned char * r_jwe_get_aad(jwe_t * jwe, size_t * aad_len);
1767
1773 int r_jwe_encrypt_payload(jwe_t * jwe);
1774
1780 int r_jwe_decrypt_payload(jwe_t * jwe);
1781
1794 int r_jwe_encrypt_key(jwe_t * jwe, jwk_t * jwk_pubkey, int x5u_flags);
1795
1808 int r_jwe_decrypt_key(jwe_t * jwe, jwk_t * jwk_privkey, int x5u_flags);
1809
1822 int r_jwe_parse(jwe_t * jwe, const char * jwe_str, int x5u_flags);
1823
1837 int r_jwe_parsen(jwe_t * jwe, const char * jwe_str, size_t jwe_str_len, int x5u_flags);
1838
1851 int r_jwe_compact_parse(jwe_t * jwe, const char * jwe_str, int x5u_flags);
1852
1866 int r_jwe_compact_parsen(jwe_t * jwe, const char * jwe_str, size_t jwe_str_len, int x5u_flags);
1867
1880 int r_jwe_parse_json_str(jwe_t * jwe, const char * jwe_json_str, int x5u_flags);
1881
1895 int r_jwe_parsen_json_str(jwe_t * jwe, const char * jwe_json_str, size_t jwe_json_str_len, int x5u_flags);
1896
1909 int r_jwe_parse_json_t(jwe_t * jwe, json_t * jwe_json, int x5u_flags);
1910
1924 int r_jwe_decrypt(jwe_t * jwe, jwk_t * jwk_privkey, int x5u_flags);
1925
1939 char * r_jwe_serialize(jwe_t * jwe, jwk_t * jwk_pubkey, int x5u_flags);
1940
1963 char * r_jwe_serialize_json_str(jwe_t * jwe, jwks_t * jwks_pubkey, int x5u_flags, int mode);
1964
1987 json_t * r_jwe_serialize_json_t(jwe_t * jwe, jwks_t * jwks_pubkey, int x5u_flags, int mode);
1988
2002 int r_jwt_set_properties(jwt_t * jwt, ...);
2003
2009 jwt_t * r_jwt_copy(jwt_t * jwt);
2010
2018 int r_jwt_set_header_str_value(jwt_t * jwt, const char * key, const char * str_value);
2019
2027 int r_jwt_set_header_int_value(jwt_t * jwt, const char * key, int i_value);
2028
2036 int r_jwt_set_header_json_t_value(jwt_t * jwt, const char * key, json_t * j_value);
2037
2044 int r_jwt_set_full_header_json_t(jwt_t * jwt, json_t * j_header);
2045
2052 int r_jwt_set_full_header_json_str(jwt_t * jwt, const char * str_header);
2053
2060 const char * r_jwt_get_header_str_value(jwt_t * jwt, const char * key);
2061
2068 int r_jwt_get_header_int_value(jwt_t * jwt, const char * key);
2069
2076 json_t * r_jwt_get_header_json_t_value(jwt_t * jwt, const char * key);
2077
2083 json_t * r_jwt_get_full_header_json_t(jwt_t * jwt);
2084
2090 char * r_jwt_get_full_header_str(jwt_t * jwt);
2091
2099 int r_jwt_set_claim_str_value(jwt_t * jwt, const char * key, const char * str_value);
2100
2108 int r_jwt_set_claim_int_value(jwt_t * jwt, const char * key, int i_value);
2109
2117 int r_jwt_set_claim_json_t_value(jwt_t * jwt, const char * key, json_t * j_value);
2118
2125 const char * r_jwt_get_claim_str_value(jwt_t * jwt, const char * key);
2126
2133 int r_jwt_get_claim_int_value(jwt_t * jwt, const char * key);
2134
2141 json_t * r_jwt_get_claim_json_t_value(jwt_t * jwt, const char * key);
2142
2148 json_t * r_jwt_get_full_claims_json_t(jwt_t * jwt);
2149
2155 char * r_jwt_get_full_claims_str(jwt_t * jwt);
2156
2164 int r_jwt_set_full_claims_json_t(jwt_t * jwt, json_t * j_claim);
2165
2173 int r_jwt_set_full_claims_json_str(jwt_t * jwt, const char * str_claims);
2174
2182 int r_jwt_append_claims_json_t(jwt_t * jwt, json_t * j_claim);
2183
2191 int r_jwt_add_sign_keys(jwt_t * jwt, jwk_t * privkey, jwk_t * pubkey);
2192
2200 int r_jwt_add_sign_jwks(jwt_t * jwt, jwks_t * jwks_privkey, jwks_t * jwks_pubkey);
2201
2210 int r_jwt_add_sign_keys_json_str(jwt_t * jwt, const char * privkey, const char * pubkey);
2211
2220 int r_jwt_add_sign_keys_json_t(jwt_t * jwt, json_t * privkey, json_t * pubkey);
2221
2233 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);
2234
2243 int r_jwt_add_sign_keys_gnutls(jwt_t * jwt, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey);
2244
2252 int r_jwt_add_sign_key_symmetric(jwt_t * jwt, const unsigned char * key, size_t key_len);
2253
2259 jwks_t * r_jwt_get_sign_jwks_privkey(jwt_t * jwt);
2260
2266 jwks_t * r_jwt_get_sign_jwks_pubkey(jwt_t * jwt);
2267
2275 int r_jwt_add_enc_keys(jwt_t * jwt, jwk_t * privkey, jwk_t * pubkey);
2276
2284 int r_jwt_add_enc_jwks(jwt_t * jwt, jwks_t * jwks_privkey, jwks_t * jwks_pubkey);
2285
2294 int r_jwt_add_enc_keys_json_str(jwt_t * jwt, const char * privkey, const char * pubkey);
2295
2304 int r_jwt_add_enc_keys_json_t(jwt_t * jwt, json_t * privkey, json_t * pubkey);
2305
2317 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);
2318
2327 int r_jwt_add_enc_keys_gnutls(jwt_t * jwt, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey);
2328
2336 int r_jwt_add_enc_key_symmetric(jwt_t * jwt, const unsigned char * key, size_t key_len);
2337
2343 jwks_t * r_jwt_get_enc_jwks_privkey(jwt_t * jwt);
2344
2350 jwks_t * r_jwt_get_enc_jwks_pubkey(jwt_t * jwt);
2351
2358 int r_jwt_set_sign_alg(jwt_t * jwt, jwa_alg alg);
2359
2365 jwa_alg r_jwt_get_sign_alg(jwt_t * jwt);
2366
2373 int r_jwt_set_enc_alg(jwt_t * jwt, jwa_alg alg);
2374
2380 jwa_alg r_jwt_get_enc_alg(jwt_t * jwt);
2381
2388 int r_jwt_set_enc(jwt_t * jwt, jwa_enc enc);
2389
2395 jwa_enc r_jwt_get_enc(jwt_t * jwt);
2396
2403 const char * r_jwt_get_enc_kid(jwt_t * jwt);
2404
2411 const char * r_jwt_get_sig_kid(jwt_t * jwt);
2412
2420 int r_jwt_set_enc_cypher_key(jwt_t * jwt, const unsigned char * key, size_t key_len);
2421
2428 const unsigned char * r_jwt_get_enc_cypher_key(jwt_t * jwt, size_t * key_len);
2429
2435 int r_jwt_generate_enc_cypher_key(jwt_t * jwt);
2436
2444 int r_jwt_set_enc_iv(jwt_t * jwt, const unsigned char * iv, size_t iv_len);
2445
2452 const unsigned char * r_jwt_get_enc_iv(jwt_t * jwt, size_t * iv_len);
2453
2459 int r_jwt_generate_iv(jwt_t * jwt);
2460
2473 char * r_jwt_serialize_signed(jwt_t * jwt, jwk_t * privkey, int x5u_flags);
2474
2487 char * r_jwt_serialize_encrypted(jwt_t * jwt, jwk_t * pubkey, int x5u_flags);
2488
2513 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);
2514
2530 int r_jwt_parse(jwt_t * jwt, const char * token, int x5u_flags);
2531
2548 int r_jwt_parsen(jwt_t * jwt, const char * token, size_t token_len, int x5u_flags);
2549
2560 int r_jwt_get_type(jwt_t * jwt);
2561
2577 int r_jwt_verify_signature(jwt_t * jwt, jwk_t * pubkey, int x5u_flags);
2578
2592 int r_jwt_decrypt(jwt_t * jwt, jwk_t * privkey, int x5u_flags);
2593
2616 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);
2617
2632 int r_jwt_decrypt_nested(jwt_t * jwt, jwk_t * decrypt_key, int decrypt_key_x5u_flags);
2633
2647 int r_jwt_verify_signature_nested(jwt_t * jwt, jwk_t * verify_key, int verify_key_x5u_flags);
2648
2675 int r_jwt_validate_claims(jwt_t * jwt, ...);
2676
2677 int r_jwt_set_claims(jwt_t * jwt, ...);
2678
2683 #ifndef DOXYGEN_SHOULD_SKIP_THIS
2684
2688 int _r_json_set_str_value(json_t * j_json, const char * key, const char * str_value);
2689
2690 int _r_json_set_int_value(json_t * j_json, const char * key, int i_value);
2691
2692 int _r_json_set_json_t_value(json_t * j_json, const char * key, json_t * j_value);
2693
2694 const char * _r_json_get_str_value(json_t * j_json, const char * key);
2695
2696 int _r_json_get_int_value(json_t * j_json, const char * key);
2697
2698 json_t * _r_json_get_json_t_value(json_t * j_json, const char * key);
2699
2700 json_t * _r_json_get_full_json_t(json_t * j_json);
2701
2702 size_t _r_get_key_size(jwa_enc enc);
2703
2704 gnutls_cipher_algorithm_t _r_get_alg_from_enc(jwa_enc enc);
2705
2706 int _r_deflate_payload(const unsigned char * uncompressed, size_t uncompressed_len, unsigned char ** compressed, size_t * compressed_len);
2707
2708 int _r_inflate_payload(const unsigned char * compressed, size_t compressed_len, unsigned char ** uncompressed, size_t * uncompressed_len);
2709
2710 #endif
2711
2712 #ifdef __cplusplus
2713 }
2714 #endif
2715
2716 #endif // __RHONABWY_H_
r_library_info_json_t
json_t * r_library_info_json_t()
Definition: misc.c:555
r_library_info_json_str
char * r_library_info_json_str()
Definition: misc.c:614
r_jwe_free
void r_jwe_free(jwe_t *jwe)
Definition: jwe.c:2380
r_jwa_alg_to_str
const char * r_jwa_alg_to_str(jwa_alg alg)
Definition: misc.c:407
r_global_close
void r_global_close()
Definition: misc.c:54
r_jws_init
int r_jws_init(jws_t **jws)
Definition: jws.c:865
r_str_to_jwa_enc
jwa_enc r_str_to_jwa_enc(const char *enc)
Definition: misc.c:511
r_jws_free
void r_jws_free(jws_t *jws)
Definition: jws.c:908
r_jwk_free
void r_jwk_free(jwk_t *jwk)
Definition: jwk.c:50
r_jwks_free
void r_jwks_free(jwks_t *jwks)
Definition: jwks.c:41
r_jwt_free
void r_jwt_free(jwt_t *jwt)
Definition: jwt.c:94
r_jwks_init
int r_jwks_init(jwks_t **jwks)
Definition: jwks.c:30
r_str_to_jwa_alg
jwa_alg r_str_to_jwa_alg(const char *alg)
Definition: misc.c:335
r_jwe_init
int r_jwe_init(jwe_t **jwe)
Definition: jwe.c:2326
r_free
void r_free(void *data)
Definition: misc.c:624
r_jwa_enc_to_str
const char * r_jwa_enc_to_str(jwa_enc enc)
Definition: misc.c:529
r_jwt_init
int r_jwt_init(jwt_t **jwt)
Definition: jwt.c:34
r_global_init
int r_global_init()
Definition: misc.c:35
r_jwk_init
int r_jwk_init(jwk_t **jwk)
Definition: jwk.c:39
r_jwk_export_to_gnutls_pubkey
gnutls_pubkey_t r_jwk_export_to_gnutls_pubkey(jwk_t *jwk, int x5u_flags)
Definition: jwk.c:2166
r_jwk_export_to_gnutls_privkey
gnutls_privkey_t r_jwk_export_to_gnutls_privkey(jwk_t *jwk)
Definition: jwk.c:1834
r_jwk_thumbprint
char * r_jwk_thumbprint(jwk_t *jwk, int hash, int x5u_flags)
Definition: jwk.c:2771
r_jwk_export_to_gnutls_crt
gnutls_x509_crt_t r_jwk_export_to_gnutls_crt(jwk_t *jwk, int x5u_flags)
Definition: jwk.c:2458
r_jwk_export_to_symmetric_key
int r_jwk_export_to_symmetric_key(jwk_t *jwk, unsigned char *key, size_t *key_len)
Definition: jwk.c:2578
r_jwk_export_to_pem_der
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:2522
r_jwk_export_to_json_t
json_t * r_jwk_export_to_json_t(jwk_t *jwk)
Definition: jwk.c:1826
r_jwk_export_to_json_str
char * r_jwk_export_to_json_str(jwk_t *jwk, int pretty)
Definition: jwk.c:1818
r_jwk_validate_x5c_chain
int r_jwk_validate_x5c_chain(jwk_t *jwk, int x5u_flags)
Definition: jwk.c:2865
r_jwk_import_from_password
int r_jwk_import_from_password(jwk_t *jwk, const char *password)
Definition: jwk.c:1802
r_jwk_import_from_json_str
int r_jwk_import_from_json_str(jwk_t *jwk, const char *input)
Definition: jwk.c:855
r_jwk_import_from_pem_der
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:888
r_jwk_import_from_json_t
int r_jwk_import_from_json_t(jwk_t *jwk, json_t *j_input)
Definition: jwk.c:872
r_jwk_import_from_gnutls_x509_crt
int r_jwk_import_from_gnutls_x509_crt(jwk_t *jwk, gnutls_x509_crt_t crt)
Definition: jwk.c:1715
r_jwk_import_from_symmetric_key
int r_jwk_import_from_symmetric_key(jwk_t *jwk, const unsigned char *key, size_t key_len)
Definition: jwk.c:1773
r_jwk_import_from_gnutls_pubkey
int r_jwk_import_from_gnutls_pubkey(jwk_t *jwk, gnutls_pubkey_t pub)
Definition: jwk.c:1452
r_jwk_copy
jwk_t * r_jwk_copy(jwk_t *jwk)
Definition: jwk.c:1806
r_jwk_equal
int r_jwk_equal(jwk_t *jwk1, jwk_t *jwk2)
Definition: jwk.c:1814
r_jwk_extract_pubkey
int r_jwk_extract_pubkey(jwk_t *jwk_privkey, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jwk.c:804
r_jwk_import_from_x5u
int r_jwk_import_from_x5u(jwk_t *jwk, int x5u_flags, const char *x5u)
Definition: jwk.c:1751
r_jwk_import_from_gnutls_privkey
int r_jwk_import_from_gnutls_privkey(jwk_t *jwk, gnutls_privkey_t key)
Definition: jwk.c:1005
r_jwe_get_full_header_str
char * r_jwe_get_full_header_str(jwe_t *jwe)
Definition: jwe.c:2796
r_jwe_parsen_json_str
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:3582
r_jwe_get_payload
const unsigned char * r_jwe_get_payload(jwe_t *jwe, size_t *payload_len)
Definition: jwe.c:2461
r_jwe_set_iv
int r_jwe_set_iv(jwe_t *jwe, const unsigned char *iv, size_t iv_len)
Definition: jwe.c:2534
r_jwe_get_full_unprotected_header_json_t
json_t * r_jwe_get_full_unprotected_header_json_t(jwe_t *jwe)
Definition: jwe.c:2804
r_jwe_set_properties
int r_jwe_set_properties(jwe_t *jwe,...)
Definition: jwe.c:4129
r_jwe_set_header_json_t_value
int r_jwe_set_header_json_t_value(jwe_t *jwe, const char *key, json_t *j_value)
Definition: jwe.c:2753
r_jwe_encrypt_payload
int r_jwe_encrypt_payload(jwe_t *jwe)
Definition: jwe.c:3075
r_jwe_serialize_json_str
char * r_jwe_serialize_json_str(jwe_t *jwe, jwks_t *jwks_pubkey, int x5u_flags, int mode)
Definition: jwe.c:3918
r_jwe_set_header_int_value
int r_jwe_set_header_int_value(jwe_t *jwe, const char *key, int i_value)
Definition: jwe.c:2739
r_jwe_add_keys_pem_der
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:2956
r_jwe_set_payload
int r_jwe_set_payload(jwe_t *jwe, const unsigned char *payload, size_t payload_len)
Definition: jwe.c:2436
r_jwe_set_enc
int r_jwe_set_enc(jwe_t *jwe, jwa_enc enc)
Definition: jwe.c:2702
r_jwe_decrypt_payload
int r_jwe_decrypt_payload(jwe_t *jwe)
Definition: jwe.c:3222
r_jwe_get_enc
jwa_enc r_jwe_get_enc(jwe_t *jwe)
Definition: jwe.c:2713
r_jwe_parse
int r_jwe_parse(jwe_t *jwe, const char *jwe_str, int x5u_flags)
Definition: jwe.c:3430
r_jwe_set_alg
int r_jwe_set_alg(jwe_t *jwe, jwa_alg alg)
Definition: jwe.c:2683
r_jwe_get_header_int_value
int r_jwe_get_header_int_value(jwe_t *jwe, const char *key)
Definition: jwe.c:2775
r_jwe_get_header_str_value
const char * r_jwe_get_header_str_value(jwe_t *jwe, const char *key)
Definition: jwe.c:2768
r_jwe_set_full_unprotected_header_json_t
int r_jwe_set_full_unprotected_header_json_t(jwe_t *jwe, json_t *j_unprotected_header)
Definition: jwe.c:4102
r_jwe_get_aad
const unsigned char * r_jwe_get_aad(jwe_t *jwe, size_t *aad_len)
Definition: jwe.c:2628
r_jwe_add_keys_gnutls
int r_jwe_add_keys_gnutls(jwe_t *jwe, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey)
Definition: jwe.c:2995
r_jwe_generate_iv
int r_jwe_generate_iv(jwe_t *jwe)
Definition: jwe.c:2638
r_jwe_set_full_unprotected_header_json_str
int r_jwe_set_full_unprotected_header_json_str(jwe_t *jwe, const char *str_unprotected_header)
Definition: jwe.c:4119
r_jwe_generate_cypher_key
int r_jwe_generate_cypher_key(jwe_t *jwe)
Definition: jwe.c:2506
r_jwe_get_iv
const unsigned char * r_jwe_get_iv(jwe_t *jwe, size_t *iv_len)
Definition: jwe.c:2575
r_jwe_add_keys
int r_jwe_add_keys(jwe_t *jwe, jwk_t *jwk_privkey, jwk_t *jwk_pubkey)
Definition: jwe.c:2819
r_jwe_get_jwks_pubkey
jwks_t * r_jwe_get_jwks_pubkey(jwe_t *jwe)
Definition: jwe.c:3067
r_jwe_parse_json_str
int r_jwe_parse_json_str(jwe_t *jwe, const char *jwe_json_str, int x5u_flags)
Definition: jwe.c:3578
r_jwe_set_cypher_key
int r_jwe_set_cypher_key(jwe_t *jwe, const unsigned char *key, size_t key_len)
Definition: jwe.c:2471
r_jwe_add_keys_json_str
int r_jwe_add_keys_json_str(jwe_t *jwe, const char *privkey, const char *pubkey)
Definition: jwe.c:2878
r_jwe_compact_parse
int r_jwe_compact_parse(jwe_t *jwe, const char *jwe_str, int x5u_flags)
Definition: jwe.c:3574
r_jwe_get_full_unprotected_header_str
char * r_jwe_get_full_unprotected_header_str(jwe_t *jwe)
Definition: jwe.c:2811
r_jwe_serialize_json_t
json_t * r_jwe_serialize_json_t(jwe_t *jwe, jwks_t *jwks_pubkey, int x5u_flags, int mode)
Definition: jwe.c:3925
r_jwe_add_keys_json_t
int r_jwe_add_keys_json_t(jwe_t *jwe, json_t *privkey, json_t *pubkey)
Definition: jwe.c:2917
r_jwe_get_jwks_privkey
jwks_t * r_jwe_get_jwks_privkey(jwe_t *jwe)
Definition: jwe.c:3059
r_jwe_set_full_header_json_t
int r_jwe_set_full_header_json_t(jwe_t *jwe, json_t *j_header)
Definition: jwe.c:4056
r_jwe_copy
jwe_t * r_jwe_copy(jwe_t *jwe)
Definition: jwe.c:2401
r_jwe_parsen
int r_jwe_parsen(jwe_t *jwe, const char *jwe_str, size_t jwe_str_len, int x5u_flags)
Definition: jwe.c:3434
r_jwe_add_key_symmetric
int r_jwe_add_key_symmetric(jwe_t *jwe, const unsigned char *key, size_t key_len)
Definition: jwe.c:3034
r_jwe_decrypt
int r_jwe_decrypt(jwe_t *jwe, jwk_t *jwk_privkey, int x5u_flags)
Definition: jwe.c:3750
r_jwe_decrypt_key
int r_jwe_decrypt_key(jwe_t *jwe, jwk_t *jwk_privkey, int x5u_flags)
Definition: jwe.c:3404
r_jwe_compact_parsen
int r_jwe_compact_parsen(jwe_t *jwe, const char *jwe_str, size_t jwe_str_len, int x5u_flags)
Definition: jwe.c:3457
r_jwe_set_aad
int r_jwe_set_aad(jwe_t *jwe, const unsigned char *aad, size_t aad_len)
Definition: jwe.c:2585
r_jwe_get_header_json_t_value
json_t * r_jwe_get_header_json_t_value(jwe_t *jwe, const char *key)
Definition: jwe.c:2782
r_jwe_parse_json_t
int r_jwe_parse_json_t(jwe_t *jwe, json_t *jwe_json, int x5u_flags)
Definition: jwe.c:3593
r_jwe_get_alg
jwa_alg r_jwe_get_alg(jwe_t *jwe)
Definition: jwe.c:2694
r_jwe_encrypt_key
int r_jwe_encrypt_key(jwe_t *jwe, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jwe.c:3356
r_jwe_set_full_header_json_str
int r_jwe_set_full_header_json_str(jwe_t *jwe, const char *str_header)
Definition: jwe.c:4092
r_jwe_get_full_header_json_t
json_t * r_jwe_get_full_header_json_t(jwe_t *jwe)
Definition: jwe.c:2789
r_jwe_set_header_str_value
int r_jwe_set_header_str_value(jwe_t *jwe, const char *key, const char *str_value)
Definition: jwe.c:2725
r_jwe_serialize
char * r_jwe_serialize(jwe_t *jwe, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jwe.c:3860
r_jwe_get_cypher_key
const unsigned char * r_jwe_get_cypher_key(jwe_t *jwe, size_t *key_len)
Definition: jwe.c:2496
r_jwe_add_jwks
int r_jwe_add_jwks(jwe_t *jwe, jwks_t *jwks_privkey, jwks_t *jwks_pubkey)
Definition: jwe.c:2845
r_jwe_get_kid
const char * r_jwe_get_kid(jwe_t *jwe)
Definition: jwe.c:2721
r_jwk_set_property_array
int r_jwk_set_property_array(jwk_t *jwk, const char *key, size_t index, const char *value)
Definition: jwk.c:2657
r_jwk_get_property_str
const char * r_jwk_get_property_str(jwk_t *jwk, const char *key)
Definition: jwk.c:2606
r_jwk_delete_property_str
int r_jwk_delete_property_str(jwk_t *jwk, const char *key)
Definition: jwk.c:2699
r_jwk_append_property_array
int r_jwk_append_property_array(jwk_t *jwk, const char *key, const char *value)
Definition: jwk.c:2681
r_jwk_set_property_str
int r_jwk_set_property_str(jwk_t *jwk, const char *key, const char *value)
Definition: jwk.c:2644
r_jwk_append_x5c
int r_jwk_append_x5c(jwk_t *jwk, int format, const unsigned char *input, size_t input_len)
Definition: jwk.c:2725
r_jwk_get_property_array_size
int r_jwk_get_property_array_size(jwk_t *jwk, const char *key)
Definition: jwk.c:2631
r_jwk_get_property_array
const char * r_jwk_get_property_array(jwk_t *jwk, const char *key, size_t index)
Definition: jwk.c:2618
r_jwk_delete_property_array_at
int r_jwk_delete_property_array_at(jwk_t *jwk, const char *key, size_t index)
Definition: jwk.c:2712
r_jwk_generate_key_pair
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:451
r_jwk_is_valid_x5u
int r_jwk_is_valid_x5u(jwk_t *jwk, int x5u_flags)
Definition: jwk.c:400
r_jwk_key_type
int r_jwk_key_type(jwk_t *jwk, unsigned int *bits, int x5u_flags)
Definition: jwk.c:604
r_jwk_is_valid
int r_jwk_is_valid(jwk_t *jwk)
Definition: jwk.c:56
r_jwks_size
size_t r_jwks_size(jwks_t *jwks)
Definition: jwks.c:68
r_jwks_import_from_str
int r_jwks_import_from_str(jwks_t *jwks, const char *input)
Definition: jwks.c:248
r_jwks_import_from_uri
int r_jwks_import_from_uri(jwks_t *jwks, const char *uri, int x5u_flags)
Definition: jwks.c:310
r_jwks_copy
jwks_t * r_jwks_copy(jwks_t *jwks)
Definition: jwks.c:97
r_jwks_export_to_json_t
json_t * r_jwks_export_to_json_t(jwks_t *jwks)
Definition: jwks.c:169
r_jwks_equal
int r_jwks_equal(jwks_t *jwks1, jwks_t *jwks2)
Definition: jwks.c:157
r_jwks_export_to_gnutls_privkey
gnutls_privkey_t * r_jwks_export_to_gnutls_privkey(jwks_t *jwks, size_t *len)
Definition: jwks.c:177
r_jwks_import_from_json_t
int r_jwks_import_from_json_t(jwks_t *jwks, json_t *j_input)
Definition: jwks.c:271
r_jwks_remove_at
int r_jwks_remove_at(jwks_t *jwks, size_t index)
Definition: jwks.c:131
r_jwks_get_by_kid
jwk_t * r_jwks_get_by_kid(jwks_t *jwks, const char *kid)
Definition: jwks.c:84
r_jwks_is_valid
int r_jwks_is_valid(jwks_t *jwks)
Definition: jwks.c:47
r_jwks_set_at
int r_jwks_set_at(jwks_t *jwks, size_t index, jwk_t *jwk)
Definition: jwks.c:118
r_jwks_append_jwk
int r_jwks_append_jwk(jwks_t *jwks, jwk_t *jwk)
Definition: jwks.c:105
r_jwks_export_to_json_str
char * r_jwks_export_to_json_str(jwks_t *jwks, int pretty)
Definition: jwks.c:161
r_jwks_get_at
jwk_t * r_jwks_get_at(jwks_t *jwks, size_t index)
Definition: jwks.c:76
r_jwks_empty
int r_jwks_empty(jwks_t *jwks)
Definition: jwks.c:144
r_jwks_export_to_pem_der
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
r_jwks_export_to_gnutls_pubkey
gnutls_pubkey_t * r_jwks_export_to_gnutls_pubkey(jwks_t *jwks, size_t *len, int x5u_flags)
Definition: jwks.c:199
r_jws_set_full_header_json_t
int r_jws_set_full_header_json_t(jws_t *jws, json_t *j_value)
Definition: jws.c:1990
r_jws_verify_signature
int r_jws_verify_signature(jws_t *jws, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jws.c:1770
r_jws_copy
jws_t * r_jws_copy(jws_t *jws)
Definition: jws.c:922
r_jws_set_header_str_value
int r_jws_set_header_str_value(jws_t *jws, const char *key, const char *str_value)
Definition: jws.c:1066
r_jws_set_header_int_value
int r_jws_set_header_int_value(jws_t *jws, const char *key, int i_value)
Definition: jws.c:1080
r_jws_add_keys
int r_jws_add_keys(jws_t *jws, jwk_t *jwk_privkey, jwk_t *jwk_pubkey)
Definition: jws.c:1145
r_jws_add_key_symmetric
int r_jws_add_key_symmetric(jws_t *jws, const unsigned char *key, size_t key_len)
Definition: jws.c:1360
r_jws_get_payload
const unsigned char * r_jws_get_payload(jws_t *jws, size_t *payload_len)
Definition: jws.c:975
r_jws_set_properties
int r_jws_set_properties(jws_t *jws,...)
Definition: jws.c:2028
r_jws_get_jwks_privkey
jwks_t * r_jws_get_jwks_privkey(jws_t *jws)
Definition: jws.c:1385
r_jws_get_kid
const char * r_jws_get_kid(jws_t *jws)
Definition: jws.c:1056
r_jws_set_header_json_t_value
int r_jws_set_header_json_t_value(jws_t *jws, const char *key, json_t *j_value)
Definition: jws.c:1094
r_jws_get_full_header_str
char * r_jws_get_full_header_str(jws_t *jws)
Definition: jws.c:1137
r_jws_parsen
int r_jws_parsen(jws_t *jws, const char *jws_str, size_t jws_str_len, int x5u_flags)
Definition: jws.c:1405
r_jws_compact_parsen
int r_jws_compact_parsen(jws_t *jws, const char *jws_str, size_t jws_str_len, int x5u_flags)
Definition: jws.c:1428
r_jws_serialize
char * r_jws_serialize(jws_t *jws, jwk_t *jwk_privkey, int x5u_flags)
Definition: jws.c:1862
r_jws_get_full_header_json_t
json_t * r_jws_get_full_header_json_t(jws_t *jws)
Definition: jws.c:1130
r_jws_serialize_json_str
char * r_jws_serialize_json_str(jws_t *jws, jwks_t *jwks_privkey, int x5u_flags, int mode)
Definition: jws.c:1907
r_jws_parsen_json_str
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:1755
r_jws_serialize_json_t
json_t * r_jws_serialize_json_t(jws_t *jws, jwks_t *jwks_privkey, int x5u_flags, int mode)
Definition: jws.c:1914
r_jws_parse_json_t
int r_jws_parse_json_t(jws_t *jws, json_t *jws_json, int x5u_flags)
Definition: jws.c:1552
r_jws_add_keys_json_str
int r_jws_add_keys_json_str(jws_t *jws, const char *privkey, const char *pubkey)
Definition: jws.c:1204
r_jws_add_keys_pem_der
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:1282
r_jws_add_keys_gnutls
int r_jws_add_keys_gnutls(jws_t *jws, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey)
Definition: jws.c:1321
r_jws_get_header_json_t_value
json_t * r_jws_get_header_json_t_value(jws_t *jws, const char *key)
Definition: jws.c:1123
r_jws_add_jwks
int r_jws_add_jwks(jws_t *jws, jwks_t *jwks_privkey, jwks_t *jwks_pubkey)
Definition: jws.c:1171
r_jws_set_payload
int r_jws_set_payload(jws_t *jws, const unsigned char *payload, size_t payload_len)
Definition: jws.c:950
r_jws_get_alg
jwa_alg r_jws_get_alg(jws_t *jws)
Definition: jws.c:1048
r_jws_set_full_header_json_str
int r_jws_set_full_header_json_str(jws_t *jws, const char *str_value)
Definition: jws.c:2018
r_jws_parse_json_str
int r_jws_parse_json_str(jws_t *jws, const char *jws_json_str, int x5u_flags)
Definition: jws.c:1766
r_jws_compact_parse
int r_jws_compact_parse(jws_t *jws, const char *jws_str, int x5u_flags)
Definition: jws.c:1548
r_jws_parse
int r_jws_parse(jws_t *jws, const char *jws_str, int x5u_flags)
Definition: jws.c:1401
r_jws_add_keys_json_t
int r_jws_add_keys_json_t(jws_t *jws, json_t *privkey, json_t *pubkey)
Definition: jws.c:1243
r_jws_get_header_str_value
const char * r_jws_get_header_str_value(jws_t *jws, const char *key)
Definition: jws.c:1109
r_jws_set_alg
int r_jws_set_alg(jws_t *jws, jwa_alg alg)
Definition: jws.c:985
r_jws_get_jwks_pubkey
jwks_t * r_jws_get_jwks_pubkey(jws_t *jws)
Definition: jws.c:1393
r_jws_get_header_int_value
int r_jws_get_header_int_value(jws_t *jws, const char *key)
Definition: jws.c:1116
r_jwt_serialize_signed
char * r_jwt_serialize_signed(jwt_t *jwt, jwk_t *privkey, int x5u_flags)
Definition: jwt.c:1004
r_jwt_set_sign_alg
int r_jwt_set_sign_alg(jwt_t *jwt, jwa_alg alg)
Definition: jwt.c:812
r_jwt_get_sign_jwks_privkey
jwks_t * r_jwt_get_sign_jwks_privkey(jwt_t *jwt)
Definition: jwt.c:540
r_jwt_add_enc_key_symmetric
int r_jwt_add_enc_key_symmetric(jwt_t *jwt, const unsigned char *key, size_t key_len)
Definition: jwt.c:771
r_jwt_set_claims
int r_jwt_set_claims(jwt_t *jwt,...)
Definition: jwt.c:1843
r_jwt_set_header_int_value
int r_jwt_set_header_int_value(jwt_t *jwt, const char *key, int i_value)
Definition: jwt.c:143
r_jwt_decrypt_nested
int r_jwt_decrypt_nested(jwt_t *jwt, jwk_t *decrypt_key, int decrypt_key_x5u_flags)
Definition: jwt.c:1532
r_jwt_set_header_json_t_value
int r_jwt_set_header_json_t_value(jwt_t *jwt, const char *key, json_t *j_value)
Definition: jwt.c:151
r_jwt_verify_signature
int r_jwt_verify_signature(jwt_t *jwt, jwk_t *pubkey, int x5u_flags)
Definition: jwt.c:1309
r_jwt_get_full_claims_str
char * r_jwt_get_full_claims_str(jwt_t *jwt)
Definition: jwt.c:247
r_jwt_add_sign_keys_json_t
int r_jwt_add_sign_keys_json_t(jwt_t *jwt, json_t *privkey, json_t *pubkey)
Definition: jwt.c:398
r_jwt_add_sign_keys_pem_der
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:437
r_jwt_get_enc_jwks_pubkey
jwks_t * r_jwt_get_enc_jwks_pubkey(jwt_t *jwt)
Definition: jwt.c:804
r_jwt_copy
jwt_t * r_jwt_copy(jwt_t *jwt)
Definition: jwt.c:110
r_jwt_get_enc_alg
jwa_alg r_jwt_get_enc_alg(jwt_t *jwt)
Definition: jwt.c:844
r_jwt_set_enc_iv
int r_jwt_set_enc_iv(jwt_t *jwt, const unsigned char *iv, size_t iv_len)
Definition: jwt.c:925
r_jwt_get_sig_kid
const char * r_jwt_get_sig_kid(jwt_t *jwt)
Definition: jwt.c:1000
r_jwt_get_enc
jwa_enc r_jwt_get_enc(jwt_t *jwt)
Definition: jwt.c:988
r_jwt_get_sign_jwks_pubkey
jwks_t * r_jwt_get_sign_jwks_pubkey(jwt_t *jwt)
Definition: jwt.c:548
r_jwt_get_claim_json_t_value
json_t * r_jwt_get_claim_json_t_value(jwt_t *jwt, const char *key)
Definition: jwt.c:233
r_jwt_set_enc_alg
int r_jwt_set_enc_alg(jwt_t *jwt, jwa_alg alg)
Definition: jwt.c:832
r_jwt_set_full_header_json_t
int r_jwt_set_full_header_json_t(jwt_t *jwt, json_t *j_header)
Definition: jwt.c:1968
r_jwt_decrypt
int r_jwt_decrypt(jwt_t *jwt, jwk_t *privkey, int x5u_flags)
Definition: jwt.c:1334
r_jwt_set_full_claims_json_str
int r_jwt_set_full_claims_json_str(jwt_t *jwt, const char *str_claims)
Definition: jwt.c:265
r_jwt_set_claim_str_value
int r_jwt_set_claim_str_value(jwt_t *jwt, const char *key, const char *str_value)
Definition: jwt.c:195
r_jwt_set_enc_cypher_key
int r_jwt_set_enc_cypher_key(jwt_t *jwt, const unsigned char *key, size_t key_len)
Definition: jwt.c:864
r_jwt_get_enc_iv
const unsigned char * r_jwt_get_enc_iv(jwt_t *jwt, size_t *iv_len)
Definition: jwt.c:950
r_jwt_get_claim_int_value
int r_jwt_get_claim_int_value(jwt_t *jwt, const char *key)
Definition: jwt.c:226
r_jwt_parsen
int r_jwt_parsen(jwt_t *jwt, const char *token, size_t token_len, int x5u_flags)
Definition: jwt.c:1170
r_jwt_add_enc_keys_pem_der
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:693
r_jwt_get_sign_alg
jwa_alg r_jwt_get_sign_alg(jwt_t *jwt)
Definition: jwt.c:824
r_jwt_decrypt_verify_signature_nested
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:1388
r_jwt_set_claim_json_t_value
int r_jwt_set_claim_json_t_value(jwt_t *jwt, const char *key, json_t *j_value)
Definition: jwt.c:211
r_jwt_set_claim_int_value
int r_jwt_set_claim_int_value(jwt_t *jwt, const char *key, int i_value)
Definition: jwt.c:203
r_jwt_verify_signature_nested
int r_jwt_verify_signature_nested(jwt_t *jwt, jwk_t *verify_key, int verify_key_x5u_flags)
Definition: jwt.c:1629
r_jwt_set_properties
int r_jwt_set_properties(jwt_t *jwt,...)
Definition: jwt.c:2023
r_jwt_add_enc_jwks
int r_jwt_add_enc_jwks(jwt_t *jwt, jwks_t *jwks_privkey, jwks_t *jwks_pubkey)
Definition: jwt.c:582
r_jwt_add_sign_keys_gnutls
int r_jwt_add_sign_keys_gnutls(jwt_t *jwt, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey)
Definition: jwt.c:476
r_jwt_add_enc_keys_json_str
int r_jwt_add_enc_keys_json_str(jwt_t *jwt, const char *privkey, const char *pubkey)
Definition: jwt.c:615
r_jwt_validate_claims
int r_jwt_validate_claims(jwt_t *jwt,...)
Definition: jwt.c:1661
r_jwt_get_header_int_value
int r_jwt_get_header_int_value(jwt_t *jwt, const char *key)
Definition: jwt.c:166
r_jwt_add_sign_key_symmetric
int r_jwt_add_sign_key_symmetric(jwt_t *jwt, const unsigned char *key, size_t key_len)
Definition: jwt.c:515
r_jwt_get_full_header_str
char * r_jwt_get_full_header_str(jwt_t *jwt)
Definition: jwt.c:187
r_jwt_set_header_str_value
int r_jwt_set_header_str_value(jwt_t *jwt, const char *key, const char *str_value)
Definition: jwt.c:135
r_jwt_parse
int r_jwt_parse(jwt_t *jwt, const char *token, int x5u_flags)
Definition: jwt.c:1297
r_jwt_set_full_claims_json_t
int r_jwt_set_full_claims_json_t(jwt_t *jwt, json_t *j_claim)
Definition: jwt.c:255
r_jwt_get_enc_kid
const char * r_jwt_get_enc_kid(jwt_t *jwt)
Definition: jwt.c:996
r_jwt_add_sign_keys
int r_jwt_add_sign_keys(jwt_t *jwt, jwk_t *privkey, jwk_t *pubkey)
Definition: jwt.c:300
r_jwt_append_claims_json_t
int r_jwt_append_claims_json_t(jwt_t *jwt, json_t *j_claim)
Definition: jwt.c:282
r_jwt_add_sign_keys_json_str
int r_jwt_add_sign_keys_json_str(jwt_t *jwt, const char *privkey, const char *pubkey)
Definition: jwt.c:359
r_jwt_set_enc
int r_jwt_set_enc(jwt_t *jwt, jwa_enc enc)
Definition: jwt.c:852
r_jwt_add_sign_jwks
int r_jwt_add_sign_jwks(jwt_t *jwt, jwks_t *jwks_privkey, jwks_t *jwks_pubkey)
Definition: jwt.c:326
r_jwt_add_enc_keys
int r_jwt_add_enc_keys(jwt_t *jwt, jwk_t *privkey, jwk_t *pubkey)
Definition: jwt.c:556
r_jwt_add_enc_keys_json_t
int r_jwt_add_enc_keys_json_t(jwt_t *jwt, json_t *privkey, json_t *pubkey)
Definition: jwt.c:654
r_jwt_get_header_json_t_value
json_t * r_jwt_get_header_json_t_value(jwt_t *jwt, const char *key)
Definition: jwt.c:173
r_jwt_get_full_header_json_t
json_t * r_jwt_get_full_header_json_t(jwt_t *jwt)
Definition: jwt.c:180
r_jwt_get_enc_cypher_key
const unsigned char * r_jwt_get_enc_cypher_key(jwt_t *jwt, size_t *key_len)
Definition: jwt.c:889
r_jwt_set_full_header_json_str
int r_jwt_set_full_header_json_str(jwt_t *jwt, const char *str_header)
Definition: jwt.c:2013
r_jwt_serialize_encrypted
char * r_jwt_serialize_encrypted(jwt_t *jwt, jwk_t *pubkey, int x5u_flags)
Definition: jwt.c:1045
r_jwt_get_claim_str_value
const char * r_jwt_get_claim_str_value(jwt_t *jwt, const char *key)
Definition: jwt.c:219
r_jwt_get_full_claims_json_t
json_t * r_jwt_get_full_claims_json_t(jwt_t *jwt)
Definition: jwt.c:240
r_jwt_serialize_nested
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:1095
r_jwt_get_header_str_value
const char * r_jwt_get_header_str_value(jwt_t *jwt, const char *key)
Definition: jwt.c:159
r_jwt_generate_iv
int r_jwt_generate_iv(jwt_t *jwt)
r_jwt_add_enc_keys_gnutls
int r_jwt_add_enc_keys_gnutls(jwt_t *jwt, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey)
Definition: jwt.c:732
r_jwt_generate_enc_cypher_key
int r_jwt_generate_enc_cypher_key(jwt_t *jwt)
Definition: jwt.c:899
r_jwt_get_enc_jwks_privkey
jwks_t * r_jwt_get_enc_jwks_privkey(jwt_t *jwt)
Definition: jwt.c:796
r_jwt_get_type
int r_jwt_get_type(jwt_t *jwt)
Definition: jwt.c:1301
jwa_enc
jwa_enc
Definition: rhonabwy.h:157
rhn_opt
rhn_opt
Definition: rhonabwy.h:167
rhn_claim_opt
rhn_claim_opt
Definition: rhonabwy.h:141
jwa_alg
jwa_alg
Definition: rhonabwy.h:105
jwk_t
json_t jwk_t
Definition: rhonabwy.h:102
jwks_t
json_t jwks_t
Definition: rhonabwy.h:103
R_JWA_ENC_UNKNOWN
@ R_JWA_ENC_UNKNOWN
Definition: rhonabwy.h:158
R_JWA_ENC_A192GCM
@ R_JWA_ENC_A192GCM
Definition: rhonabwy.h:163
R_JWA_ENC_A128GCM
@ R_JWA_ENC_A128GCM
Definition: rhonabwy.h:162
R_JWA_ENC_A128CBC
@ R_JWA_ENC_A128CBC
Definition: rhonabwy.h:159
R_JWA_ENC_A256GCM
@ R_JWA_ENC_A256GCM
Definition: rhonabwy.h:164
R_JWA_ENC_A192CBC
@ R_JWA_ENC_A192CBC
Definition: rhonabwy.h:160
R_JWA_ENC_A256CBC
@ R_JWA_ENC_A256CBC
Definition: rhonabwy.h:161
RHN_OPT_VERIFY_KEY_JWKS
@ RHN_OPT_VERIFY_KEY_JWKS
Definition: rhonabwy.h:195
RHN_OPT_SIG_ALG
@ RHN_OPT_SIG_ALG
Definition: rhonabwy.h:184
RHN_OPT_HEADER_JSON_T_VALUE
@ RHN_OPT_HEADER_JSON_T_VALUE
Definition: rhonabwy.h:171
RHN_OPT_HEADER_INT_VALUE
@ RHN_OPT_HEADER_INT_VALUE
Definition: rhonabwy.h:169
RHN_OPT_DECRYPT_KEY_JWK
@ RHN_OPT_DECRYPT_KEY_JWK
Definition: rhonabwy.h:206
RHN_OPT_SIGN_KEY_JSON_T
@ RHN_OPT_SIGN_KEY_JSON_T
Definition: rhonabwy.h:191
RHN_OPT_ENCRYPT_KEY_JSON_T
@ RHN_OPT_ENCRYPT_KEY_JSON_T
Definition: rhonabwy.h:203
RHN_OPT_HEADER_FULL_JSON_STR
@ RHN_OPT_HEADER_FULL_JSON_STR
Definition: rhonabwy.h:173
RHN_OPT_DECRYPT_KEY_JWKS
@ RHN_OPT_DECRYPT_KEY_JWKS
Definition: rhonabwy.h:207
RHN_OPT_ENCRYPT_KEY_JSON_STR
@ RHN_OPT_ENCRYPT_KEY_JSON_STR
Definition: rhonabwy.h:204
RHN_OPT_VERIFY_KEY_JWK
@ RHN_OPT_VERIFY_KEY_JWK
Definition: rhonabwy.h:194
RHN_OPT_DECRYPT_KEY_JSON_STR
@ RHN_OPT_DECRYPT_KEY_JSON_STR
Definition: rhonabwy.h:210
RHN_OPT_ENCRYPT_KEY_GNUTLS
@ RHN_OPT_ENCRYPT_KEY_GNUTLS
Definition: rhonabwy.h:202
RHN_OPT_VERIFY_KEY_GNUTLS
@ RHN_OPT_VERIFY_KEY_GNUTLS
Definition: rhonabwy.h:196
RHN_OPT_SIGN_KEY_GNUTLS
@ RHN_OPT_SIGN_KEY_GNUTLS
Definition: rhonabwy.h:190
RHN_OPT_HEADER_STR_VALUE
@ RHN_OPT_HEADER_STR_VALUE
Definition: rhonabwy.h:170
RHN_OPT_ENCRYPT_KEY_PEM_DER
@ RHN_OPT_ENCRYPT_KEY_PEM_DER
Definition: rhonabwy.h:205
RHN_OPT_UN_HEADER_FULL_JSON_STR
@ RHN_OPT_UN_HEADER_FULL_JSON_STR
Definition: rhonabwy.h:175
RHN_OPT_AAD
@ RHN_OPT_AAD
Definition: rhonabwy.h:187
RHN_OPT_HEADER_FULL_JSON_T
@ RHN_OPT_HEADER_FULL_JSON_T
Definition: rhonabwy.h:172
RHN_OPT_CLAIM_INT_VALUE
@ RHN_OPT_CLAIM_INT_VALUE
Definition: rhonabwy.h:177
RHN_OPT_VERIFY_KEY_JSON_STR
@ RHN_OPT_VERIFY_KEY_JSON_STR
Definition: rhonabwy.h:198
RHN_OPT_CIPHER_KEY
@ RHN_OPT_CIPHER_KEY
Definition: rhonabwy.h:185
RHN_OPT_SIGN_KEY_JWK
@ RHN_OPT_SIGN_KEY_JWK
Definition: rhonabwy.h:188
RHN_OPT_VERIFY_KEY_PEM_DER
@ RHN_OPT_VERIFY_KEY_PEM_DER
Definition: rhonabwy.h:199
RHN_OPT_CLAIM_FULL_JSON_STR
@ RHN_OPT_CLAIM_FULL_JSON_STR
Definition: rhonabwy.h:181
RHN_OPT_CLAIM_STR_VALUE
@ RHN_OPT_CLAIM_STR_VALUE
Definition: rhonabwy.h:178
RHN_OPT_IV
@ RHN_OPT_IV
Definition: rhonabwy.h:186
RHN_OPT_SIGN_KEY_PEM_DER
@ RHN_OPT_SIGN_KEY_PEM_DER
Definition: rhonabwy.h:193
RHN_OPT_DECRYPT_KEY_JSON_T
@ RHN_OPT_DECRYPT_KEY_JSON_T
Definition: rhonabwy.h:209
RHN_OPT_CLAIM_JSON_T_VALUE
@ RHN_OPT_CLAIM_JSON_T_VALUE
Definition: rhonabwy.h:179
RHN_OPT_DECRYPT_KEY_PEM_DER
@ RHN_OPT_DECRYPT_KEY_PEM_DER
Definition: rhonabwy.h:211
RHN_OPT_SIGN_KEY_JWKS
@ RHN_OPT_SIGN_KEY_JWKS
Definition: rhonabwy.h:189
RHN_OPT_SIGN_KEY_JSON_STR
@ RHN_OPT_SIGN_KEY_JSON_STR
Definition: rhonabwy.h:192
RHN_OPT_UN_HEADER_FULL_JSON_T
@ RHN_OPT_UN_HEADER_FULL_JSON_T
Definition: rhonabwy.h:174
RHN_OPT_CLAIM_FULL_JSON_T
@ RHN_OPT_CLAIM_FULL_JSON_T
Definition: rhonabwy.h:180
RHN_OPT_ENC_ALG
@ RHN_OPT_ENC_ALG
Definition: rhonabwy.h:182
RHN_OPT_VERIFY_KEY_JSON_T
@ RHN_OPT_VERIFY_KEY_JSON_T
Definition: rhonabwy.h:197
RHN_OPT_DECRYPT_KEY_GNUTLS
@ RHN_OPT_DECRYPT_KEY_GNUTLS
Definition: rhonabwy.h:208
RHN_OPT_ENC
@ RHN_OPT_ENC
Definition: rhonabwy.h:183
RHN_OPT_NONE
@ RHN_OPT_NONE
Definition: rhonabwy.h:168
RHN_OPT_PAYLOAD
@ RHN_OPT_PAYLOAD
Definition: rhonabwy.h:176
RHN_OPT_ENCRYPT_KEY_JWKS
@ RHN_OPT_ENCRYPT_KEY_JWKS
Definition: rhonabwy.h:201
RHN_OPT_ENCRYPT_KEY_JWK
@ RHN_OPT_ENCRYPT_KEY_JWK
Definition: rhonabwy.h:200
R_JWT_CLAIM_ISS
@ R_JWT_CLAIM_ISS
Definition: rhonabwy.h:143
R_JWT_CLAIM_SUB
@ R_JWT_CLAIM_SUB
Definition: rhonabwy.h:144
R_JWT_CLAIM_NBF
@ R_JWT_CLAIM_NBF
Definition: rhonabwy.h:147
R_JWT_CLAIM_JSN
@ R_JWT_CLAIM_JSN
Definition: rhonabwy.h:152
R_JWT_CLAIM_IAT
@ R_JWT_CLAIM_IAT
Definition: rhonabwy.h:148
R_JWT_CLAIM_TYP
@ R_JWT_CLAIM_TYP
Definition: rhonabwy.h:153
R_JWT_CLAIM_STR
@ R_JWT_CLAIM_STR
Definition: rhonabwy.h:150
R_JWT_CLAIM_INT
@ R_JWT_CLAIM_INT
Definition: rhonabwy.h:151
R_JWT_CLAIM_EXP
@ R_JWT_CLAIM_EXP
Definition: rhonabwy.h:146
R_JWT_CLAIM_NOP
@ R_JWT_CLAIM_NOP
Definition: rhonabwy.h:142
R_JWT_CLAIM_AUD
@ R_JWT_CLAIM_AUD
Definition: rhonabwy.h:145
R_JWT_CLAIM_CTY
@ R_JWT_CLAIM_CTY
Definition: rhonabwy.h:154
R_JWT_CLAIM_JTI
@ R_JWT_CLAIM_JTI
Definition: rhonabwy.h:149
R_JWA_ALG_A256KW
@ R_JWA_ALG_A256KW
Definition: rhonabwy.h:126
R_JWA_ALG_A192GCMKW
@ R_JWA_ALG_A192GCMKW
Definition: rhonabwy.h:133
R_JWA_ALG_ES384
@ R_JWA_ALG_ES384
Definition: rhonabwy.h:115
R_JWA_ALG_A192KW
@ R_JWA_ALG_A192KW
Definition: rhonabwy.h:125
R_JWA_ALG_PBES2_H384
@ R_JWA_ALG_PBES2_H384
Definition: rhonabwy.h:136
R_JWA_ALG_HS384
@ R_JWA_ALG_HS384
Definition: rhonabwy.h:109
R_JWA_ALG_EDDSA
@ R_JWA_ALG_EDDSA
Definition: rhonabwy.h:117
R_JWA_ALG_DIR
@ R_JWA_ALG_DIR
Definition: rhonabwy.h:127
R_JWA_ALG_A128KW
@ R_JWA_ALG_A128KW
Definition: rhonabwy.h:124
R_JWA_ALG_HS512
@ R_JWA_ALG_HS512
Definition: rhonabwy.h:110
R_JWA_ALG_PS512
@ R_JWA_ALG_PS512
Definition: rhonabwy.h:120
R_JWA_ALG_PS384
@ R_JWA_ALG_PS384
Definition: rhonabwy.h:119
R_JWA_ALG_PBES2_H512
@ R_JWA_ALG_PBES2_H512
Definition: rhonabwy.h:137
R_JWA_ALG_NONE
@ R_JWA_ALG_NONE
Definition: rhonabwy.h:107
R_JWA_ALG_RSA1_5
@ R_JWA_ALG_RSA1_5
Definition: rhonabwy.h:121
R_JWA_ALG_ES256
@ R_JWA_ALG_ES256
Definition: rhonabwy.h:114
R_JWA_ALG_RSA_OAEP_256
@ R_JWA_ALG_RSA_OAEP_256
Definition: rhonabwy.h:123
R_JWA_ALG_A128GCMKW
@ R_JWA_ALG_A128GCMKW
Definition: rhonabwy.h:132
R_JWA_ALG_ECDH_ES_A192KW
@ R_JWA_ALG_ECDH_ES_A192KW
Definition: rhonabwy.h:130
R_JWA_ALG_ES512
@ R_JWA_ALG_ES512
Definition: rhonabwy.h:116
R_JWA_ALG_RS512
@ R_JWA_ALG_RS512
Definition: rhonabwy.h:113
R_JWA_ALG_RS256
@ R_JWA_ALG_RS256
Definition: rhonabwy.h:111
R_JWA_ALG_A256GCMKW
@ R_JWA_ALG_A256GCMKW
Definition: rhonabwy.h:134
R_JWA_ALG_ES256K
@ R_JWA_ALG_ES256K
Definition: rhonabwy.h:138
R_JWA_ALG_RS384
@ R_JWA_ALG_RS384
Definition: rhonabwy.h:112
R_JWA_ALG_UNKNOWN
@ R_JWA_ALG_UNKNOWN
Definition: rhonabwy.h:106
R_JWA_ALG_ECDH_ES_A128KW
@ R_JWA_ALG_ECDH_ES_A128KW
Definition: rhonabwy.h:129
R_JWA_ALG_ECDH_ES
@ R_JWA_ALG_ECDH_ES
Definition: rhonabwy.h:128
R_JWA_ALG_HS256
@ R_JWA_ALG_HS256
Definition: rhonabwy.h:108
R_JWA_ALG_PS256
@ R_JWA_ALG_PS256
Definition: rhonabwy.h:118
R_JWA_ALG_PBES2_H256
@ R_JWA_ALG_PBES2_H256
Definition: rhonabwy.h:135
R_JWA_ALG_RSA_OAEP
@ R_JWA_ALG_RSA_OAEP
Definition: rhonabwy.h:122
R_JWA_ALG_ECDH_ES_A256KW
@ R_JWA_ALG_ECDH_ES_A256KW
Definition: rhonabwy.h:131
_r_json_get_int_value
int _r_json_get_int_value(json_t *j_json, const char *key)
Definition: misc.c:168
_r_inflate_payload
int _r_inflate_payload(const unsigned char *compressed, size_t compressed_len, unsigned char **uncompressed, size_t *uncompressed_len)
Definition: misc.c:293
_r_json_set_int_value
int _r_json_set_int_value(json_t *j_json, const char *key, int i_value)
Definition: misc.c:124
_r_get_key_size
size_t _r_get_key_size(jwa_enc enc)
Definition: misc.c:191
_r_deflate_payload
int _r_deflate_payload(const unsigned char *uncompressed, size_t uncompressed_len, unsigned char **compressed, size_t *compressed_len)
Definition: misc.c:250
_r_json_set_json_t_value
int _r_json_set_json_t_value(json_t *j_json, const char *key, json_t *j_value)
Definition: misc.c:140
_r_json_get_str_value
const char * _r_json_get_str_value(json_t *j_json, const char *key)
Definition: misc.c:161
_r_json_get_full_json_t
json_t * _r_json_get_full_json_t(json_t *j_json)
Definition: misc.c:184
_r_json_set_str_value
int _r_json_set_str_value(json_t *j_json, const char *key, const char *str_value)
Definition: misc.c:103
_r_get_alg_from_enc
gnutls_cipher_algorithm_t _r_get_alg_from_enc(jwa_enc enc)
Definition: misc.c:217
_r_json_get_json_t_value
json_t * _r_json_get_json_t_value(json_t *j_json, const char *key)
Definition: misc.c:175
jwe_t
Definition: rhonabwy.h:228
jwe_t::payload_len
size_t payload_len
Definition: rhonabwy.h:248
jwe_t::j_header
json_t * j_header
Definition: rhonabwy.h:235
jwe_t::iv
unsigned char * iv
Definition: rhonabwy.h:245
jwe_t::enc
jwa_enc enc
Definition: rhonabwy.h:238
jwe_t::j_json_serialization
json_t * j_json_serialization
Definition: rhonabwy.h:249
jwe_t::jwks_privkey
jwks_t * jwks_privkey
Definition: rhonabwy.h:239
jwe_t::iv_b64url
unsigned char * iv_b64url
Definition: rhonabwy.h:232
jwe_t::key_len
size_t key_len
Definition: rhonabwy.h:244
jwe_t::auth_tag_b64url
unsigned char * auth_tag_b64url
Definition: rhonabwy.h:234
jwe_t::aad_b64url
unsigned char * aad_b64url
Definition: rhonabwy.h:231
jwe_t::aad_len
size_t aad_len
Definition: rhonabwy.h:242
jwe_t::header_b64url
unsigned char * header_b64url
Definition: rhonabwy.h:229
jwe_t::ciphertext_b64url
unsigned char * ciphertext_b64url
Definition: rhonabwy.h:233
jwe_t::alg
jwa_alg alg
Definition: rhonabwy.h:237
jwe_t::key
unsigned char * key
Definition: rhonabwy.h:243
jwe_t::aad
unsigned char * aad
Definition: rhonabwy.h:241
jwe_t::jwks_pubkey
jwks_t * jwks_pubkey
Definition: rhonabwy.h:240
jwe_t::payload
unsigned char * payload
Definition: rhonabwy.h:247
jwe_t::iv_len
size_t iv_len
Definition: rhonabwy.h:246
jwe_t::encrypted_key_b64url
unsigned char * encrypted_key_b64url
Definition: rhonabwy.h:230
jwe_t::j_unprotected_header
json_t * j_unprotected_header
Definition: rhonabwy.h:236
jwe_t::token_mode
int token_mode
Definition: rhonabwy.h:250
jws_t
Definition: rhonabwy.h:214
jws_t::token_mode
int token_mode
Definition: rhonabwy.h:225
jws_t::payload_len
size_t payload_len
Definition: rhonabwy.h:223
jws_t::jwks_pubkey
jwks_t * jwks_pubkey
Definition: rhonabwy.h:221
jws_t::jwks_privkey
jwks_t * jwks_privkey
Definition: rhonabwy.h:220
jws_t::payload
unsigned char * payload
Definition: rhonabwy.h:222
jws_t::j_json_serialization
json_t * j_json_serialization
Definition: rhonabwy.h:224
jws_t::payload_b64url
unsigned char * payload_b64url
Definition: rhonabwy.h:216
jws_t::j_header
json_t * j_header
Definition: rhonabwy.h:218
jws_t::signature_b64url
unsigned char * signature_b64url
Definition: rhonabwy.h:217
jws_t::alg
jwa_alg alg
Definition: rhonabwy.h:219
jws_t::header_b64url
unsigned char * header_b64url
Definition: rhonabwy.h:215
jwt_t
Definition: rhonabwy.h:253
jwt_t::enc_alg
jwa_alg enc_alg
Definition: rhonabwy.h:260
jwt_t::jwks_privkey_sign
jwks_t * jwks_privkey_sign
Definition: rhonabwy.h:266
jwt_t::j_claims
json_t * j_claims
Definition: rhonabwy.h:256
jwt_t::sign_alg
jwa_alg sign_alg
Definition: rhonabwy.h:259
jwt_t::enc
jwa_enc enc
Definition: rhonabwy.h:261
jwt_t::key_len
size_t key_len
Definition: rhonabwy.h:263
jwt_t::jwks_pubkey_enc
jwks_t * jwks_pubkey_enc
Definition: rhonabwy.h:269
jwt_t::type
int type
Definition: rhonabwy.h:254
jwt_t::iv
unsigned char * iv
Definition: rhonabwy.h:264
jwt_t::jws
jws_t * jws
Definition: rhonabwy.h:257
jwt_t::jwks_privkey_enc
jwks_t * jwks_privkey_enc
Definition: rhonabwy.h:268
jwt_t::jwe
jwe_t * jwe
Definition: rhonabwy.h:258
jwt_t::key
unsigned char * key
Definition: rhonabwy.h:262
jwt_t::j_header
json_t * j_header
Definition: rhonabwy.h:255
jwt_t::iv_len
size_t iv_len
Definition: rhonabwy.h:265
jwt_t::jwks_pubkey_sign
jwks_t * jwks_pubkey_sign
Definition: rhonabwy.h:267