Lines Matching defs:assert
38 WEBAUTHN_ASSERTION *assert;
503 unpack_appid(fido_assert_t *assert,
506 if (assert->appid == NULL || opt->pbU2fAppId == NULL)
512 fido_log_debug("%s: %s -> %s", __func__, assert->rp_id, assert->appid);
513 free(assert->rp_id);
514 assert->rp_id = assert->appid;
515 assert->appid = NULL;
519 unpack_assert_authdata(fido_assert_t *assert, const WEBAUTHN_ASSERTION *wa)
523 if ((r = fido_assert_set_authdata_raw(assert, 0, wa->pbAuthenticatorData,
534 unpack_assert_sig(fido_assert_t *assert, const WEBAUTHN_ASSERTION *wa)
538 if ((r = fido_assert_set_sig(assert, 0, wa->pbSignature,
549 unpack_cred_id(fido_assert_t *assert, const WEBAUTHN_ASSERTION *wa)
551 if (fido_blob_set(&assert->stmt[0].id, wa->Credential.pbId,
561 unpack_user_id(fido_assert_t *assert, const WEBAUTHN_ASSERTION *wa)
565 if (fido_blob_set(&assert->stmt[0].user.id, wa->pbUserId,
575 unpack_hmac_secret(fido_assert_t *assert, const WEBAUTHN_ASSERTION *wa)
593 if (!fido_blob_is_empty(&assert->stmt[0].hmac_secret)) {
597 if (fido_blob_set(&assert->stmt[0].hmac_secret,
607 translate_fido_assert(struct winhello_assert *ctx, const fido_assert_t *assert,
613 if (assert->up == FIDO_OPT_FALSE) {
614 fido_log_debug("%s: up %d", __func__, assert->up);
617 if ((ctx->rp_id = to_utf16(assert->rp_id)) == NULL) {
621 if (pack_cd(&ctx->cd, &assert->cd) < 0) {
629 if (pack_appid(opt, assert->appid, &ctx->appid) < 0) {
633 if (pack_credlist(&opt->CredentialList, &assert->allow_list) < 0) {
637 if (pack_assert_ext(opt, &assert->ext) < 0) {
641 if (set_assert_uv(&opt->dwUserVerificationRequirement, assert->uv,
651 translate_winhello_assert(fido_assert_t *assert,
654 const WEBAUTHN_ASSERTION *wa = ctx->assert;
658 if (assert->stmt_len > 0) {
659 fido_log_debug("%s: stmt_len=%zu", __func__, assert->stmt_len);
662 if ((r = fido_assert_set_count(assert, 1)) != FIDO_OK) {
667 unpack_appid(assert, opt);
668 if (unpack_assert_authdata(assert, wa) < 0) {
672 if (unpack_assert_sig(assert, wa) < 0) {
676 if (unpack_cred_id(assert, wa) < 0) {
680 if (unpack_user_id(assert, wa) < 0) {
684 if (assert->ext.mask & FIDO_EXT_HMAC_SECRET &&
685 unpack_hmac_secret(assert, wa) < 0) {
825 &ctx->assert)) != S_OK) {
855 if (ctx->assert != NULL)
856 webauthn_free_assert(ctx->assert);
958 fido_winhello_get_assert(fido_dev_t *dev, fido_assert_t *assert,
967 fido_assert_reset_rx(assert);
980 if ((r = translate_fido_assert(ctx, assert, pin, ms)) != FIDO_OK) {
988 if ((r = translate_winhello_assert(assert, ctx)) != FIDO_OK) {