Lines Matching refs:jose
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->typ)); in lws_jws_jose_cb()
288 &args->jose->enc_alg)) { in lws_jws_jose_cb()
354 if (!args->jose->e[ctx->path_match - 1].buf) { in lws_jws_jose_cb()
355 args->jose->e[ctx->path_match - 1].buf = (uint8_t *)args->temp; in lws_jws_jose_cb()
356 args->jose->e[ctx->path_match - 1].len = 0; in lws_jws_jose_cb()
362 args->jose->e[ctx->path_match - 1].len += ctx->npos; in lws_jws_jose_cb()
366 (const char *)args->jose->e[ctx->path_match - 1].buf, in lws_jws_jose_cb()
367 (int)args->jose->e[ctx->path_match - 1].len, in lws_jws_jose_cb()
368 (char *)args->jose->e[ctx->path_match - 1].buf, in lws_jws_jose_cb()
369 (int)args->jose->e[ctx->path_match - 1].len + 1); in lws_jws_jose_cb()
375 args->temp -= (int)args->jose->e[ctx->path_match - 1].len - n - 1; in lws_jws_jose_cb()
377 (int)args->jose->e[ctx->path_match - 1].len - n - 1; in lws_jws_jose_cb()
379 args->jose->e[ctx->path_match - 1].len = (uint32_t)n; in lws_jws_jose_cb()
386 lws_jose_init(struct lws_jose *jose) in lws_jose_init() argument
388 memset(jose, 0, sizeof(*jose)); in lws_jose_init()
399 lws_jose_destroy(struct lws_jose *jose) in lws_jose_destroy() argument
403 for (n = 0; n < (int)LWS_ARRAY_SIZE(jose->recipient); n++) in lws_jose_destroy()
404 lws_jose_recip_destroy(&jose->recipient[n]); in lws_jose_destroy()
408 lws_jose_parse(struct lws_jose *jose, const uint8_t *buf, int n, in lws_jose_parse() argument
418 &jose->recipient[jose->recipients].jwk_ephemeral, in lws_jose_parse()
427 args.jose = jose; in lws_jose_parse()
430 jose->recipients = 0; in lws_jose_parse()
442 if (!args.recipients_array && jose->recipient[0].unprot[LJJHI_ALG].buf) in lws_jose_parse()
444 jose->recipients++; in lws_jose_parse()
450 lws_jws_parse_jose(struct lws_jose *jose, in lws_jws_parse_jose() argument
453 return lws_jose_parse(jose, (const uint8_t *)buf, len, in lws_jws_parse_jose()
458 lws_jwe_parse_jose(struct lws_jose *jose, in lws_jwe_parse_jose() argument
461 return lws_jose_parse(jose, in lws_jwe_parse_jose()
466 lws_jose_render(struct lws_jose *jose, struct lws_jwk *aux_jwk, in lws_jose_render() argument
474 if (!jose->alg || !jose->alg->alg) in lws_jose_render()
492 if (jose->e[n].buf) { in lws_jose_render()
495 jws_jose[n], jose->e[n].buf); in lws_jose_render()
507 if (jose->e[n].buf) { in lws_jose_render()
513 jose->e[n].buf, (int)jose->e[n].len, in lws_jose_render()
526 if (jose->e[n].buf) { in lws_jose_render()
532 jose->e[n].buf, (int)jose->e[n].len, in lws_jose_render()
544 jwk = n == LJJHI_EPK ? &jose->recipient[0].jwk_ephemeral : aux_jwk; in lws_jose_render()
564 if (!jose->e[n].buf) in lws_jose_render()
573 while ((unsigned int)m < jose->e[n].len && (end - out) > 1) { in lws_jose_render()
574 if (jose->e[n].buf[m] == ' ') { in lws_jose_render()
590 *out++ = (char)jose->e[n].buf[m]; in lws_jose_render()