Lines Matching refs:ctx

115  *     recipients[] LEJPCB_OBJECT_END (ctx->sp = 1)
130 * recipients[] LEJPCB_OBJECT_END (ctx->sp = 1)
159 lws_jws_jose_cb(struct lejp_ctx *ctx, char reason)
161 struct jose_cb_args *args = (struct jose_cb_args *)ctx->user;
171 if (args->is_jwe && !strncmp(ctx->path, "epk.", 4)) {
172 memcpy(args->jwk_jctx.path, ctx->path + 4,
173 sizeof(ctx->path) - 4);
174 memcpy(args->jwk_jctx.buf, ctx->buf, ctx->npos);
175 args->jwk_jctx.npos = ctx->npos;
177 if (!ctx->path_match)
186 // lwsl_notice("%s: %s %d (%d)\n", __func__, ctx->path, reason, ctx->sp);
190 if (args->is_jwe && reason == LEJPCB_OBJECT_END && ctx->sp == 1 &&
191 !strcmp(ctx->path, "recipients[]"))
194 if (!(reason & LEJP_FLAG_CB_IS_VALUE) || !ctx->path_match)
197 //dest = ctx->path_match - 1;
199 switch (ctx->path_match - 1) {
211 lws_gencrypto_jws_alg_to_definition(ctx->buf,
214 ctx->buf);
220 lws_gencrypto_jwe_alg_to_definition(ctx->buf,
223 ctx->buf);
231 lws_strnncpy(args->jose->typ, ctx->buf, ctx->npos,
287 if (lws_gencrypto_jwe_enc_to_definition(ctx->buf,
290 ctx->buf);
349 if (*args->temp_len < ctx->npos) {
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;
359 memcpy(args->temp, ctx->buf, ctx->npos);
360 args->temp += ctx->npos;
361 *args->temp_len -= ctx->npos;
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;