• Home
  • Raw
  • Download

Lines Matching refs:jws

124 	struct lws_jws jws;  in test_jws_HS256()  local
128 lws_jws_init(&jws, &jwk, context); in test_jws_HS256()
207 lws_jws_destroy(&jws); in test_jws_HS256()
221 lws_jws_destroy(&jws); in test_jws_HS256()
281 struct lws_jws jws; in test_jws_RS256() local
286 lws_jws_init(&jws, &jwk, context); in test_jws_RS256()
318 &jws.map_b64) != 3) { in test_jws_RS256()
332 if (lws_jws_b64_compact_map(in, l, &jws.map_b64) != 3) { in test_jws_RS256()
338 n = lws_jws_sign_from_b64(&jose, &jws, in test_jws_RS256()
339 (char *)jws.map_b64.buf[LJWS_SIG], in test_jws_RS256()
340 jws.map_b64.len[LJWS_SIG] + 8); in test_jws_RS256()
345 jws.map_b64.len[LJWS_SIG] = (unsigned int)n; in test_jws_RS256()
367 lws_jws_destroy(&jws); in test_jws_RS256()
416 struct lws_jws jws; in test_jws_ES256() local
426 &jws.map, &jws.map_b64, in test_jws_ES256()
433 if (jws.map.len[LJWS_JOSE] != strlen(es256_jose) || in test_jws_ES256()
434 strncmp(es256_jose, jws.map.buf[LJWS_JOSE], in test_jws_ES256()
435 jws.map.len[LJWS_JOSE])) { in test_jws_ES256()
441 if (jws.map.len[LJWS_PYLD] != strlen(es256_payload) || in test_jws_ES256()
442 strncmp(es256_payload, jws.map.buf[LJWS_PYLD], in test_jws_ES256()
443 jws.map.len[LJWS_PYLD])) { in test_jws_ES256()
449 if (lws_jws_parse_jose(&jose, jws.map.buf[LJWS_JOSE], in test_jws_ES256()
450 (int)jws.map.len[LJWS_JOSE], in test_jws_ES256()
462 jws.jwk = &jwk; in test_jws_ES256()
463 jws.context = context; in test_jws_ES256()
478 if (lws_jws_sig_confirm(&jws.map_b64, &jws.map, &jwk, context) < 0) { in test_jws_ES256()
493 if (lws_jws_b64_compact_map(p, l, &jws.map_b64) != 3) in test_jws_ES256()
498 lws_genhash_update(&hash_ctx, jws.map_b64.buf[LJWS_JOSE], in test_jws_ES256()
499 jws.map_b64.len[LJWS_JOSE]) || in test_jws_ES256()
501 lws_genhash_update(&hash_ctx, jws.map_b64.buf[LJWS_PYLD], in test_jws_ES256()
502 jws.map_b64.len[LJWS_PYLD]) || in test_jws_ES256()
509 lwsl_hexdump(jws.map_b64.buf[LJWS_SIG], jws.map_b64.len[LJWS_SIG]); in test_jws_ES256()
512 n = lws_jws_sign_from_b64(&jose, &jws, in test_jws_ES256()
513 (char *)jws.map_b64.buf[LJWS_SIG], in test_jws_ES256()
514 jws.map_b64.len[LJWS_SIG] + 8); in test_jws_ES256()
519 jws.map_b64.len[LJWS_SIG] = (unsigned int)n; in test_jws_ES256()
521 lwsl_hexdump(jws.map_b64.buf[LJWS_SIG], jws.map_b64.len[LJWS_SIG]); in test_jws_ES256()
578 struct lws_jws jws; in test_jws_ES512() local
588 &jws.map, &jws.map_b64, temp, in test_jws_ES512()
595 if (jws.map.len[LJWS_JOSE] != strlen(es512_jose) || in test_jws_ES512()
596 strncmp(es512_jose, jws.map.buf[LJWS_JOSE], in test_jws_ES512()
597 jws.map.len[LJWS_JOSE])) { in test_jws_ES512()
603 if (jws.map.len[LJWS_PYLD] != strlen(es512_payload) || in test_jws_ES512()
604 strncmp(es512_payload, jws.map.buf[LJWS_PYLD], in test_jws_ES512()
605 jws.map.len[LJWS_PYLD])) { in test_jws_ES512()
611 if (lws_jws_parse_jose(&jose, jws.map.buf[LJWS_JOSE], in test_jws_ES512()
612 (int)jws.map.len[LJWS_JOSE], in test_jws_ES512()
624 jws.jwk = &jwk; in test_jws_ES512()
625 jws.context = context; in test_jws_ES512()
640 if (lws_jws_sig_confirm(&jws.map_b64, &jws.map, &jwk, context) < 0) { in test_jws_ES512()
655 if (lws_jws_b64_compact_map(p, l, &jws.map_b64) != 3) in test_jws_ES512()
660 lws_genhash_update(&hash_ctx, jws.map_b64.buf[LJWS_JOSE], in test_jws_ES512()
661 jws.map_b64.len[LJWS_JOSE]) || in test_jws_ES512()
663 lws_genhash_update(&hash_ctx, jws.map_b64.buf[LJWS_PYLD], in test_jws_ES512()
664 jws.map_b64.len[LJWS_PYLD]) || in test_jws_ES512()
672 n = lws_jws_sign_from_b64(&jose, &jws, in test_jws_ES512()
673 (char *)jws.map_b64.buf[LJWS_SIG], 1024); in test_jws_ES512()
678 jws.map_b64.len[LJWS_SIG] = (unsigned int)n; in test_jws_ES512()