• Home
  • Raw
  • Download

Lines Matching refs:jose

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.e[LJJHI_APU].len, &t), 4) || in lws_jwa_concat_kdf()
291 lws_genhash_update(&hash_ctx, jwe->jose.e[LJJHI_APU].buf, in lws_jwa_concat_kdf()
292 jwe->jose.e[LJJHI_APU].len) || in lws_jwa_concat_kdf()
294 be32(jwe->jose.e[LJJHI_APV].len, &t), 4) || in lws_jwa_concat_kdf()
295 lws_genhash_update(&hash_ctx, jwe->jose.e[LJJHI_APV].buf, in lws_jwa_concat_kdf()
296 jwe->jose.e[LJJHI_APV].len) || in lws_jwa_concat_kdf()
298 be32(jwe->jose.enc_alg->keybits_fixed, &t), in lws_jwa_concat_kdf()
328 if (lws_jwe_parse_jose(&jwe->jose, jwe->jws.map.buf[LJWS_JOSE], in lws_jwe_auth_and_decrypt()
337 if (!jwe->jose.alg) { in lws_jwe_auth_and_decrypt()
345 valid_aescbc_hmac = jwe->jose.enc_alg && in lws_jwe_auth_and_decrypt()
346 jwe->jose.enc_alg->algtype_crypto == LWS_JOSE_ENCTYPE_AES_CBC && in lws_jwe_auth_and_decrypt()
347 (jwe->jose.enc_alg->hmac_type == LWS_GENHMAC_TYPE_SHA256 || in lws_jwe_auth_and_decrypt()
348 jwe->jose.enc_alg->hmac_type == LWS_GENHMAC_TYPE_SHA384 || in lws_jwe_auth_and_decrypt()
349 jwe->jose.enc_alg->hmac_type == LWS_GENHMAC_TYPE_SHA512); in lws_jwe_auth_and_decrypt()
351 valid_aesgcm = jwe->jose.enc_alg && in lws_jwe_auth_and_decrypt()
352 jwe->jose.enc_alg->algtype_crypto == LWS_JOSE_ENCTYPE_AES_GCM; in lws_jwe_auth_and_decrypt()
354 if ((jwe->jose.alg->algtype_signing == LWS_JOSE_ENCTYPE_RSASSA_PKCS1_1_5 || in lws_jwe_auth_and_decrypt()
355 jwe->jose.alg->algtype_signing == LWS_JOSE_ENCTYPE_RSASSA_PKCS1_OAEP)) { in lws_jwe_auth_and_decrypt()
366 if (jwe->jose.alg->algtype_signing == LWS_JOSE_ENCTYPE_AES_ECB && in lws_jwe_auth_and_decrypt()
372 if (jwe->jose.alg->algtype_signing == LWS_JOSE_ENCTYPE_ECDHES && in lws_jwe_auth_and_decrypt()
378 jwe->jose.alg->alg, jwe->jose.enc_alg ? in lws_jwe_auth_and_decrypt()
379 jwe->jose.enc_alg->alg : "NULL"); in lws_jwe_auth_and_decrypt()
388 if (jwe->jose.recipients >= (int)LWS_ARRAY_SIZE(jwe->jose.recipient)) { in lws_jwe_encrypt()
394 valid_aesgcm = jwe->jose.enc_alg && in lws_jwe_encrypt()
395 jwe->jose.enc_alg->algtype_crypto == LWS_JOSE_ENCTYPE_AES_GCM; in lws_jwe_encrypt()
397 if (lws_jwe_parse_jose(&jwe->jose, jwe->jws.map.buf[LJWS_JOSE], in lws_jwe_encrypt()
405 valid_aescbc_hmac = jwe->jose.enc_alg && in lws_jwe_encrypt()
406 jwe->jose.enc_alg->algtype_crypto == LWS_JOSE_ENCTYPE_AES_CBC && in lws_jwe_encrypt()
407 (jwe->jose.enc_alg->hmac_type == LWS_GENHMAC_TYPE_SHA256 || in lws_jwe_encrypt()
408 jwe->jose.enc_alg->hmac_type == LWS_GENHMAC_TYPE_SHA384 || in lws_jwe_encrypt()
409 jwe->jose.enc_alg->hmac_type == LWS_GENHMAC_TYPE_SHA512); in lws_jwe_encrypt()
411 if ((jwe->jose.alg->algtype_signing == LWS_JOSE_ENCTYPE_RSASSA_PKCS1_1_5 || in lws_jwe_encrypt()
412 jwe->jose.alg->algtype_signing == LWS_JOSE_ENCTYPE_RSASSA_PKCS1_OAEP)) { in lws_jwe_encrypt()
427 if (jwe->jose.alg->algtype_signing == LWS_JOSE_ENCTYPE_AES_ECB && in lws_jwe_encrypt()
435 if (jwe->jose.alg->algtype_signing == LWS_JOSE_ENCTYPE_ECDHES && in lws_jwe_encrypt()
442 jwe->jose.alg->alg, jwe->jose.enc_alg ? in lws_jwe_encrypt()
443 jwe->jose.enc_alg->alg : "NULL"); in lws_jwe_encrypt()
447 memset(&jwe->jose.recipient[jwe->jose.recipients], 0, in lws_jwe_encrypt()
448 sizeof(jwe->jose.recipient[0])); in lws_jwe_encrypt()
450 jwe->jose.recipients++; in lws_jwe_encrypt()
483 if (jwe->jose.recipients > 1) { in lws_jwe_render_compact()
486 jwe->jose.recipients); in lws_jwe_render_compact()
578 if (!jwe->jose.alg || !jwe->jose.alg->alg) in lws_jwe_create_packet()
582 jwe->jose.alg->alg); in lws_jwe_create_packet()
636 n = lws_jws_sign_from_b64(&jwe->jose, &jws, p1, lws_ptr_diff_size_t(end1, p1)); in lws_jwe_create_packet()
727 jlen = lws_jose_render(&jwe->jose, jwe->jws.jwk, buf, sizeof(buf)); in lws_jwe_render_flattened()
747 jwe->jose.alg->alg, jwe->jose.enc_alg->alg); in lws_jwe_render_flattened()