diff options
Diffstat (limited to 'firmware/lib21/api.c')
-rw-r--r-- | firmware/lib21/api.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/firmware/lib21/api.c b/firmware/lib21/api.c index 99bc4433..beed98bc 100644 --- a/firmware/lib21/api.c +++ b/firmware/lib21/api.c @@ -16,19 +16,19 @@ #include "2rsa.h" #include "vb2_common.h" -int vb2api_fw_phase3_2(struct vb2_context *ctx) +int vb2api_fw_phase3(struct vb2_context *ctx) { int rv; /* Verify firmware keyblock */ - rv = vb2_load_fw_keyblock2(ctx); + rv = vb2_load_fw_keyblock(ctx); if (rv) { vb2_fail(ctx, VB2_RECOVERY_RO_INVALID_RW, rv); return rv; } /* Verify firmware preamble */ - rv = vb2_load_fw_preamble2(ctx); + rv = vb2_load_fw_preamble(ctx); if (rv) { vb2_fail(ctx, VB2_RECOVERY_RO_INVALID_RW, rv); return rv; @@ -42,8 +42,8 @@ int vb2api_init_hash2(struct vb2_context *ctx, uint32_t *size) { struct vb2_shared_data *sd = vb2_get_sd(ctx); - const struct vb2_fw_preamble2 *pre; - const struct vb2_signature2 *sig = NULL; + const struct vb2_fw_preamble *pre; + const struct vb2_signature *sig = NULL; struct vb2_digest_context *dc; struct vb2_workbuf wb; uint32_t hash_offset; @@ -54,13 +54,13 @@ int vb2api_init_hash2(struct vb2_context *ctx, /* Get preamble pointer */ if (!sd->workbuf_preamble_size) return VB2_ERROR_API_INIT_HASH_PREAMBLE; - pre = (const struct vb2_fw_preamble2 *) + pre = (const struct vb2_fw_preamble *) (ctx->workbuf + sd->workbuf_preamble_offset); /* Find the matching signature */ hash_offset = pre->hash_offset; for (i = 0; i < pre->hash_count; i++) { - sig = (const struct vb2_signature2 *) + sig = (const struct vb2_signature *) ((uint8_t *)pre + hash_offset); if (!memcmp(guid, &sig->guid, sizeof(*guid))) @@ -96,7 +96,7 @@ int vb2api_init_hash2(struct vb2_context *ctx, return vb2_digest_init(dc, sig->hash_alg); } -int vb2api_check_hash2(struct vb2_context *ctx) +int vb2api_check_hash(struct vb2_context *ctx) { struct vb2_shared_data *sd = vb2_get_sd(ctx); struct vb2_digest_context *dc = (struct vb2_digest_context *) @@ -106,7 +106,7 @@ int vb2api_check_hash2(struct vb2_context *ctx) uint8_t *digest; uint32_t digest_size = vb2_digest_size(dc->hash_alg); - const struct vb2_signature2 *sig; + const struct vb2_signature *sig; int rv; @@ -115,7 +115,7 @@ int vb2api_check_hash2(struct vb2_context *ctx) /* Get signature pointer */ if (!sd->hash_tag) return VB2_ERROR_API_CHECK_HASH_TAG; - sig = (const struct vb2_signature2 *)(ctx->workbuf + sd->hash_tag); + sig = (const struct vb2_signature *)(ctx->workbuf + sd->hash_tag); /* Must have initialized hash digest work area */ if (!sd->workbuf_hash_size) |