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