Home
last modified time | relevance | path

Searched refs:jose (Results 1 - 20 of 20) sorted by relevance

/third_party/libwebsockets/lib/jose/jws/
H A Djose.c25 * to specify its JOSE JSON object. So it lives in ./lib/jose/jws/jose.c.
29 #include "jose/private-lib-jose.h"
66 struct lws_jose *jose; member
192 args->jose->recipients++; in lws_jws_jose_cb()
212 &args->jose->alg)) { in lws_jws_jose_cb()
221 &args->jose->alg)) { in lws_jws_jose_cb()
231 lws_strnncpy(args->jose->typ, ctx->buf, ctx->npos, in lws_jws_jose_cb()
232 sizeof(args->jose in lws_jws_jose_cb()
386 lws_jose_init(struct lws_jose *jose) lws_jose_init() argument
399 lws_jose_destroy(struct lws_jose *jose) lws_jose_destroy() argument
408 lws_jose_parse(struct lws_jose *jose, const uint8_t *buf, int n, char *temp, int *temp_len, int is_jwe) lws_jose_parse() argument
450 lws_jws_parse_jose(struct lws_jose *jose, const char *buf, int len, char *temp, int *temp_len) lws_jws_parse_jose() argument
458 lws_jwe_parse_jose(struct lws_jose *jose, const char *buf, int len, char *temp, int *temp_len) lws_jwe_parse_jose() argument
466 lws_jose_render(struct lws_jose *jose, struct lws_jwk *aux_jwk, char *out, size_t out_len) lws_jose_render() argument
[all...]
H A Djws.c26 #include "private-lib-jose-jws.h"
177 /* no need to scrub first jose header element (it can be canned then) */ in lws_jws_map_bzero()
456 struct lws_jose jose; in lws_jws_sig_confirm() local
458 lws_jose_init(&jose); in lws_jws_sig_confirm()
464 if (lws_jws_parse_jose(&jose, map->buf[LJWS_JOSE], (int)map->len[LJWS_JOSE], in lws_jws_sig_confirm()
465 temp, &temp_len) < 0 || !jose.alg) { in lws_jws_sig_confirm()
470 if (!strcmp(jose.alg->alg, "none")) { in lws_jws_sig_confirm()
471 /* "none" compact serialization has 2 blocks: jose.payload */ in lws_jws_sig_confirm()
479 /* all other have 3 blocks: jose.payload.sig */ in lws_jws_sig_confirm()
485 switch (jose in lws_jws_sig_confirm()
741 lws_jws_sign_from_b64(struct lws_jose *jose, struct lws_jws *jws, char *b64_sig, size_t sig_len) lws_jws_sign_from_b64() argument
959 struct lws_jose jose; lws_jwt_signed_validate() local
1046 struct lws_jose jose; lws_jwt_vsign_via_info() local
[all...]
/third_party/libwebsockets/lib/jose/jwe/
H A Djwe.c26 #include "private-lib-jose.h"
27 #include "private-lib-jose-jwe.h"
164 lws_jose_init(&jwe->jose); in lws_jwe_init()
175 lws_jose_destroy(&jwe->jose); in lws_jwe_destroy()
217 if (!jwe->jose.enc_alg || !jwe->jose.alg) in lws_jwa_concat_kdf()
238 aid = direct ? jwe->jose.enc_alg->alg : jwe->jose.alg->alg; in lws_jwa_concat_kdf()
271 while (ctr <= (uint32_t)((jwe->jose.enc_alg->keybits_fixed + (hlen - 1)) / hlen)) { in lws_jwa_concat_kdf()
290 be32(jwe->jose in lws_jwa_concat_kdf()
[all...]
H A Djwe-ecdh-es-aeskw.c26 #include "private-lib-jose-jwe.h"
183 * - ECDH-ES[-variant] comes in the jose "alg" and just covers key agreement.
189 * - The public part of the ephemeral key comes out in jose.jwk_ephemeral
205 // kw_hlen = lws_genhash_size(jwe->jose.alg->hash_type), in lws_jwe_encrypt_ecdh()
206 enc_hlen = (int)lws_genhmac_size(jwe->jose.enc_alg->hmac_type), in lws_jwe_encrypt_ecdh()
207 ekbytes = 32; //jwe->jose.alg->keybits_fixed / 8; in lws_jwe_encrypt_ecdh()
209 struct lws_jwk *ephem = &jwe->jose.recipient[jwe->recip].jwk_ephemeral; in lws_jwe_encrypt_ecdh()
220 /* Generate jose.jwk_ephemeral on the peer public key curve */ in lws_jwe_encrypt_ecdh()
260 * derived matches bitcount in jwe->jose.enc_alg->keybits_fixed in lws_jwe_encrypt_ecdh()
267 jwe->jose in lws_jwe_encrypt_ecdh()
[all...]
H A Djwe-rsa-aescbc.c26 #include "private-lib-jose-jwe.h"
49 int n, hlen = (int)lws_genhmac_size(jwe->jose.enc_alg->hmac_type), in lws_jwe_encrypt_rsa_aes_cbc_hs()
101 !strcmp(jwe->jose.alg->alg, "RSA-OAEP") ? in lws_jwe_encrypt_rsa_aes_cbc_hs()
155 !strcmp(jwe->jose.alg->alg, "RSA-OAEP") ? in lws_jwe_auth_and_decrypt_rsa_aes_cbc_hs()
H A Djwe-rsa-aesgcm.c26 #include "private-lib-jose-jwe.h"
34 int ekbytes = jwe->jose.enc_alg->keybits_fixed / 8; in lws_jwe_encrypt_rsa_aes_gcm()
97 !strcmp(jwe->jose.alg->alg, "RSA-OAEP") ? in lws_jwe_encrypt_rsa_aes_gcm()
146 !strcmp(jwe->jose.alg->alg, "RSA-OAEP") ? in lws_jwe_auth_and_decrypt_rsa_aes_gcm()
/third_party/libwebsockets/minimal-examples/api-tests/api-test-jose/
H A Djws.c2 * lws-api-test-jose - RFC7515 jws tests
25 /* for none, the compact serialization format is b64u(jose hdr).b64u(payload) */
40 struct lws_jose jose; in test_jws_none() local
44 lws_jose_init(&jose); in test_jws_none()
58 lwsl_err("%s: jose b64 decode wrong\n", __func__); in test_jws_none()
63 if (lws_jws_parse_jose(&jose, map.buf[LJWS_JOSE], in test_jws_none()
66 &temp_len) < 0 || !jose.alg) { in test_jws_none()
72 if (strcmp(jose.alg->alg, "none")) { in test_jws_none()
89 lws_jose_destroy(&jose); in test_jws_none()
122 struct lws_jose jose; in test_jws_HS256() local
279 struct lws_jose jose; test_jws_RS256() local
414 struct lws_jose jose; test_jws_ES256() local
576 struct lws_jose jose; test_jws_ES512() local
[all...]
H A Djwe.c2 * lws-api-test-jose - RFC7516 jwe tests
125 if (lws_gencrypto_jwe_alg_to_definition("RSA-OAEP", &jwe.jose.alg)) { in test_jwe_a1()
129 if (lws_gencrypto_jwe_enc_to_definition("A256GCM", &jwe.jose.enc_alg)) { in test_jwe_a1()
155 n = lws_gencrypto_bits_to_bytes(jwe.jose.enc_alg->keybits_fixed); in test_jwe_a1()
532 n = lws_jwe_parse_jose(&jwe.jose, jwe.jws.map.buf[LJWE_JOSE], in test_jwe_ra_ptext_1024()
662 n = lws_jwe_parse_jose(&jwe.jose, jwe.jws.map.buf[LJWE_JOSE], in test_jwe_r256a192_ptext()
794 n = lws_jwe_parse_jose(&jwe.jose, rsa256a256_jose, in test_jwe_r256a256_ptext()
1396 if (lws_gencrypto_jwe_alg_to_definition("A128KW", &jwe.jose.alg)) in test_jwa_b2()
1399 &jwe.jose.enc_alg)) in test_jwa_b2()
1552 if (lws_gencrypto_jwe_alg_to_definition("A128KW", &jwe.jose in test_jwa_b3()
[all...]
/third_party/libwebsockets/include/libwebsockets/
H A Dlws-jose.h134 * \param jose: the jose header struct to prepare
137 lws_jose_init(struct lws_jose *jose);
142 * \param jose: the jose header struct to destroy
145 lws_jose_destroy(struct lws_jose *jose);
151 * \param jose: pointer to the pointer to the info struct to set on success
153 * Returns 0 if *jose set, else nonzero for failure
157 const struct lws_jose_jwe_alg **jose);
163 * \param jose
[all...]
H A Dlws-jwe.h46 struct lws_jose jose; member
92 * \param jose: jose context
118 * \param jose: the JOSE header information (encryption types, etc)
H A Dlws-jws.h130 * \param in: pointer to b64 jose.payload[.hdr].sig
139 * (jose.payload.hdr.sig) as an aggregated string... it'll make a temp plain
160 * compact layout (jose.payload.hdr.sig) and decoded JWS elements in maps.
176 * \param jose: jose header information
191 * \p b64_sig. If the jose signing type is unknown, 0 is returned. Otherwise
195 lws_jws_sign_from_b64(struct lws_jose *jose, struct lws_jws *jws, char *b64_sig,
362 * \param in: pointer to b64 jose.payload[.hdr].sig
366 * Scans a jose.payload[.hdr].sig b64 string and notes where the blocks start
/third_party/libwebsockets/lib/tls/
H A Dlws-gencrypto-common.c577 const struct lws_jose_jwe_alg **jose) in lws_gencrypto_jws_alg_to_definition()
583 *jose = a; in lws_gencrypto_jws_alg_to_definition()
595 const struct lws_jose_jwe_alg **jose) in lws_gencrypto_jwe_alg_to_definition()
601 *jose = a; in lws_gencrypto_jwe_alg_to_definition()
613 const struct lws_jose_jwe_alg **jose) in lws_gencrypto_jwe_enc_to_definition()
619 *jose = e; in lws_gencrypto_jwe_enc_to_definition()
576 lws_gencrypto_jws_alg_to_definition(const char *alg, const struct lws_jose_jwe_alg **jose) lws_gencrypto_jws_alg_to_definition() argument
594 lws_gencrypto_jwe_alg_to_definition(const char *alg, const struct lws_jose_jwe_alg **jose) lws_gencrypto_jwe_alg_to_definition() argument
612 lws_gencrypto_jwe_enc_to_definition(const char *enc, const struct lws_jose_jwe_alg **jose) lws_gencrypto_jwe_enc_to_definition() argument
/third_party/libwebsockets/lib/jose/jwe/enc/
H A Daeskw.c26 #include "private-lib-jose-jwe.h"
44 int n, m, hlen = (int)lws_genhmac_size(jwe->jose.enc_alg->hmac_type), in lws_jwe_encrypt_aeskw_cbc_hs()
98 jwe->jose.enc_alg->keybits_fixed)); in lws_jwe_encrypt_aeskw_cbc_hs()
152 jwe->jose.enc_alg->keybits_fixed)); in lws_jwe_auth_and_decrypt_aeskw_cbc_hs()
H A Daescbc.c26 #include "private-lib-jose-jwe.h"
32 int n, hlen = (int)lws_genhmac_size(jwe->jose.enc_alg->hmac_type); in lws_jwe_encrypt_cbc_hs()
119 if (lws_genhmac_init(&hmacctx, jwe->jose.enc_alg->hmac_type, in lws_jwe_encrypt_cbc_hs()
165 int n, hlen = (int)lws_genhmac_size(jwe->jose.enc_alg->hmac_type); in lws_jwe_auth_and_decrypt_cbc_hs()
203 if (lws_genhmac_init(&hmacctx, jwe->jose.enc_alg->hmac_type, enc_cek, in lws_jwe_auth_and_decrypt_cbc_hs()
H A Daesgcm.c26 #include "private-lib-jose-jwe.h"
78 el.len = jwe->jose.enc_alg->keybits_fixed / 8; in lws_jwe_encrypt_gcm()
143 el.len = jwe->jose.enc_alg->keybits_fixed / 8; in lws_jwe_auth_and_decrypt_gcm()
/third_party/libwebsockets/minimal-examples/crypto/minimal-crypto-jws/
H A Dmain.c26 struct lws_jose jose; in main() local
49 lws_jose_init(&jose); in main()
56 if (lws_gencrypto_jws_alg_to_definition(p, &jose.alg)) { in main()
134 n = lws_jws_sign_from_b64(&jose, &jws, in main()
/third_party/libwebsockets/minimal-examples/crypto/minimal-crypto-jwe/
H A Dmain.c126 if (lws_gencrypto_jwe_alg_to_definition(p, &jwe.jose.alg)) { in main()
130 if (lws_gencrypto_jwe_enc_to_definition(sp + 1, &jwe.jose.enc_alg)) { in main()
189 n = lws_gencrypto_bits_to_bytes(jwe.jose.enc_alg->keybits_fixed); in main()
256 * Do the crypto according to what we parsed into the jose in main()
/third_party/libwebsockets/lib/jose/
H A Dprivate-lib-jose.h39 lws_jose_render(struct lws_jose *jose, struct lws_jwk *aux_jwk,
/third_party/libwebsockets/plugins/acme-client/
H A Dprotocol_lws_acme_client.c238 if (!jwe->jose.alg || !jwe->jose.alg->alg) in jws_create_packet()
289 n = lws_jws_sign_from_b64(&jwe->jose, &jws, p1, lws_ptr_diff_size_t(end1, p1)); in jws_create_packet()
1051 &jwe.jose.alg)) { in callback_acme_client()
1076 content_type = "application/jose+json"; in callback_acme_client()
/third_party/libwebsockets/include/
H A Dlibwebsockets.h670 #include <libwebsockets/lws-jose.h>

Completed in 14 milliseconds