Rhonabwy: include/rhonabwy.h Source File

Rhonabwy Javascript Object Signing and Encryption (JOSE) library - JWK, JWKS, JWS, JWE and JWT

Loading...
Searching...
No Matches
rhonabwy.h
Go to the documentation of this file.
1
25#ifndef __RHONABWY_H_
26#define __RHONABWY_H_
27
28#ifdef __cplusplus
29extern "C"
30{
31#endif
32
33#include "rhonabwy-cfg.h"
34
35#include <stdint.h>
36#include <jansson.h>
37#include <gnutls/gnutls.h>
38#include <nettle/version.h>
39
46#define RHN_OK 0
47#define RHN_ERROR 1
48#define RHN_ERROR_MEMORY 2
49#define RHN_ERROR_PARAM 3
50#define RHN_ERROR_UNSUPPORTED 4
51#define RHN_ERROR_INVALID 5
52
53#define R_X509_TYPE_UNSPECIFIED 0
54#define R_X509_TYPE_PUBKEY 1
55#define R_X509_TYPE_PRIVKEY 2
56#define R_X509_TYPE_CERTIFICATE 3
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
92#define R_PARSE_NONE 0
93#define R_PARSE_HEADER_JWK 1
94#define R_PARSE_HEADER_JKU 2
95#define R_PARSE_HEADER_X5C 4
96#define R_PARSE_HEADER_X5U 8
97#define R_PARSE_HEADER_ALL (R_PARSE_HEADER_JWK|R_PARSE_HEADER_JKU|R_PARSE_HEADER_X5C|R_PARSE_HEADER_X5U)
98#define R_PARSE_UNSIGNED 16
99#define R_PARSE_ALL (R_PARSE_HEADER_ALL|R_PARSE_UNSIGNED)
100
111 typedef json_t jwk_t;
112 typedef json_t jwks_t;
113 typedef json_int_t rhn_int_t;
114
115#define RHONABWY_INTEGER_FORMAT JSON_INTEGER_FORMAT
116
117 typedef enum {
118 R_JWA_ALG_UNKNOWN = 0,
119 R_JWA_ALG_NONE = 1,
120 R_JWA_ALG_HS256 = 2,
121 R_JWA_ALG_HS384 = 3,
122 R_JWA_ALG_HS512 = 4,
123 R_JWA_ALG_RS256 = 5,
124 R_JWA_ALG_RS384 = 6,
125 R_JWA_ALG_RS512 = 7,
126 R_JWA_ALG_ES256 = 8,
127 R_JWA_ALG_ES384 = 9,
128 R_JWA_ALG_ES512 = 10,
129 R_JWA_ALG_EDDSA = 11,
130 R_JWA_ALG_PS256 = 12,
131 R_JWA_ALG_PS384 = 13,
132 R_JWA_ALG_PS512 = 14,
133 R_JWA_ALG_RSA1_5 = 15,
134 R_JWA_ALG_RSA_OAEP = 16,
135 R_JWA_ALG_RSA_OAEP_256 = 17,
136 R_JWA_ALG_A128KW = 18,
137 R_JWA_ALG_A192KW = 19,
138 R_JWA_ALG_A256KW = 20,
139 R_JWA_ALG_DIR = 21,
140 R_JWA_ALG_ECDH_ES = 22,
141 R_JWA_ALG_ECDH_ES_A128KW = 23,
142 R_JWA_ALG_ECDH_ES_A192KW = 24,
143 R_JWA_ALG_ECDH_ES_A256KW = 25,
144 R_JWA_ALG_A128GCMKW = 26,
145 R_JWA_ALG_A192GCMKW = 27,
146 R_JWA_ALG_A256GCMKW = 28,
147 R_JWA_ALG_PBES2_H256 = 29,
148 R_JWA_ALG_PBES2_H384 = 30,
149 R_JWA_ALG_PBES2_H512 = 31,
150 R_JWA_ALG_ES256K = 32
151} jwa_alg;
152
153 typedef enum {
154 R_JWT_CLAIM_NOP = 0,
155 R_JWT_CLAIM_ISS = 1,
156 R_JWT_CLAIM_SUB = 2,
157 R_JWT_CLAIM_AUD = 3,
158 R_JWT_CLAIM_EXP = 4,
159 R_JWT_CLAIM_NBF = 5,
160 R_JWT_CLAIM_IAT = 6,
161 R_JWT_CLAIM_JTI = 7,
162 R_JWT_CLAIM_STR = 8,
163 R_JWT_CLAIM_INT = 9,
164 R_JWT_CLAIM_JSN = 10,
165 R_JWT_CLAIM_TYP = 11,
166 R_JWT_CLAIM_CTY = 12,
167} rhn_claim_opt;
168
169 typedef enum {
170 R_JWA_ENC_UNKNOWN = 0,
171 R_JWA_ENC_A128CBC = 1,
172 R_JWA_ENC_A192CBC = 2,
173 R_JWA_ENC_A256CBC = 3,
174 R_JWA_ENC_A128GCM = 4,
175 R_JWA_ENC_A192GCM = 5,
176 R_JWA_ENC_A256GCM = 6
177} jwa_enc;
178
179 typedef enum {
180 RHN_OPT_NONE = 0,
181 RHN_OPT_HEADER_INT_VALUE = 1,
182 RHN_OPT_HEADER_RHN_INT_VALUE = 2,
183 RHN_OPT_HEADER_STR_VALUE = 3,
184 RHN_OPT_HEADER_JSON_T_VALUE = 4,
185 RHN_OPT_HEADER_FULL_JSON_T = 5,
186 RHN_OPT_HEADER_FULL_JSON_STR = 6,
187 RHN_OPT_UN_HEADER_FULL_JSON_T = 7,
188 RHN_OPT_UN_HEADER_FULL_JSON_STR = 8,
189 RHN_OPT_PAYLOAD = 9,
190 RHN_OPT_CLAIM_INT_VALUE = 10,
191 RHN_OPT_CLAIM_RHN_INT_VALUE = 11,
192 RHN_OPT_CLAIM_STR_VALUE = 12,
193 RHN_OPT_CLAIM_JSON_T_VALUE = 13,
194 RHN_OPT_CLAIM_FULL_JSON_T = 14,
195 RHN_OPT_CLAIM_FULL_JSON_STR = 15,
196 RHN_OPT_ENC_ALG = 16,
197 RHN_OPT_ENC = 17,
198 RHN_OPT_SIG_ALG = 18,
199 RHN_OPT_CIPHER_KEY = 19,
200 RHN_OPT_IV = 20,
201 RHN_OPT_AAD = 21,
202 RHN_OPT_SIGN_KEY_JWK = 22,
203 RHN_OPT_SIGN_KEY_JWKS = 23,
204 RHN_OPT_SIGN_KEY_GNUTLS = 24,
205 RHN_OPT_SIGN_KEY_JSON_T = 25,
206 RHN_OPT_SIGN_KEY_JSON_STR = 26,
207 RHN_OPT_SIGN_KEY_PEM_DER = 27,
208 RHN_OPT_VERIFY_KEY_JWK = 28,
209 RHN_OPT_VERIFY_KEY_JWKS = 29,
210 RHN_OPT_VERIFY_KEY_GNUTLS = 30,
211 RHN_OPT_VERIFY_KEY_JSON_T = 31,
212 RHN_OPT_VERIFY_KEY_JSON_STR = 32,
213 RHN_OPT_VERIFY_KEY_PEM_DER = 33,
214 RHN_OPT_ENCRYPT_KEY_JWK = 34,
215 RHN_OPT_ENCRYPT_KEY_JWKS = 35,
216 RHN_OPT_ENCRYPT_KEY_GNUTLS = 36,
217 RHN_OPT_ENCRYPT_KEY_JSON_T = 37,
218 RHN_OPT_ENCRYPT_KEY_JSON_STR = 38,
219 RHN_OPT_ENCRYPT_KEY_PEM_DER = 39,
220 RHN_OPT_DECRYPT_KEY_JWK = 40,
221 RHN_OPT_DECRYPT_KEY_JWKS = 41,
222 RHN_OPT_DECRYPT_KEY_GNUTLS = 42,
223 RHN_OPT_DECRYPT_KEY_JSON_T = 43,
224 RHN_OPT_DECRYPT_KEY_JSON_STR = 44,
225 RHN_OPT_DECRYPT_KEY_PEM_DER = 45
226} rhn_opt;
227
228 typedef enum {
229 R_IMPORT_NONE = 0,
230 R_IMPORT_JSON_STR = 1,
231 R_IMPORT_JSON_T = 2,
232 R_IMPORT_PEM = 3,
233 R_IMPORT_DER = 4,
234 R_IMPORT_G_PRIVKEY = 5,
235 R_IMPORT_G_PUBKEY = 6,
236 R_IMPORT_G_CERT = 7,
237 R_IMPORT_X5U = 8,
238 R_IMPORT_SYMKEY = 9,
239 R_IMPORT_PASSWORD = 10,
240 R_IMPORT_JKU = 11
241} rhn_import;
242
243 typedef struct {
244 unsigned char * header_b64url;
245 unsigned char * payload_b64url;
246 unsigned char * signature_b64url;
247 json_t * j_header;
248 jwa_alg alg;
249 jwks_t * jwks_privkey;
250 jwks_t * jwks_pubkey;
251 unsigned char * payload;
252 size_t payload_len;
253 json_t * j_json_serialization;
254 int token_mode;
255} jws_t;
256
257 typedef struct {
258 unsigned char * header_b64url;
259 unsigned char * encrypted_key_b64url;
260 unsigned char * aad_b64url;
261 unsigned char * iv_b64url;
262 unsigned char * ciphertext_b64url;
263 unsigned char * auth_tag_b64url;
264 json_t * j_header;
265 json_t * j_unprotected_header;
266 jwa_alg alg;
267 jwa_enc enc;
268 jwks_t * jwks_privkey;
269 jwks_t * jwks_pubkey;
270 unsigned char * aad;
271 size_t aad_len;
272 unsigned char * key;
273 size_t key_len;
274 unsigned char * iv;
275 size_t iv_len;
276 unsigned char * payload;
277 size_t payload_len;
278 json_t * j_json_serialization;
279 int token_mode;
280} jwe_t;
281
282 typedef struct {
283 int type;
284 uint32_t parse_flags;
285 json_t * j_header;
286 json_t * j_claims;
287 jws_t * jws;
288 jwe_t * jwe;
289 jwa_alg sign_alg;
290 jwa_alg enc_alg;
291 jwa_enc enc;
292 unsigned char * key;
293 size_t key_len;
294 unsigned char * iv;
295 size_t iv_len;
296 jwks_t * jwks_privkey_sign;
297 jwks_t * jwks_pubkey_sign;
298 jwks_t * jwks_privkey_enc;
299 jwks_t * jwks_pubkey_enc;
300} jwt_t;
301
319int r_global_init(void);
320
324void r_global_close(void);
325
333json_t * r_library_info_json_t(void);
334
342char * r_library_info_json_str(void);
343
349void r_free(void * data);
350
356int r_jwk_init(jwk_t ** jwk);
357
362void r_jwk_free(jwk_t * jwk);
363
369int r_jwks_init(jwks_t ** jwks);
370
375void r_jwks_free(jwks_t * jwks);
376
382int r_jws_init(jws_t ** jws);
383
388void r_jws_free(jws_t * jws);
389
395int r_jwe_init(jwe_t ** jwe);
396
401void r_jwe_free(jwe_t * jwe);
402
408int r_jwt_init(jwt_t ** jwt);
409
414void r_jwt_free(jwt_t * jwt);
415
421 jwa_alg r_str_to_jwa_alg(const char * alg);
422
429const char * r_jwa_alg_to_str(jwa_alg alg);
430
436 jwa_enc r_str_to_jwa_enc(const char * enc);
437
444const char * r_jwa_enc_to_str(jwa_enc enc);
445
481int r_jwk_key_type(jwk_t * jwk, unsigned int * bits, int x5u_flags);
482
489int r_jwk_is_valid(jwk_t * jwk);
490
503int r_jwk_is_valid_x5u(jwk_t * jwk, int x5u_flags);
504
516int r_jwk_generate_key_pair(jwk_t * jwk_privkey, jwk_t * jwk_pubkey, int type, unsigned int bits, const char * kid);
517
534const char * r_jwk_get_property_str(jwk_t * jwk, const char * key);
535
543const char * r_jwk_get_property_array(jwk_t * jwk, const char * key, size_t index);
544
551int r_jwk_get_property_array_size(jwk_t * jwk, const char * key);
552
561int r_jwk_set_property_str(jwk_t * jwk, const char * key, const char * value);
562
572int r_jwk_set_property_array(jwk_t * jwk, const char * key, size_t index, const char * value);
573
582int r_jwk_append_property_array(jwk_t * jwk, const char * key, const char * value);
583
591int r_jwk_delete_property_str(jwk_t * jwk, const char * key);
592
601int r_jwk_delete_property_array_at(jwk_t * jwk, const char * key, size_t index);
602
612int r_jwk_append_x5c(jwk_t * jwk, int format, const unsigned char * input, size_t input_len);
613
631int r_jwk_import_from_json_str(jwk_t * jwk, const char * input);
632
640int r_jwk_import_from_json_t(jwk_t * jwk, json_t * j_input);
641
652int r_jwk_import_from_pem_der(jwk_t * jwk, int type, int format, const unsigned char * input, size_t input_len);
653
661int r_jwk_import_from_gnutls_privkey(jwk_t * jwk, gnutls_privkey_t key);
662
670int r_jwk_import_from_gnutls_pubkey(jwk_t * jwk, gnutls_pubkey_t pub);
671
679int r_jwk_import_from_gnutls_x509_crt(jwk_t * jwk, gnutls_x509_crt_t crt);
680
692int r_jwk_import_from_x5u(jwk_t * jwk, int x5u_flags, const char * x5u);
693
701int r_jwk_import_from_x5c(jwk_t * jwk, const char * x5c);
702
711int r_jwk_import_from_symmetric_key(jwk_t * jwk, const unsigned char * key, size_t key_len);
712
720int r_jwk_import_from_password(jwk_t * jwk, const char * password);
721
734int r_jwk_extract_pubkey(jwk_t * jwk_privkey, jwk_t * jwk_pubkey, int x5u_flags);
735
744 jwk_t * r_jwk_quick_import(rhn_import type, ...);
745
751 jwk_t * r_jwk_copy(jwk_t * jwk);
752
759int r_jwk_equal(jwk_t * jwk1, jwk_t * jwk2);
760
777char * r_jwk_export_to_json_str(jwk_t * jwk, int pretty);
778
784json_t * r_jwk_export_to_json_t(jwk_t * jwk);
785
791gnutls_privkey_t r_jwk_export_to_gnutls_privkey(jwk_t * jwk);
792
804gnutls_pubkey_t r_jwk_export_to_gnutls_pubkey(jwk_t * jwk, int x5u_flags);
805
819gnutls_x509_crt_t r_jwk_export_to_gnutls_crt(jwk_t * jwk, int x5u_flags);
820
836int r_jwk_export_to_pem_der(jwk_t * jwk, int format, unsigned char * output, size_t * output_len, int x5u_flags);
837
846int r_jwk_export_to_symmetric_key(jwk_t * jwk, unsigned char * key, size_t * key_len);
847
864char * r_jwk_thumbprint(jwk_t * jwk, int hash, int x5u_flags);
865
878int r_jwk_validate_x5c_chain(jwk_t * jwk, int x5u_flags);
879
894int r_jwk_match_json_t(jwk_t * jwk, json_t * j_match);
895
910int r_jwk_match_json_str(jwk_t * jwk, const char * str_match);
911
929int r_jwks_is_valid(jwks_t * jwks);
930
940int r_jwks_import_from_json_str(jwks_t * jwks, const char * input);
941
951int r_jwks_import_from_json_t(jwks_t * jwks, json_t * j_input);
952
966int r_jwks_import_from_uri(jwks_t * jwks, const char * uri, int x5u_flags);
967
977 jwks_t * r_jwks_quick_import(rhn_import, ...);
978
984 jwks_t * r_jwks_copy(jwks_t * jwks);
985
991size_t r_jwks_size(jwks_t * jwks);
992
1000 jwk_t * r_jwks_get_at(jwks_t * jwks, size_t index);
1001
1009 jwk_t * r_jwks_get_by_kid(jwks_t * jwks, const char * kid);
1010
1017int r_jwks_append_jwk(jwks_t * jwks, jwk_t * jwk);
1018
1026int r_jwks_set_at(jwks_t * jwks, size_t index, jwk_t * jwk);
1027
1034int r_jwks_remove_at(jwks_t * jwks, size_t index);
1035
1041int r_jwks_empty(jwks_t * jwks);
1042
1050int r_jwks_equal(jwks_t * jwks1, jwks_t * jwks2);
1051
1058char * r_jwks_export_to_json_str(jwks_t * jwks, int pretty);
1059
1065json_t * r_jwks_export_to_json_t(jwks_t * jwks);
1066
1074gnutls_privkey_t * r_jwks_export_to_gnutls_privkey(jwks_t * jwks, size_t * len);
1075
1088gnutls_pubkey_t * r_jwks_export_to_gnutls_pubkey(jwks_t * jwks, size_t * len, int x5u_flags);
1089
1105int r_jwks_export_to_pem_der(jwks_t * jwks, int format, unsigned char * output, size_t * output_len, int x5u_flags);
1106
1119 jwks_t * r_jwks_search_json_t(jwks_t * jwks, json_t * j_match);
1120
1133 jwks_t * r_jwks_search_json_str(jwks_t * jwks, const char * str_match);
1134
1150int r_jws_set_properties(jws_t * jws, ...);
1151
1157 jws_t * r_jws_copy(jws_t * jws);
1158
1166int r_jws_set_payload(jws_t * jws, const unsigned char * payload, size_t payload_len);
1167
1174const unsigned char * r_jws_get_payload(jws_t * jws, size_t * payload_len);
1175
1182int r_jws_set_alg(jws_t * jws, jwa_alg alg);
1183
1189 jwa_alg r_jws_get_alg(jws_t * jws);
1190
1197const char * r_jws_get_kid(jws_t * jws);
1198
1206int r_jws_set_header_str_value(jws_t * jws, const char * key, const char * str_value);
1207
1215int r_jws_set_header_int_value(jws_t * jws, const char * key, rhn_int_t i_value);
1216
1224int r_jws_set_header_json_t_value(jws_t * jws, const char * key, json_t * j_value);
1225
1232int r_jws_set_full_header_json_t(jws_t * jws, json_t * j_value);
1233
1240int r_jws_set_full_header_json_str(jws_t * jws, const char * str_value);
1241
1248const char * r_jws_get_header_str_value(jws_t * jws, const char * key);
1249
1256 rhn_int_t r_jws_get_header_int_value(jws_t * jws, const char * key);
1257
1264json_t * r_jws_get_header_json_t_value(jws_t * jws, const char * key);
1265
1271json_t * r_jws_get_full_header_json_t(jws_t * jws);
1272
1278char * r_jws_get_full_header_str(jws_t * jws);
1279
1287int r_jws_add_keys(jws_t * jws, jwk_t * jwk_privkey, jwk_t * jwk_pubkey);
1288
1296int r_jws_add_jwks(jws_t * jws, jwks_t * jwks_privkey, jwks_t * jwks_pubkey);
1297
1306int r_jws_add_keys_json_str(jws_t * jws, const char * privkey, const char * pubkey);
1307
1316int r_jws_add_keys_json_t(jws_t * jws, json_t * privkey, json_t * pubkey);
1317
1329int 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);
1330
1339int r_jws_add_keys_gnutls(jws_t * jws, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey);
1340
1348int r_jws_add_key_symmetric(jws_t * jws, const unsigned char * key, size_t key_len);
1349
1355 jwks_t * r_jws_get_jwks_privkey(jws_t * jws);
1356
1362 jwks_t * r_jws_get_jwks_pubkey(jws_t * jws);
1363
1376int r_jws_parse(jws_t * jws, const char * jws_str, int x5u_flags);
1377
1391int r_jws_parsen(jws_t * jws, const char * jws_str, size_t jws_str_len, int x5u_flags);
1392
1415int r_jws_advanced_parse(jws_t * jws, const char * jws_str, uint32_t parse_flags, int x5u_flags);
1416
1440int r_jws_advanced_parsen(jws_t * jws, const char * jws_str, size_t jws_str_len, uint32_t parse_flags, int x5u_flags);
1441
1455int r_jws_parse_unsecure(jws_t * jws, const char * jws_str, int x5u_flags);
1456
1471int r_jws_parsen_unsecure(jws_t * jws, const char * jws_str, size_t jws_str_len, int x5u_flags);
1472
1485int r_jws_compact_parse(jws_t * jws, const char * jws_str, int x5u_flags);
1486
1510int r_jws_advanced_compact_parsen(jws_t * jws, const char * jws_str, size_t jws_str_len, uint32_t parse_flags, int x5u_flags);
1511
1534int r_jws_advanced_compact_parse(jws_t * jws, const char * jws_str, uint32_t parse_flags, int x5u_flags);
1535
1549int r_jws_compact_parsen(jws_t * jws, const char * jws_str, size_t jws_str_len, int x5u_flags);
1550
1565int r_jws_compact_parsen_unsecure(jws_t * jws, const char * jws_str, size_t jws_str_len, int x5u_flags);
1566
1580int r_jws_compact_parse_unsecure(jws_t * jws, const char * jws_str, int x5u_flags);
1581
1594int r_jws_parse_json_str(jws_t * jws, const char * jws_json_str, int x5u_flags);
1595
1609int r_jws_parsen_json_str(jws_t * jws, const char * jws_json_str, size_t jws_json_str_len, int x5u_flags);
1610
1623int r_jws_parse_json_t(jws_t * jws, json_t * jws_json, int x5u_flags);
1624
1647int r_jws_advanced_parse_json_str(jws_t * jws, const char * jws_json_str, uint32_t parse_flags, int x5u_flags);
1648
1672int r_jws_advanced_parsen_json_str(jws_t * jws, const char * jws_json_str, size_t jws_json_str_len, uint32_t parse_flags, int x5u_flags);
1673
1696int r_jws_advanced_parse_json_t(jws_t * jws, json_t * jws_json, uint32_t parse_flags, int x5u_flags);
1697
1719 jws_t * r_jws_quick_parse(const char * jws_str, uint32_t parse_flags, int x5u_flags);
1720
1743 jws_t * r_jws_quick_parsen(const char * jws_str, size_t jws_str_len, uint32_t parse_flags, int x5u_flags);
1744
1762int r_jws_verify_signature(jws_t * jws, jwk_t * jwk_pubkey, int x5u_flags);
1763
1777char * r_jws_serialize(jws_t * jws, jwk_t * jwk_privkey, int x5u_flags);
1778
1793char * r_jws_serialize_unsecure(jws_t * jws, jwk_t * jwk_privkey, int x5u_flags);
1794
1817json_t * r_jws_serialize_json_t(jws_t * jws, jwks_t * jwks_privkey, int x5u_flags, int mode);
1818
1841char * r_jws_serialize_json_str(jws_t * jws, jwks_t * jwks_privkey, int x5u_flags, int mode);
1842
1858int r_jwe_set_properties(jwe_t * jwe, ...);
1859
1865 jwe_t * r_jwe_copy(jwe_t * jwe);
1866
1874int r_jwe_set_payload(jwe_t * jwe, const unsigned char * payload, size_t payload_len);
1875
1882const unsigned char * r_jwe_get_payload(jwe_t * jwe, size_t * payload_len);
1883
1890int r_jwe_set_alg(jwe_t * jwe, jwa_alg alg);
1891
1897 jwa_alg r_jwe_get_alg(jwe_t * jwe);
1898
1905int r_jwe_set_enc(jwe_t * jwe, jwa_enc enc);
1906
1912 jwa_enc r_jwe_get_enc(jwe_t * jwe);
1913
1920const char * r_jwe_get_kid(jwe_t * jwe);
1921
1929int r_jwe_set_header_str_value(jwe_t * jwe, const char * key, const char * str_value);
1930
1938int r_jwe_set_header_int_value(jwe_t * jwe, const char * key, rhn_int_t i_value);
1939
1947int r_jwe_set_header_json_t_value(jwe_t * jwe, const char * key, json_t * j_value);
1948
1955int r_jwe_set_full_header_json_t(jwe_t * jwe, json_t * j_header);
1956
1963int r_jwe_set_full_header_json_str(jwe_t * jwe, const char * str_header);
1964
1972int r_jwe_set_full_unprotected_header_json_t(jwe_t * jwe, json_t * j_unprotected_header);
1973
1981int r_jwe_set_full_unprotected_header_json_str(jwe_t * jwe, const char * str_unprotected_header);
1982
1988json_t * r_jwe_get_full_unprotected_header_json_t(jwe_t * jwe);
1989
1995char * r_jwe_get_full_unprotected_header_str(jwe_t * jwe);
1996
2003const char * r_jwe_get_header_str_value(jwe_t * jwe, const char * key);
2004
2011 rhn_int_t r_jwe_get_header_int_value(jwe_t * jwe, const char * key);
2012
2019json_t * r_jwe_get_header_json_t_value(jwe_t * jwe, const char * key);
2020
2026json_t * r_jwe_get_full_header_json_t(jwe_t * jwe);
2027
2033char * r_jwe_get_full_header_str(jwe_t * jwe);
2034
2042int r_jwe_add_keys(jwe_t * jwe, jwk_t * jwk_privkey, jwk_t * jwk_pubkey);
2043
2051int r_jwe_add_jwks(jwe_t * jwe, jwks_t * jwks_privkey, jwks_t * jwks_pubkey);
2052
2061int r_jwe_add_keys_json_str(jwe_t * jwe, const char * privkey, const char * pubkey);
2062
2071int r_jwe_add_keys_json_t(jwe_t * jwe, json_t * privkey, json_t * pubkey);
2072
2084int 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);
2085
2094int r_jwe_add_keys_gnutls(jwe_t * jwe, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey);
2095
2103int r_jwe_add_key_symmetric(jwe_t * jwe, const unsigned char * key, size_t key_len);
2104
2110 jwks_t * r_jwe_get_jwks_privkey(jwe_t * jwe);
2111
2117 jwks_t * r_jwe_get_jwks_pubkey(jwe_t * jwe);
2118
2126int r_jwe_set_cypher_key(jwe_t * jwe, const unsigned char * key, size_t key_len);
2127
2134const unsigned char * r_jwe_get_cypher_key(jwe_t * jwe, size_t * key_len);
2135
2141int r_jwe_generate_cypher_key(jwe_t * jwe);
2142
2150int r_jwe_set_iv(jwe_t * jwe, const unsigned char * iv, size_t iv_len);
2151
2158const unsigned char * r_jwe_get_iv(jwe_t * jwe, size_t * iv_len);
2159
2165int r_jwe_generate_iv(jwe_t * jwe);
2166
2174int r_jwe_set_aad(jwe_t * jwe, const unsigned char * aad, size_t aad_len);
2175
2182const unsigned char * r_jwe_get_aad(jwe_t * jwe, size_t * aad_len);
2183
2189int r_jwe_encrypt_payload(jwe_t * jwe);
2190
2196int r_jwe_decrypt_payload(jwe_t * jwe);
2197
2210int r_jwe_encrypt_key(jwe_t * jwe, jwk_t * jwk_pubkey, int x5u_flags);
2211
2224int r_jwe_decrypt_key(jwe_t * jwe, jwk_t * jwk_privkey, int x5u_flags);
2225
2238int r_jwe_parse(jwe_t * jwe, const char * jwe_str, int x5u_flags);
2239
2253int r_jwe_parsen(jwe_t * jwe, const char * jwe_str, size_t jwe_str_len, int x5u_flags);
2254
2277int r_jwe_advanced_parse(jwe_t * jwe, const char * jwe_str, uint32_t parse_flags, int x5u_flags);
2278
2302int r_jwe_advanced_parsen(jwe_t * jwe, const char * jwe_str, size_t jwe_str_len, uint32_t parse_flags, int x5u_flags);
2303
2316int r_jwe_compact_parse(jwe_t * jwe, const char * jwe_str, int x5u_flags);
2317
2331int r_jwe_compact_parsen(jwe_t * jwe, const char * jwe_str, size_t jwe_str_len, int x5u_flags);
2332
2355int r_jwe_advanced_compact_parse(jwe_t * jwe, const char * jwe_str, uint32_t parse_flags, int x5u_flags);
2356
2380int r_jwe_advanced_compact_parsen(jwe_t * jwe, const char * jwe_str, size_t jwe_str_len, uint32_t parse_flags, int x5u_flags);
2381
2394int r_jwe_parse_json_str(jwe_t * jwe, const char * jwe_json_str, int x5u_flags);
2395
2409int r_jwe_parsen_json_str(jwe_t * jwe, const char * jwe_json_str, size_t jwe_json_str_len, int x5u_flags);
2410
2423int r_jwe_parse_json_t(jwe_t * jwe, json_t * jwe_json, int x5u_flags);
2424
2447int r_jwe_advanced_parse_json_str(jwe_t * jwe, const char * jwe_json_str, uint32_t parse_flags, int x5u_flags);
2448
2472int r_jwe_advanced_parsen_json_str(jwe_t * jwe, const char * jwe_json_str, size_t jwe_json_str_len, uint32_t parse_flags, int x5u_flags);
2473
2496int r_jwe_advanced_parse_json_t(jwe_t * jwe, json_t * jwe_json, uint32_t parse_flags, int x5u_flags);
2497
2519 jwe_t * r_jwe_quick_parse(const char * jwe_str, uint32_t parse_flags, int x5u_flags);
2520
2543 jwe_t * r_jwe_quick_parsen(const char * jwe_str, size_t jwe_str_len, uint32_t parse_flags, int x5u_flags);
2544
2558int r_jwe_decrypt(jwe_t * jwe, jwk_t * jwk_privkey, int x5u_flags);
2559
2573char * r_jwe_serialize(jwe_t * jwe, jwk_t * jwk_pubkey, int x5u_flags);
2574
2597char * r_jwe_serialize_json_str(jwe_t * jwe, jwks_t * jwks_pubkey, int x5u_flags, int mode);
2598
2621json_t * r_jwe_serialize_json_t(jwe_t * jwe, jwks_t * jwks_pubkey, int x5u_flags, int mode);
2622
2638int r_jwt_set_properties(jwt_t * jwt, ...);
2639
2645 jwt_t * r_jwt_copy(jwt_t * jwt);
2646
2654int r_jwt_set_header_str_value(jwt_t * jwt, const char * key, const char * str_value);
2655
2663int r_jwt_set_header_int_value(jwt_t * jwt, const char * key, rhn_int_t i_value);
2664
2672int r_jwt_set_header_json_t_value(jwt_t * jwt, const char * key, json_t * j_value);
2673
2680int r_jwt_set_full_header_json_t(jwt_t * jwt, json_t * j_header);
2681
2688int r_jwt_set_full_header_json_str(jwt_t * jwt, const char * str_header);
2689
2696const char * r_jwt_get_header_str_value(jwt_t * jwt, const char * key);
2697
2704 rhn_int_t r_jwt_get_header_int_value(jwt_t * jwt, const char * key);
2705
2712json_t * r_jwt_get_header_json_t_value(jwt_t * jwt, const char * key);
2713
2719json_t * r_jwt_get_full_header_json_t(jwt_t * jwt);
2720
2726char * r_jwt_get_full_header_str(jwt_t * jwt);
2727
2735int r_jwt_set_claim_str_value(jwt_t * jwt, const char * key, const char * str_value);
2736
2744int r_jwt_set_claim_int_value(jwt_t * jwt, const char * key, rhn_int_t i_value);
2745
2753int r_jwt_set_claim_json_t_value(jwt_t * jwt, const char * key, json_t * j_value);
2754
2761const char * r_jwt_get_claim_str_value(jwt_t * jwt, const char * key);
2762
2769 rhn_int_t r_jwt_get_claim_int_value(jwt_t * jwt, const char * key);
2770
2777json_t * r_jwt_get_claim_json_t_value(jwt_t * jwt, const char * key);
2778
2784json_t * r_jwt_get_full_claims_json_t(jwt_t * jwt);
2785
2791char * r_jwt_get_full_claims_str(jwt_t * jwt);
2792
2800int r_jwt_set_full_claims_json_t(jwt_t * jwt, json_t * j_claim);
2801
2809int r_jwt_set_full_claims_json_str(jwt_t * jwt, const char * str_claims);
2810
2818int r_jwt_append_claims_json_t(jwt_t * jwt, json_t * j_claim);
2819
2827int r_jwt_add_sign_keys(jwt_t * jwt, jwk_t * privkey, jwk_t * pubkey);
2828
2836int r_jwt_add_sign_jwks(jwt_t * jwt, jwks_t * jwks_privkey, jwks_t * jwks_pubkey);
2837
2846int r_jwt_add_sign_keys_json_str(jwt_t * jwt, const char * privkey, const char * pubkey);
2847
2856int r_jwt_add_sign_keys_json_t(jwt_t * jwt, json_t * privkey, json_t * pubkey);
2857
2869int 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);
2870
2879int r_jwt_add_sign_keys_gnutls(jwt_t * jwt, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey);
2880
2888int r_jwt_add_sign_key_symmetric(jwt_t * jwt, const unsigned char * key, size_t key_len);
2889
2895 jwks_t * r_jwt_get_sign_jwks_privkey(jwt_t * jwt);
2896
2902 jwks_t * r_jwt_get_sign_jwks_pubkey(jwt_t * jwt);
2903
2911int r_jwt_add_enc_keys(jwt_t * jwt, jwk_t * privkey, jwk_t * pubkey);
2912
2920int r_jwt_add_enc_jwks(jwt_t * jwt, jwks_t * jwks_privkey, jwks_t * jwks_pubkey);
2921
2930int r_jwt_add_enc_keys_json_str(jwt_t * jwt, const char * privkey, const char * pubkey);
2931
2940int r_jwt_add_enc_keys_json_t(jwt_t * jwt, json_t * privkey, json_t * pubkey);
2941
2953int 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);
2954
2963int r_jwt_add_enc_keys_gnutls(jwt_t * jwt, gnutls_privkey_t privkey, gnutls_pubkey_t pubkey);
2964
2972int r_jwt_add_enc_key_symmetric(jwt_t * jwt, const unsigned char * key, size_t key_len);
2973
2979 jwks_t * r_jwt_get_enc_jwks_privkey(jwt_t * jwt);
2980
2986 jwks_t * r_jwt_get_enc_jwks_pubkey(jwt_t * jwt);
2987
2994int r_jwt_set_sign_alg(jwt_t * jwt, jwa_alg alg);
2995
3001 jwa_alg r_jwt_get_sign_alg(jwt_t * jwt);
3002
3009int r_jwt_set_enc_alg(jwt_t * jwt, jwa_alg alg);
3010
3016 jwa_alg r_jwt_get_enc_alg(jwt_t * jwt);
3017
3024int r_jwt_set_enc(jwt_t * jwt, jwa_enc enc);
3025
3031 jwa_enc r_jwt_get_enc(jwt_t * jwt);
3032
3039const char * r_jwt_get_enc_kid(jwt_t * jwt);
3040
3047const char * r_jwt_get_sig_kid(jwt_t * jwt);
3048
3056int r_jwt_set_enc_cypher_key(jwt_t * jwt, const unsigned char * key, size_t key_len);
3057
3064const unsigned char * r_jwt_get_enc_cypher_key(jwt_t * jwt, size_t * key_len);
3065
3071int r_jwt_generate_enc_cypher_key(jwt_t * jwt);
3072
3080int r_jwt_set_enc_iv(jwt_t * jwt, const unsigned char * iv, size_t iv_len);
3081
3088const unsigned char * r_jwt_get_enc_iv(jwt_t * jwt, size_t * iv_len);
3089
3095 int r_jwt_generate_iv(jwt_t * jwt);
3096
3109char * r_jwt_serialize_signed(jwt_t * jwt, jwk_t * privkey, int x5u_flags);
3110
3124char * r_jwt_serialize_signed_unsecure(jwt_t * jwt, jwk_t * privkey, int x5u_flags);
3125
3138char * r_jwt_serialize_encrypted(jwt_t * jwt, jwk_t * pubkey, int x5u_flags);
3139
3164char * 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);
3165
3181int r_jwt_parse(jwt_t * jwt, const char * token, int x5u_flags);
3182
3199int r_jwt_parsen(jwt_t * jwt, const char * token, size_t token_len, int x5u_flags);
3200
3217int r_jwt_parse_unsecure(jwt_t * jwt, const char * token, int x5u_flags);
3218
3236int r_jwt_parsen_unsecure(jwt_t * jwt, const char * token, size_t token_len, int x5u_flags);
3237
3263int r_jwt_advanced_parse(jwt_t * jwt, const char * token, uint32_t parse_flags, int x5u_flags);
3264
3291int r_jwt_advanced_parsen(jwt_t * jwt, const char * token, size_t token_len, uint32_t parse_flags, int x5u_flags);
3292
3317 jwt_t * r_jwt_quick_parse(const char * token, uint32_t parse_flags, int x5u_flags);
3318
3344 jwt_t * r_jwt_quick_parsen(const char * token, size_t token_len, uint32_t parse_flags, int x5u_flags);
3345
3356int r_jwt_get_type(jwt_t * jwt);
3357
3367int r_jwt_token_type(const char * token);
3368
3379int r_jwt_token_typen(const char * token, size_t token_len);
3380
3396int r_jwt_verify_signature(jwt_t * jwt, jwk_t * pubkey, int x5u_flags);
3397
3411int r_jwt_decrypt(jwt_t * jwt, jwk_t * privkey, int x5u_flags);
3412
3435int 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);
3436
3451int r_jwt_decrypt_nested(jwt_t * jwt, jwk_t * decrypt_key, int decrypt_key_x5u_flags);
3452
3466int r_jwt_verify_signature_nested(jwt_t * jwt, jwk_t * verify_key, int verify_key_x5u_flags);
3467
3494int r_jwt_validate_claims(jwt_t * jwt, ...);
3495
3511int r_jwt_set_claims(jwt_t * jwt, ...);
3512
3517#ifndef DOXYGEN_SHOULD_SKIP_THIS
3518
3522int _r_json_set_str_value(json_t * j_json, const char * key, const char * str_value);
3523
3524int _r_json_set_int_value(json_t * j_json, const char * key, rhn_int_t i_value);
3525
3526int _r_json_set_json_t_value(json_t * j_json, const char * key, json_t * j_value);
3527
3528const char * _r_json_get_str_value(json_t * j_json, const char * key);
3529
3530 rhn_int_t _r_json_get_int_value(json_t * j_json, const char * key);
3531
3532json_t * _r_json_get_json_t_value(json_t * j_json, const char * key);
3533
3534json_t * _r_json_get_full_json_t(json_t * j_json);
3535
3536size_t _r_get_key_size(jwa_enc enc);
3537
3538gnutls_cipher_algorithm_t _r_get_alg_from_enc(jwa_enc enc);
3539
3540int _r_deflate_payload(const unsigned char * uncompressed, size_t uncompressed_len, unsigned char ** compressed, size_t * compressed_len);
3541
3542int _r_inflate_payload(const unsigned char * compressed, size_t compressed_len, unsigned char ** uncompressed, size_t * uncompressed_len);
3543
3544#endif
3545
3546#ifdef __cplusplus
3547}
3548#endif
3549
3550#endif // __RHONABWY_H_
r_jwe_free
void r_jwe_free(jwe_t *jwe)
Definition: jwe.c:2737
r_library_info_json_t
json_t * r_library_info_json_t(void)
Definition: misc.c:644
r_jws_init
int r_jws_init(jws_t **jws)
Definition: jws.c:845
r_str_to_jwa_enc
jwa_enc r_str_to_jwa_enc(const char *enc)
Definition: misc.c:600
r_jws_free
void r_jws_free(jws_t *jws)
Definition: jws.c:888
r_jwk_free
void r_jwk_free(jwk_t *jwk)
Definition: jwk.c:57
r_jwks_free
void r_jwks_free(jwks_t *jwks)
Definition: jwks.c:41
r_library_info_json_str
char * r_library_info_json_str(void)
Definition: misc.c:703
r_jwt_free
void r_jwt_free(jwt_t *jwt)
Definition: jwt.c:95
r_jwks_init
int r_jwks_init(jwks_t **jwks)
Definition: jwks.c:30
r_jwa_alg_to_str
const char * r_jwa_alg_to_str(jwa_alg alg)
Definition: misc.c:496
r_jwa_enc_to_str
const char * r_jwa_enc_to_str(jwa_enc enc)
Definition: misc.c:618
r_str_to_jwa_alg
jwa_alg r_str_to_jwa_alg(const char *alg)
Definition: misc.c:424
r_jwe_init
int r_jwe_init(jwe_t **jwe)
Definition: jwe.c:2683
r_free
void r_free(void *data)
Definition: misc.c:713
r_global_close
void r_global_close(void)
Definition: misc.c:59
r_global_init
int r_global_init(void)
Definition: misc.c:37
r_jwt_init
int r_jwt_init(jwt_t **jwt)
Definition: jwt.c:34
r_jwk_init
int r_jwk_init(jwk_t **jwk)
Definition: jwk.c:46
r_jwk_export_to_gnutls_pubkey
gnutls_pubkey_t r_jwk_export_to_gnutls_pubkey(jwk_t *jwk, int x5u_flags)
Definition: jwk.c:2085
r_jwk_export_to_gnutls_privkey
gnutls_privkey_t r_jwk_export_to_gnutls_privkey(jwk_t *jwk)
Definition: jwk.c:1788
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:2356
r_jwk_match_json_str
int r_jwk_match_json_str(jwk_t *jwk, const char *str_match)
Definition: jwk.c:2917
r_jwk_export_to_json_t
json_t * r_jwk_export_to_json_t(jwk_t *jwk)
Definition: jwk.c:1780
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:2467
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:2411
r_jwk_match_json_t
int r_jwk_match_json_t(jwk_t *jwk, json_t *j_match)
Definition: jwk.c:2896
r_jwk_validate_x5c_chain
int r_jwk_validate_x5c_chain(jwk_t *jwk, int x5u_flags)
Definition: jwk.c:2759
r_jwk_thumbprint
char * r_jwk_thumbprint(jwk_t *jwk, int hash, int x5u_flags)
Definition: jwk.c:2665
r_jwk_export_to_json_str
char * r_jwk_export_to_json_str(jwk_t *jwk, int pretty)
Definition: jwk.c:1772
r_jwk_import_from_password
int r_jwk_import_from_password(jwk_t *jwk, const char *password)
Definition: jwk.c:1678
r_jwk_import_from_json_str
int r_jwk_import_from_json_str(jwk_t *jwk, const char *input)
Definition: jwk.c:885
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:918
r_jwk_import_from_json_t
int r_jwk_import_from_json_t(jwk_t *jwk, json_t *j_input)
Definition: jwk.c:902
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:1573
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:1653
r_jwk_import_from_x5c
int r_jwk_import_from_x5c(jwk_t *jwk, const char *x5c)
Definition: jwk.c:1631
r_jwk_import_from_gnutls_pubkey
int r_jwk_import_from_gnutls_pubkey(jwk_t *jwk, gnutls_pubkey_t pub)
Definition: jwk.c:1360
r_jwk_copy
jwk_t * r_jwk_copy(jwk_t *jwk)
Definition: jwk.c:1760
r_jwk_equal
int r_jwk_equal(jwk_t *jwk1, jwk_t *jwk2)
Definition: jwk.c:1768
r_jwk_quick_import
jwk_t * r_jwk_quick_import(rhn_import type,...)
Definition: jwk.c:1682
r_jwk_extract_pubkey
int r_jwk_extract_pubkey(jwk_t *jwk_privkey, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jwk.c:834
r_jwk_import_from_x5u
int r_jwk_import_from_x5u(jwk_t *jwk, int x5u_flags, const char *x5u)
Definition: jwk.c:1609
r_jwk_import_from_gnutls_privkey
int r_jwk_import_from_gnutls_privkey(jwk_t *jwk, gnutls_privkey_t key)
Definition: jwk.c:1047
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:3910
r_jwe_set_iv
int r_jwe_set_iv(jwe_t *jwe, const unsigned char *iv, size_t iv_len)
Definition: jwe.c:2891
r_jwe_set_properties
int r_jwe_set_properties(jwe_t *jwe,...)
Definition: jwe.c:4470
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:3092
r_jwe_encrypt_payload
int r_jwe_encrypt_payload(jwe_t *jwe)
Definition: jwe.c:3414
r_jwe_quick_parsen
jwe_t * r_jwe_quick_parsen(const char *jwe_str, size_t jwe_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:4075
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:4260
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:3295
r_jwe_get_aad
const unsigned char * r_jwe_get_aad(jwe_t *jwe, size_t *aad_len)
Definition: jwe.c:2973
r_jwe_set_payload
int r_jwe_set_payload(jwe_t *jwe, const unsigned char *payload, size_t payload_len)
Definition: jwe.c:2793
r_jwe_set_enc
int r_jwe_set_enc(jwe_t *jwe, jwa_enc enc)
Definition: jwe.c:3041
r_jwe_decrypt_payload
int r_jwe_decrypt_payload(jwe_t *jwe)
Definition: jwe.c:3560
r_jwe_get_cypher_key
const unsigned char * r_jwe_get_cypher_key(jwe_t *jwe, size_t *key_len)
Definition: jwe.c:2853
r_jwe_get_full_header_str
char * r_jwe_get_full_header_str(jwe_t *jwe)
Definition: jwe.c:3135
r_jwe_get_enc
jwa_enc r_jwe_get_enc(jwe_t *jwe)
Definition: jwe.c:3052
r_jwe_parse
int r_jwe_parse(jwe_t *jwe, const char *jwe_str, int x5u_flags)
Definition: jwe.c:3766
r_jwe_set_alg
int r_jwe_set_alg(jwe_t *jwe, jwa_alg alg)
Definition: jwe.c:3022
r_jwe_advanced_parse_json_t
int r_jwe_advanced_parse_json_t(jwe_t *jwe, json_t *jwe_json, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:3940
r_jwe_quick_parse
jwe_t * r_jwe_quick_parse(const char *jwe_str, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:4071
r_jwe_get_iv
const unsigned char * r_jwe_get_iv(jwe_t *jwe, size_t *iv_len)
Definition: jwe.c:2926
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:4444
r_jwe_advanced_parse_json_str
int r_jwe_advanced_parse_json_str(jwe_t *jwe, const char *jwe_json_str, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:3925
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:3334
r_jwe_generate_iv
int r_jwe_generate_iv(jwe_t *jwe)
Definition: jwe.c:2983
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:4460
r_jwe_advanced_parse
int r_jwe_advanced_parse(jwe_t *jwe, const char *jwe_str, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:3793
r_jwe_generate_cypher_key
int r_jwe_generate_cypher_key(jwe_t *jwe)
Definition: jwe.c:2863
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:3121
r_jwe_add_keys
int r_jwe_add_keys(jwe_t *jwe, jwk_t *jwk_privkey, jwk_t *jwk_pubkey)
Definition: jwe.c:3158
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:3906
r_jwe_get_full_unprotected_header_str
char * r_jwe_get_full_unprotected_header_str(jwe_t *jwe)
Definition: jwe.c:3150
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:2828
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:3217
r_jwe_compact_parse
int r_jwe_compact_parse(jwe_t *jwe, const char *jwe_str, int x5u_flags)
Definition: jwe.c:3824
r_jwe_advanced_parsen
int r_jwe_advanced_parsen(jwe_t *jwe, const char *jwe_str, size_t jwe_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:3797
r_jwe_get_jwks_pubkey
jwks_t * r_jwe_get_jwks_pubkey(jwe_t *jwe)
Definition: jwe.c:3406
r_jwe_get_full_unprotected_header_json_t
json_t * r_jwe_get_full_unprotected_header_json_t(jwe_t *jwe)
Definition: jwe.c:3143
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:3256
r_jwe_advanced_compact_parsen
int r_jwe_advanced_compact_parsen(jwe_t *jwe, const char *jwe_str, size_t jwe_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:3832
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:4398
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:3770
r_jwe_get_full_header_json_t
json_t * r_jwe_get_full_header_json_t(jwe_t *jwe)
Definition: jwe.c:3128
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:3373
r_jwe_decrypt
int r_jwe_decrypt(jwe_t *jwe, jwk_t *jwk_privkey, int x5u_flags)
Definition: jwe.c:4092
r_jwe_decrypt_key
int r_jwe_decrypt_key(jwe_t *jwe, jwk_t *jwk_privkey, int x5u_flags)
Definition: jwe.c:3740
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:3820
r_jwe_get_payload
const unsigned char * r_jwe_get_payload(jwe_t *jwe, size_t *payload_len)
Definition: jwe.c:2818
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:4267
r_jwe_set_aad
int r_jwe_set_aad(jwe_t *jwe, const unsigned char *aad, size_t aad_len)
Definition: jwe.c:2936
r_jwe_get_kid
const char * r_jwe_get_kid(jwe_t *jwe)
Definition: jwe.c:3060
r_jwe_get_header_int_value
rhn_int_t r_jwe_get_header_int_value(jwe_t *jwe, const char *key)
Definition: jwe.c:3114
r_jwe_parse_json_t
int r_jwe_parse_json_t(jwe_t *jwe, json_t *jwe_json, int x5u_flags)
Definition: jwe.c:3921
r_jwe_get_alg
jwa_alg r_jwe_get_alg(jwe_t *jwe)
Definition: jwe.c:3033
r_jwe_advanced_parsen_json_str
int r_jwe_advanced_parsen_json_str(jwe_t *jwe, const char *jwe_json_str, size_t jwe_json_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:3929
r_jwe_encrypt_key
int r_jwe_encrypt_key(jwe_t *jwe, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jwe.c:3692
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:4434
r_jwe_serialize
char * r_jwe_serialize(jwe_t *jwe, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jwe.c:4202
r_jwe_copy
jwe_t * r_jwe_copy(jwe_t *jwe)
Definition: jwe.c:2758
r_jwe_get_jwks_privkey
jwks_t * r_jwe_get_jwks_privkey(jwe_t *jwe)
Definition: jwe.c:3398
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:3064
r_jwe_advanced_compact_parse
int r_jwe_advanced_compact_parse(jwe_t *jwe, const char *jwe_str, uint32_t parse_flags, int x5u_flags)
Definition: jwe.c:3828
r_jwe_set_header_int_value
int r_jwe_set_header_int_value(jwe_t *jwe, const char *key, rhn_int_t i_value)
Definition: jwe.c:3078
r_jwe_add_jwks
int r_jwe_add_jwks(jwe_t *jwe, jwks_t *jwks_privkey, jwks_t *jwks_pubkey)
Definition: jwe.c:3184
r_jwe_get_header_str_value
const char * r_jwe_get_header_str_value(jwe_t *jwe, const char *key)
Definition: jwe.c:3107
r_jwk_get_property_str
const char * r_jwk_get_property_str(jwk_t *jwk, const char *key)
Definition: jwk.c:2504
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:2555
r_jwk_delete_property_str
int r_jwk_delete_property_str(jwk_t *jwk, const char *key)
Definition: jwk.c:2597
r_jwk_append_property_array
int r_jwk_append_property_array(jwk_t *jwk, const char *key, const char *value)
Definition: jwk.c:2579
r_jwk_get_property_array
const char * r_jwk_get_property_array(jwk_t *jwk, const char *key, size_t index)
Definition: jwk.c:2516
r_jwk_set_property_str
int r_jwk_set_property_str(jwk_t *jwk, const char *key, const char *value)
Definition: jwk.c:2542
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:2623
r_jwk_get_property_array_size
int r_jwk_get_property_array_size(jwk_t *jwk, const char *key)
Definition: jwk.c:2529
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:2610
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:487
r_jwk_is_valid_x5u
int r_jwk_is_valid_x5u(jwk_t *jwk, int x5u_flags)
Definition: jwk.c:403
r_jwk_key_type
int r_jwk_key_type(jwk_t *jwk, unsigned int *bits, int x5u_flags)
Definition: jwk.c:640
r_jwk_is_valid
int r_jwk_is_valid(jwk_t *jwk)
Definition: jwk.c:63
r_jwks_size
size_t r_jwks_size(jwks_t *jwks)
Definition: jwks.c:68
r_jwks_search_json_t
jwks_t * r_jwks_search_json_t(jwks_t *jwks, json_t *j_match)
Definition: jwks.c:471
r_jwks_export_to_json_t
json_t * r_jwks_export_to_json_t(jwks_t *jwks)
Definition: jwks.c:169
r_jwks_get_at
jwk_t * r_jwks_get_at(jwks_t *jwks, size_t index)
Definition: jwks.c:76
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_export_to_json_str
char * r_jwks_export_to_json_str(jwks_t *jwks, int pretty)
Definition: jwks.c:161
r_jwks_search_json_str
jwks_t * r_jwks_search_json_str(jwks_t *jwks, const char *str_match)
Definition: jwks.c:494
r_jwks_equal
int r_jwks_equal(jwks_t *jwks1, jwks_t *jwks2)
Definition: jwks.c:157
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_copy
jwks_t * r_jwks_copy(jwks_t *jwks)
Definition: jwks.c:97
r_jwks_quick_import
jwks_t * r_jwks_quick_import(rhn_import,...)
Definition: jwks.c:336
r_jwks_import_from_json_str
int r_jwks_import_from_json_str(jwks_t *jwks, const char *input)
Definition: jwks.c:248
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_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_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_jws_set_full_header_json_t
int r_jws_set_full_header_json_t(jws_t *jws, json_t *j_value)
Definition: jws.c:2006
r_jws_get_jwks_privkey
jwks_t * r_jws_get_jwks_privkey(jws_t *jws)
Definition: jws.c:1365
r_jws_compact_parsen_unsecure
int r_jws_compact_parsen_unsecure(jws_t *jws, const char *jws_str, size_t jws_str_len, int x5u_flags)
Definition: jws.c:1441
r_jws_get_full_header_json_t
json_t * r_jws_get_full_header_json_t(jws_t *jws)
Definition: jws.c:1110
r_jws_advanced_parse_json_str
int r_jws_advanced_parse_json_str(jws_t *jws, const char *jws_json_str, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1562
r_jws_advanced_parse_json_t
int r_jws_advanced_parse_json_t(jws_t *jws, json_t *jws_json, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1577
r_jws_verify_signature
int r_jws_verify_signature(jws_t *jws, jwk_t *jwk_pubkey, int x5u_flags)
Definition: jws.c:1778
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:1046
r_jws_quick_parse
jws_t * r_jws_quick_parse(const char *jws_str, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1757
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:1923
r_jws_add_keys
int r_jws_add_keys(jws_t *jws, jwk_t *jwk_privkey, jwk_t *jwk_pubkey)
Definition: jws.c:1125
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:1340
r_jws_get_header_int_value
rhn_int_t r_jws_get_header_int_value(jws_t *jws, const char *key)
Definition: jws.c:1096
r_jws_advanced_compact_parse
int r_jws_advanced_compact_parse(jws_t *jws, const char *jws_str, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1449
r_jws_get_kid
const char * r_jws_get_kid(jws_t *jws)
Definition: jws.c:1036
r_jws_set_properties
int r_jws_set_properties(jws_t *jws,...)
Definition: jws.c:2043
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:1930
r_jws_get_jwks_pubkey
jwks_t * r_jws_get_jwks_pubkey(jws_t *jws)
Definition: jws.c:1373
r_jws_advanced_parsen
int r_jws_advanced_parsen(jws_t *jws, const char *jws_str, size_t jws_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1401
r_jws_parsen_unsecure
int r_jws_parsen_unsecure(jws_t *jws, const char *jws_str, size_t jws_str_len, int x5u_flags)
Definition: jws.c:1393
r_jws_advanced_parse
int r_jws_advanced_parse(jws_t *jws, const char *jws_str, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1397
r_jws_parse_unsecure
int r_jws_parse_unsecure(jws_t *jws, const char *jws_str, int x5u_flags)
Definition: jws.c:1389
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:1074
r_jws_serialize
char * r_jws_serialize(jws_t *jws, jwk_t *jwk_privkey, int x5u_flags)
Definition: jws.c:1870
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:1385
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:1424
r_jws_quick_parsen
jws_t * r_jws_quick_parsen(const char *jws_str, size_t jws_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1761
r_jws_advanced_parsen_json_str
int r_jws_advanced_parsen_json_str(jws_t *jws, const char *jws_json_str, size_t jws_json_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1566
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:1547
r_jws_parse_json_t
int r_jws_parse_json_t(jws_t *jws, json_t *jws_json, int x5u_flags)
Definition: jws.c:1543
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:1184
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:1262
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:1301
r_jws_copy
jws_t * r_jws_copy(jws_t *jws)
Definition: jws.c:902
r_jws_serialize_unsecure
char * r_jws_serialize_unsecure(jws_t *jws, jwk_t *jwk_privkey, int x5u_flags)
Definition: jws.c:1878
r_jws_compact_parse_unsecure
int r_jws_compact_parse_unsecure(jws_t *jws, const char *jws_str, int x5u_flags)
Definition: jws.c:1445
r_jws_add_jwks
int r_jws_add_jwks(jws_t *jws, jwks_t *jwks_privkey, jwks_t *jwks_pubkey)
Definition: jws.c:1151
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:1103
r_jws_set_payload
int r_jws_set_payload(jws_t *jws, const unsigned char *payload, size_t payload_len)
Definition: jws.c:930
r_jws_advanced_compact_parsen
int r_jws_advanced_compact_parsen(jws_t *jws, const char *jws_str, size_t jws_str_len, uint32_t parse_flags, int x5u_flags)
Definition: jws.c:1453
r_jws_get_alg
jwa_alg r_jws_get_alg(jws_t *jws)
Definition: jws.c:1028
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:2033
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:1558
r_jws_compact_parse
int r_jws_compact_parse(jws_t *jws, const char *jws_str, int x5u_flags)
Definition: jws.c:1437
r_jws_get_full_header_str
char * r_jws_get_full_header_str(jws_t *jws)
Definition: jws.c:1117
r_jws_parse
int r_jws_parse(jws_t *jws, const char *jws_str, int x5u_flags)
Definition: jws.c:1381
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:1223
r_jws_get_header_str_value
const char * r_jws_get_header_str_value(jws_t *jws, const char *key)
Definition: jws.c:1089
r_jws_set_alg
int r_jws_set_alg(jws_t *jws, jwa_alg alg)
Definition: jws.c:965
r_jws_get_payload
const unsigned char * r_jws_get_payload(jws_t *jws, size_t *payload_len)
Definition: jws.c:955
r_jws_set_header_int_value
int r_jws_set_header_int_value(jws_t *jws, const char *key, rhn_int_t i_value)
Definition: jws.c:1060
r_jwt_set_sign_alg
int r_jwt_set_sign_alg(jwt_t *jwt, jwa_alg alg)
Definition: jwt.c:814
r_jwt_token_typen
int r_jwt_token_typen(const char *token, size_t token_len)
Definition: jwt.c:2273
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:773
r_jwt_set_claims
int r_jwt_set_claims(jwt_t *jwt,...)
Definition: jwt.c:1875
r_jwt_advanced_parse
int r_jwt_advanced_parse(jwt_t *jwt, const char *token, uint32_t parse_flags, int x5u_flags)
Definition: jwt.c:1202
r_jwt_get_claim_str_value
const char * r_jwt_get_claim_str_value(jwt_t *jwt, const char *key)
Definition: jwt.c:220
r_jwt_get_full_claims_json_t
json_t * r_jwt_get_full_claims_json_t(jwt_t *jwt)
Definition: jwt.c:241
r_jwt_get_enc_iv
const unsigned char * r_jwt_get_enc_iv(jwt_t *jwt, size_t *iv_len)
Definition: jwt.c:952
r_jwt_decrypt_nested
int r_jwt_decrypt_nested(jwt_t *jwt, jwk_t *decrypt_key, int decrypt_key_x5u_flags)
Definition: jwt.c:1564
r_jwt_serialize_encrypted
char * r_jwt_serialize_encrypted(jwt_t *jwt, jwk_t *pubkey, int x5u_flags)
Definition: jwt.c:1055
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:152
r_jwt_get_sign_jwks_pubkey
jwks_t * r_jwt_get_sign_jwks_pubkey(jwt_t *jwt)
Definition: jwt.c:550
r_jwt_verify_signature
int r_jwt_verify_signature(jwt_t *jwt, jwk_t *pubkey, int x5u_flags)
Definition: jwt.c:1341
r_jwt_serialize_signed_unsecure
char * r_jwt_serialize_signed_unsecure(jwt_t *jwt, jwk_t *privkey, int x5u_flags)
Definition: jwt.c:1014
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:400
r_jwt_get_full_claims_str
char * r_jwt_get_full_claims_str(jwt_t *jwt)
Definition: jwt.c:248
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:439
r_jwt_get_full_header_json_t
json_t * r_jwt_get_full_header_json_t(jwt_t *jwt)
Definition: jwt.c:181
r_jwt_get_sig_kid
const char * r_jwt_get_sig_kid(jwt_t *jwt)
Definition: jwt.c:1002
r_jwt_get_enc_alg
jwa_alg r_jwt_get_enc_alg(jwt_t *jwt)
Definition: jwt.c:846
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:927
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:1105
r_jwt_get_enc_jwks_privkey
jwks_t * r_jwt_get_enc_jwks_privkey(jwt_t *jwt)
Definition: jwt.c:798
r_jwt_parse_unsecure
int r_jwt_parse_unsecure(jwt_t *jwt, const char *token, int x5u_flags)
Definition: jwt.c:1198
r_jwt_get_claim_int_value
rhn_int_t r_jwt_get_claim_int_value(jwt_t *jwt, const char *key)
Definition: jwt.c:227
r_jwt_get_sign_jwks_privkey
jwks_t * r_jwt_get_sign_jwks_privkey(jwt_t *jwt)
Definition: jwt.c:542
r_jwt_get_enc
jwa_enc r_jwt_get_enc(jwt_t *jwt)
Definition: jwt.c:990
r_jwt_get_header_str_value
const char * r_jwt_get_header_str_value(jwt_t *jwt, const char *key)
Definition: jwt.c:160
r_jwt_copy
jwt_t * r_jwt_copy(jwt_t *jwt)
Definition: jwt.c:111
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:891
r_jwt_set_enc_alg
int r_jwt_set_enc_alg(jwt_t *jwt, jwa_alg alg)
Definition: jwt.c:834
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:2000
r_jwt_quick_parsen
jwt_t * r_jwt_quick_parsen(const char *token, size_t token_len, uint32_t parse_flags, int x5u_flags)
Definition: jwt.c:1316
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:234
r_jwt_decrypt
int r_jwt_decrypt(jwt_t *jwt, jwk_t *privkey, int x5u_flags)
Definition: jwt.c:1366
r_jwt_token_type
int r_jwt_token_type(const char *token)
Definition: jwt.c:2269
r_jwt_quick_parse
jwt_t * r_jwt_quick_parse(const char *token, uint32_t parse_flags, int x5u_flags)
Definition: jwt.c:1312
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:267
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:196
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:866
r_jwt_parsen
int r_jwt_parsen(jwt_t *jwt, const char *token, size_t token_len, int x5u_flags)
Definition: jwt.c:1190
r_jwt_set_claim_int_value
int r_jwt_set_claim_int_value(jwt_t *jwt, const char *key, rhn_int_t i_value)
Definition: jwt.c:204
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:695
r_jwt_get_sign_alg
jwa_alg r_jwt_get_sign_alg(jwt_t *jwt)
Definition: jwt.c:826
r_jwt_advanced_parsen
int r_jwt_advanced_parsen(jwt_t *jwt, const char *token, size_t token_len, uint32_t parse_flags, int x5u_flags)
Definition: jwt.c:1206
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:1420
r_jwt_get_enc_jwks_pubkey
jwks_t * r_jwt_get_enc_jwks_pubkey(jwt_t *jwt)
Definition: jwt.c:806
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:212
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:1661
r_jwt_set_properties
int r_jwt_set_properties(jwt_t *jwt,...)
Definition: jwt.c:2054
r_jwt_get_header_int_value
rhn_int_t r_jwt_get_header_int_value(jwt_t *jwt, const char *key)
Definition: jwt.c:167
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:584
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:478
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:617
r_jwt_validate_claims
int r_jwt_validate_claims(jwt_t *jwt,...)
Definition: jwt.c:1693
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:517
r_jwt_parsen_unsecure
int r_jwt_parsen_unsecure(jwt_t *jwt, const char *token, size_t token_len, int x5u_flags)
Definition: jwt.c:1194
r_jwt_get_full_header_str
char * r_jwt_get_full_header_str(jwt_t *jwt)
Definition: jwt.c:188
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:136
r_jwt_parse
int r_jwt_parse(jwt_t *jwt, const char *token, int x5u_flags)
Definition: jwt.c:1186
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:256
r_jwt_add_sign_keys
int r_jwt_add_sign_keys(jwt_t *jwt, jwk_t *privkey, jwk_t *pubkey)
Definition: jwt.c:302
r_jwt_append_claims_json_t
int r_jwt_append_claims_json_t(jwt_t *jwt, json_t *j_claim)
Definition: jwt.c:284
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:361
r_jwt_set_enc
int r_jwt_set_enc(jwt_t *jwt, jwa_enc enc)
Definition: jwt.c:854
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:328
r_jwt_add_enc_keys
int r_jwt_add_enc_keys(jwt_t *jwt, jwk_t *privkey, jwk_t *pubkey)
Definition: jwt.c:558
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:656
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:2044
r_jwt_get_enc_kid
const char * r_jwt_get_enc_kid(jwt_t *jwt)
Definition: jwt.c:998
r_jwt_set_header_int_value
int r_jwt_set_header_int_value(jwt_t *jwt, const char *key, rhn_int_t i_value)
Definition: jwt.c:144
r_jwt_generate_iv
int r_jwt_generate_iv(jwt_t *jwt)
r_jwt_serialize_signed
char * r_jwt_serialize_signed(jwt_t *jwt, jwk_t *privkey, int x5u_flags)
Definition: jwt.c:1006
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:174
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:734
r_jwt_generate_enc_cypher_key
int r_jwt_generate_enc_cypher_key(jwt_t *jwt)
Definition: jwt.c:901
r_jwt_get_type
int r_jwt_get_type(jwt_t *jwt)
Definition: jwt.c:1333
jwa_enc
jwa_enc
Definition: rhonabwy.h:169
rhn_opt
rhn_opt
Definition: rhonabwy.h:179
rhn_int_t
json_int_t rhn_int_t
Definition: rhonabwy.h:113
rhn_import
rhn_import
Definition: rhonabwy.h:228
rhn_claim_opt
rhn_claim_opt
Definition: rhonabwy.h:153
jwa_alg
jwa_alg
Definition: rhonabwy.h:117
jwk_t
json_t jwk_t
Definition: rhonabwy.h:111
jwks_t
json_t jwks_t
Definition: rhonabwy.h:112
R_JWA_ENC_UNKNOWN
@ R_JWA_ENC_UNKNOWN
Definition: rhonabwy.h:170
R_JWA_ENC_A192GCM
@ R_JWA_ENC_A192GCM
Definition: rhonabwy.h:175
R_JWA_ENC_A128GCM
@ R_JWA_ENC_A128GCM
Definition: rhonabwy.h:174
R_JWA_ENC_A128CBC
@ R_JWA_ENC_A128CBC
Definition: rhonabwy.h:171
R_JWA_ENC_A256GCM
@ R_JWA_ENC_A256GCM
Definition: rhonabwy.h:176
R_JWA_ENC_A192CBC
@ R_JWA_ENC_A192CBC
Definition: rhonabwy.h:172
R_JWA_ENC_A256CBC
@ R_JWA_ENC_A256CBC
Definition: rhonabwy.h:173
RHN_OPT_VERIFY_KEY_JWKS
@ 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:209
RHN_OPT_SIG_ALG
@ RHN_OPT_SIG_ALG
Signature algorithm, following parameter must be a jwa_alg value.
Definition: rhonabwy.h:198
RHN_OPT_HEADER_JSON_T_VALUE
@ RHN_OPT_HEADER_JSON_T_VALUE
Header JSON value, following parameters must be const char * name, json_t * j_value.
Definition: rhonabwy.h:184
RHN_OPT_HEADER_INT_VALUE
@ RHN_OPT_HEADER_INT_VALUE
Header Integer value, following parameters must be const char * name, int i_value.
Definition: rhonabwy.h:181
RHN_OPT_DECRYPT_KEY_JWK
@ 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:220
RHN_OPT_SIGN_KEY_JSON_T
@ 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:205
RHN_OPT_ENCRYPT_KEY_JSON_T
@ 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:217
RHN_OPT_HEADER_FULL_JSON_STR
@ 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:186
RHN_OPT_DECRYPT_KEY_JWKS
@ 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:221
RHN_OPT_ENCRYPT_KEY_JSON_STR
@ 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:218
RHN_OPT_VERIFY_KEY_JWK
@ 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:208
RHN_OPT_DECRYPT_KEY_JSON_STR
@ 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:224
RHN_OPT_ENCRYPT_KEY_GNUTLS
@ 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:216
RHN_OPT_VERIFY_KEY_GNUTLS
@ 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:210
RHN_OPT_SIGN_KEY_GNUTLS
@ 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:204
RHN_OPT_HEADER_STR_VALUE
@ RHN_OPT_HEADER_STR_VALUE
Header String value, following parameters must be const char * name, const char * str_value.
Definition: rhonabwy.h:183
RHN_OPT_ENCRYPT_KEY_PEM_DER
@ 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:219
RHN_OPT_UN_HEADER_FULL_JSON_STR
@ 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:188
RHN_OPT_AAD
@ RHN_OPT_AAD
Additional Authenticated Data (AAD) for data encryption, following parameters must be const unsigned ...
Definition: rhonabwy.h:201
RHN_OPT_HEADER_FULL_JSON_T
@ RHN_OPT_HEADER_FULL_JSON_T
JSON value to set the entire header, following parameter must be json_t * j_value.
Definition: rhonabwy.h:185
RHN_OPT_CLAIM_INT_VALUE
@ RHN_OPT_CLAIM_INT_VALUE
Claims Integer value, following parameters must be const char * name, int i_value.
Definition: rhonabwy.h:190
RHN_OPT_VERIFY_KEY_JSON_STR
@ 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:212
RHN_OPT_CIPHER_KEY
@ RHN_OPT_CIPHER_KEY
Cipher key to encrypt data, following parameters must be const unsigned char * value,...
Definition: rhonabwy.h:199
RHN_OPT_SIGN_KEY_JWK
@ 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:202
RHN_OPT_VERIFY_KEY_PEM_DER
@ 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:213
RHN_OPT_CLAIM_FULL_JSON_STR
@ 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:195
RHN_OPT_CLAIM_STR_VALUE
@ RHN_OPT_CLAIM_STR_VALUE
Claims String value, following parameters must be const char * name, const char * str_value.
Definition: rhonabwy.h:192
RHN_OPT_IV
@ RHN_OPT_IV
Initial Value (IV) for data encryption, following parameters must be const unsigned char * value,...
Definition: rhonabwy.h:200
RHN_OPT_SIGN_KEY_PEM_DER
@ 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:207
RHN_OPT_HEADER_RHN_INT_VALUE
@ RHN_OPT_HEADER_RHN_INT_VALUE
Header rhn_int_t value, following parameters must be const char * name, rhn_int_t i_value.
Definition: rhonabwy.h:182
RHN_OPT_DECRYPT_KEY_JSON_T
@ 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:223
RHN_OPT_CLAIM_JSON_T_VALUE
@ RHN_OPT_CLAIM_JSON_T_VALUE
Claims JSON value, following parameters must be const char * name, json_t * j_value.
Definition: rhonabwy.h:193
RHN_OPT_DECRYPT_KEY_PEM_DER
@ 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:225
RHN_OPT_SIGN_KEY_JWKS
@ 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:203
RHN_OPT_SIGN_KEY_JSON_STR
@ 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:206
RHN_OPT_UN_HEADER_FULL_JSON_T
@ 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:187
RHN_OPT_CLAIM_FULL_JSON_T
@ RHN_OPT_CLAIM_FULL_JSON_T
JSON value to set the entire claims, following parameter must be json_t * j_value.
Definition: rhonabwy.h:194
RHN_OPT_ENC_ALG
@ RHN_OPT_ENC_ALG
Key management algorithm, following parameter must be a jwa_alg value.
Definition: rhonabwy.h:196
RHN_OPT_CLAIM_RHN_INT_VALUE
@ RHN_OPT_CLAIM_RHN_INT_VALUE
Claims Integer value, following parameters must be const char * name, int i_value.
Definition: rhonabwy.h:191
RHN_OPT_VERIFY_KEY_JSON_T
@ 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:211
RHN_OPT_DECRYPT_KEY_GNUTLS
@ 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:222
RHN_OPT_ENC
@ RHN_OPT_ENC
Encryption algorithm, following parameter must be a jwa_enc value.
Definition: rhonabwy.h:197
RHN_OPT_NONE
@ RHN_OPT_NONE
End option list, mandatory at the end of the option list.
Definition: rhonabwy.h:180
RHN_OPT_PAYLOAD
@ RHN_OPT_PAYLOAD
JSON value to set the entire payload, following parameters must be const unsigned char * value,...
Definition: rhonabwy.h:189
RHN_OPT_ENCRYPT_KEY_JWKS
@ 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:215
RHN_OPT_ENCRYPT_KEY_JWK
@ 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:214
R_IMPORT_PEM
@ R_IMPORT_PEM
Import from a X509 key in PEM format, following parameters must be type (R_X509_TYPE_PUBKEY,...
Definition: rhonabwy.h:232
R_IMPORT_PASSWORD
@ R_IMPORT_PASSWORD
Import from a password, following parameter must be a const char * value.
Definition: rhonabwy.h:239
R_IMPORT_SYMKEY
@ R_IMPORT_SYMKEY
Import from a symmetric key, following parameters must be const unsigned char *, size_t.
Definition: rhonabwy.h:238
R_IMPORT_JSON_STR
@ R_IMPORT_JSON_STR
Import from a stringified JSON, following parameter must be a const char * value.
Definition: rhonabwy.h:230
R_IMPORT_X5U
@ R_IMPORT_X5U
Import from an URL pointing to a x5u, following parameters must be x5u_flags (R_FLAG_IGNORE_SERVER_CE...
Definition: rhonabwy.h:237
R_IMPORT_JSON_T
@ R_IMPORT_JSON_T
Import from a json_t *, following parameter must be a const json_t * value.
Definition: rhonabwy.h:231
R_IMPORT_DER
@ R_IMPORT_DER
Import from a X509 key in DER format, following parameters must be type (R_X509_TYPE_PUBKEY,...
Definition: rhonabwy.h:233
R_IMPORT_JKU
@ R_IMPORT_JKU
Import from an URL pointing to a jku, available for r_jwks_quick_import only, following parameters mu...
Definition: rhonabwy.h:240
R_IMPORT_NONE
@ R_IMPORT_NONE
End option list, mandatory at the end of the option list when using r_jwks_quick_import.
Definition: rhonabwy.h:229
R_IMPORT_G_PUBKEY
@ R_IMPORT_G_PUBKEY
Import from a gnutls_pubkey_t, following parameters must be gnutls_pubkey_t.
Definition: rhonabwy.h:235
R_IMPORT_G_PRIVKEY
@ R_IMPORT_G_PRIVKEY
Import from a gnutls_privkey_t, following parameters must be gnutls_privkey_t.
Definition: rhonabwy.h:234
R_IMPORT_G_CERT
@ R_IMPORT_G_CERT
Import from a gnutls_x509_crt_t, following parameters must be gnutls_x509_crt_t.
Definition: rhonabwy.h:236
R_JWT_CLAIM_ISS
@ R_JWT_CLAIM_ISS
Definition: rhonabwy.h:155
R_JWT_CLAIM_SUB
@ R_JWT_CLAIM_SUB
Definition: rhonabwy.h:156
R_JWT_CLAIM_NBF
@ R_JWT_CLAIM_NBF
Definition: rhonabwy.h:159
R_JWT_CLAIM_JSN
@ R_JWT_CLAIM_JSN
Definition: rhonabwy.h:164
R_JWT_CLAIM_IAT
@ R_JWT_CLAIM_IAT
Definition: rhonabwy.h:160
R_JWT_CLAIM_TYP
@ R_JWT_CLAIM_TYP
Definition: rhonabwy.h:165
R_JWT_CLAIM_STR
@ R_JWT_CLAIM_STR
Definition: rhonabwy.h:162
R_JWT_CLAIM_INT
@ R_JWT_CLAIM_INT
Definition: rhonabwy.h:163
R_JWT_CLAIM_EXP
@ R_JWT_CLAIM_EXP
Definition: rhonabwy.h:158
R_JWT_CLAIM_NOP
@ R_JWT_CLAIM_NOP
Definition: rhonabwy.h:154
R_JWT_CLAIM_AUD
@ R_JWT_CLAIM_AUD
Definition: rhonabwy.h:157
R_JWT_CLAIM_CTY
@ R_JWT_CLAIM_CTY
Definition: rhonabwy.h:166
R_JWT_CLAIM_JTI
@ R_JWT_CLAIM_JTI
Definition: rhonabwy.h:161
R_JWA_ALG_A256KW
@ R_JWA_ALG_A256KW
Definition: rhonabwy.h:138
R_JWA_ALG_A192GCMKW
@ R_JWA_ALG_A192GCMKW
Definition: rhonabwy.h:145
R_JWA_ALG_ES384
@ R_JWA_ALG_ES384
Definition: rhonabwy.h:127
R_JWA_ALG_A192KW
@ R_JWA_ALG_A192KW
Definition: rhonabwy.h:137
R_JWA_ALG_PBES2_H384
@ R_JWA_ALG_PBES2_H384
Definition: rhonabwy.h:148
R_JWA_ALG_HS384
@ R_JWA_ALG_HS384
Definition: rhonabwy.h:121
R_JWA_ALG_EDDSA
@ R_JWA_ALG_EDDSA
Definition: rhonabwy.h:129
R_JWA_ALG_DIR
@ R_JWA_ALG_DIR
Definition: rhonabwy.h:139
R_JWA_ALG_A128KW
@ R_JWA_ALG_A128KW
Definition: rhonabwy.h:136
R_JWA_ALG_HS512
@ R_JWA_ALG_HS512
Definition: rhonabwy.h:122
R_JWA_ALG_PS512
@ R_JWA_ALG_PS512
Definition: rhonabwy.h:132
R_JWA_ALG_PS384
@ R_JWA_ALG_PS384
Definition: rhonabwy.h:131
R_JWA_ALG_PBES2_H512
@ R_JWA_ALG_PBES2_H512
Definition: rhonabwy.h:149
R_JWA_ALG_NONE
@ R_JWA_ALG_NONE
Definition: rhonabwy.h:119
R_JWA_ALG_RSA1_5
@ R_JWA_ALG_RSA1_5
Definition: rhonabwy.h:133
R_JWA_ALG_ES256
@ R_JWA_ALG_ES256
Definition: rhonabwy.h:126
R_JWA_ALG_RSA_OAEP_256
@ R_JWA_ALG_RSA_OAEP_256
Definition: rhonabwy.h:135
R_JWA_ALG_A128GCMKW
@ R_JWA_ALG_A128GCMKW
Definition: rhonabwy.h:144
R_JWA_ALG_ECDH_ES_A192KW
@ R_JWA_ALG_ECDH_ES_A192KW
Definition: rhonabwy.h:142
R_JWA_ALG_ES512
@ R_JWA_ALG_ES512
Definition: rhonabwy.h:128
R_JWA_ALG_RS512
@ R_JWA_ALG_RS512
Definition: rhonabwy.h:125
R_JWA_ALG_RS256
@ R_JWA_ALG_RS256
Definition: rhonabwy.h:123
R_JWA_ALG_A256GCMKW
@ R_JWA_ALG_A256GCMKW
Definition: rhonabwy.h:146
R_JWA_ALG_ES256K
@ R_JWA_ALG_ES256K
Definition: rhonabwy.h:150
R_JWA_ALG_RS384
@ R_JWA_ALG_RS384
Definition: rhonabwy.h:124
R_JWA_ALG_UNKNOWN
@ R_JWA_ALG_UNKNOWN
Definition: rhonabwy.h:118
R_JWA_ALG_ECDH_ES_A128KW
@ R_JWA_ALG_ECDH_ES_A128KW
Definition: rhonabwy.h:141
R_JWA_ALG_ECDH_ES
@ R_JWA_ALG_ECDH_ES
Definition: rhonabwy.h:140
R_JWA_ALG_HS256
@ R_JWA_ALG_HS256
Definition: rhonabwy.h:120
R_JWA_ALG_PS256
@ R_JWA_ALG_PS256
Definition: rhonabwy.h:130
R_JWA_ALG_PBES2_H256
@ R_JWA_ALG_PBES2_H256
Definition: rhonabwy.h:147
R_JWA_ALG_RSA_OAEP
@ R_JWA_ALG_RSA_OAEP
Definition: rhonabwy.h:134
R_JWA_ALG_ECDH_ES_A256KW
@ R_JWA_ALG_ECDH_ES_A256KW
Definition: rhonabwy.h:143
_r_json_get_json_t_value
json_t * _r_json_get_json_t_value(json_t *j_json, const char *key)
Definition: misc.c:264
_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:382
_r_json_get_int_value
rhn_int_t _r_json_get_int_value(json_t *j_json, const char *key)
Definition: misc.c:257
_r_json_get_str_value
const char * _r_json_get_str_value(json_t *j_json, const char *key)
Definition: misc.c:250
_r_get_key_size
size_t _r_get_key_size(jwa_enc enc)
Definition: misc.c:280
_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:339
_r_json_get_full_json_t
json_t * _r_json_get_full_json_t(json_t *j_json)
Definition: misc.c:273
_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:229
_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:192
_r_get_alg_from_enc
gnutls_cipher_algorithm_t _r_get_alg_from_enc(jwa_enc enc)
Definition: misc.c:306
_r_json_set_int_value
int _r_json_set_int_value(json_t *j_json, const char *key, rhn_int_t i_value)
Definition: misc.c:213
jwe_t
Definition: rhonabwy.h:257
jwe_t::payload_len
size_t payload_len
Definition: rhonabwy.h:277
jwe_t::j_header
json_t * j_header
Definition: rhonabwy.h:264
jwe_t::iv
unsigned char * iv
Definition: rhonabwy.h:274
jwe_t::enc
jwa_enc enc
Definition: rhonabwy.h:267
jwe_t::j_json_serialization
json_t * j_json_serialization
Definition: rhonabwy.h:278
jwe_t::jwks_privkey
jwks_t * jwks_privkey
Definition: rhonabwy.h:268
jwe_t::iv_b64url
unsigned char * iv_b64url
Definition: rhonabwy.h:261
jwe_t::key_len
size_t key_len
Definition: rhonabwy.h:273
jwe_t::auth_tag_b64url
unsigned char * auth_tag_b64url
Definition: rhonabwy.h:263
jwe_t::aad_b64url
unsigned char * aad_b64url
Definition: rhonabwy.h:260
jwe_t::aad_len
size_t aad_len
Definition: rhonabwy.h:271
jwe_t::header_b64url
unsigned char * header_b64url
Definition: rhonabwy.h:258
jwe_t::ciphertext_b64url
unsigned char * ciphertext_b64url
Definition: rhonabwy.h:262
jwe_t::alg
jwa_alg alg
Definition: rhonabwy.h:266
jwe_t::key
unsigned char * key
Definition: rhonabwy.h:272
jwe_t::aad
unsigned char * aad
Definition: rhonabwy.h:270
jwe_t::jwks_pubkey
jwks_t * jwks_pubkey
Definition: rhonabwy.h:269
jwe_t::payload
unsigned char * payload
Definition: rhonabwy.h:276
jwe_t::iv_len
size_t iv_len
Definition: rhonabwy.h:275
jwe_t::encrypted_key_b64url
unsigned char * encrypted_key_b64url
Definition: rhonabwy.h:259
jwe_t::j_unprotected_header
json_t * j_unprotected_header
Definition: rhonabwy.h:265
jwe_t::token_mode
int token_mode
Definition: rhonabwy.h:279
jws_t
Definition: rhonabwy.h:243
jws_t::token_mode
int token_mode
Definition: rhonabwy.h:254
jws_t::payload_len
size_t payload_len
Definition: rhonabwy.h:252
jws_t::jwks_pubkey
jwks_t * jwks_pubkey
Definition: rhonabwy.h:250
jws_t::jwks_privkey
jwks_t * jwks_privkey
Definition: rhonabwy.h:249
jws_t::payload
unsigned char * payload
Definition: rhonabwy.h:251
jws_t::j_json_serialization
json_t * j_json_serialization
Definition: rhonabwy.h:253
jws_t::payload_b64url
unsigned char * payload_b64url
Definition: rhonabwy.h:245
jws_t::j_header
json_t * j_header
Definition: rhonabwy.h:247
jws_t::signature_b64url
unsigned char * signature_b64url
Definition: rhonabwy.h:246
jws_t::alg
jwa_alg alg
Definition: rhonabwy.h:248
jws_t::header_b64url
unsigned char * header_b64url
Definition: rhonabwy.h:244
jwt_t
Definition: rhonabwy.h:282
jwt_t::enc_alg
jwa_alg enc_alg
Definition: rhonabwy.h:290
jwt_t::jwks_privkey_sign
jwks_t * jwks_privkey_sign
Definition: rhonabwy.h:296
jwt_t::j_claims
json_t * j_claims
Definition: rhonabwy.h:286
jwt_t::sign_alg
jwa_alg sign_alg
Definition: rhonabwy.h:289
jwt_t::enc
jwa_enc enc
Definition: rhonabwy.h:291
jwt_t::key_len
size_t key_len
Definition: rhonabwy.h:293
jwt_t::jwks_pubkey_enc
jwks_t * jwks_pubkey_enc
Definition: rhonabwy.h:299
jwt_t::type
int type
Definition: rhonabwy.h:283
jwt_t::iv
unsigned char * iv
Definition: rhonabwy.h:294
jwt_t::jws
jws_t * jws
Definition: rhonabwy.h:287
jwt_t::jwks_privkey_enc
jwks_t * jwks_privkey_enc
Definition: rhonabwy.h:298
jwt_t::jwe
jwe_t * jwe
Definition: rhonabwy.h:288
jwt_t::key
unsigned char * key
Definition: rhonabwy.h:292
jwt_t::j_header
json_t * j_header
Definition: rhonabwy.h:285
jwt_t::iv_len
size_t iv_len
Definition: rhonabwy.h:295
jwt_t::parse_flags
uint32_t parse_flags
Definition: rhonabwy.h:284
jwt_t::jwks_pubkey_sign
jwks_t * jwks_pubkey_sign
Definition: rhonabwy.h:297