Lines Matching refs:jose
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()
485 switch (jose.alg->algtype_signing) { in lws_jws_sig_confirm()
499 if (lws_genhash_init(&hash_ctx, jose.alg->hash_type)) in lws_jws_sig_confirm()
529 jose.alg->hash_type, in lws_jws_sig_confirm()
545 h_len = (int)lws_genhmac_size(jose.alg->hmac_type); in lws_jws_sig_confirm()
549 if (lws_genhmac_init(&ctx, jose.alg->hmac_type, in lws_jws_sig_confirm()
598 jose.alg->curve_name)) in lws_jws_sig_confirm()
620 if (lws_genhash_init(&hash_ctx, jose.alg->hash_type) || in lws_jws_sig_confirm()
632 h_len = (int)lws_genhash_size(jose.alg->hash_type); in lws_jws_sig_confirm()
647 jose.alg->hash_type, in lws_jws_sig_confirm()
648 jose.alg->keybits_fixed, in lws_jws_sig_confirm()
741 lws_jws_sign_from_b64(struct lws_jose *jose, struct lws_jws *jws, in lws_jws_sign_from_b64() argument
752 if (jose->alg->hash_type == LWS_GENHASH_TYPE_UNKNOWN && in lws_jws_sign_from_b64()
753 jose->alg->hmac_type == LWS_GENHMAC_TYPE_UNKNOWN && in lws_jws_sign_from_b64()
754 !strcmp(jose->alg->alg, "none")) in lws_jws_sign_from_b64()
757 if (lws_genhash_init(&hash_ctx, jose->alg->hash_type) || in lws_jws_sign_from_b64()
769 switch (jose->alg->algtype_signing) { in lws_jws_sign_from_b64()
791 n = lws_genrsa_hash_sign(&rsactx, digest, jose->alg->hash_type, in lws_jws_sign_from_b64()
811 lws_genhash_size(jose->alg->hash_type), in lws_jws_sign_from_b64()
835 jose->alg->curve_name)) in lws_jws_sign_from_b64()
849 m = lws_gencrypto_bits_to_bytes(jose->alg->keybits_fixed) * 2; in lws_jws_sign_from_b64()
855 jose->alg->hash_type, in lws_jws_sign_from_b64()
856 jose->alg->keybits_fixed, in lws_jws_sign_from_b64()
959 struct lws_jose jose; in lws_jwt_signed_validate() local
965 lws_jose_init(&jose); in lws_jwt_signed_validate()
986 if (lws_jws_parse_jose(&jose, jws.map.buf[LJWS_JOSE], in lws_jwt_signed_validate()
998 n = strlen(jose.alg->alg); in lws_jwt_signed_validate()
1003 !strncmp(jose.alg->alg, ts.token, ts.token_len)) in lws_jwt_signed_validate()
1009 jose.alg->alg, alg_list); in lws_jwt_signed_validate()
1037 lws_jose_destroy(&jose); in lws_jwt_signed_validate()
1046 struct lws_jose jose; in lws_jwt_vsign_via_info() local
1054 lws_jose_init(&jose); in lws_jwt_vsign_via_info()
1079 if (lws_gencrypto_jws_alg_to_definition(info->alg, &jose.alg)) { in lws_jwt_vsign_via_info()
1093 if (lws_jws_parse_jose(&jose, info->jose_hdr, in lws_jwt_vsign_via_info()
1152 n = lws_jws_sign_from_b64(&jose, &jws, in lws_jwt_vsign_via_info()
1176 lws_jose_destroy(&jose); in lws_jwt_vsign_via_info()