diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/2lib/2api.c | 2 | ||||
-rw-r--r-- | firmware/2lib/include/2secdata.h | 5 | ||||
-rw-r--r-- | firmware/lib20/misc.c | 4 |
3 files changed, 6 insertions, 5 deletions
diff --git a/firmware/2lib/2api.c b/firmware/2lib/2api.c index 95dc6c2d..28de8348 100644 --- a/firmware/2lib/2api.c +++ b/firmware/2lib/2api.c @@ -355,7 +355,7 @@ vb2_error_t vb2api_check_hash_get_digest(struct vb2_context *ctx, vb2_member_of(sd, sd->data_key_offset), sd->data_key_size)); - key.allow_hwcrypto = vb2_hwcrypto_rsa_allowed(ctx); + key.allow_hwcrypto = vb2_hwcrypto_allowed(ctx); /* * Check digest vs. signature. Note that this destroys the signature. diff --git a/firmware/2lib/include/2secdata.h b/firmware/2lib/include/2secdata.h index 880a2ec3..c3355f8c 100644 --- a/firmware/2lib/include/2secdata.h +++ b/firmware/2lib/include/2secdata.h @@ -217,9 +217,10 @@ int vb2_secdata_fwmp_get_flag(struct vb2_context *ctx, uint8_t *vb2_secdata_fwmp_get_dev_key_hash(struct vb2_context *ctx); /* - * Helper function to check if hwcrypto for RSA is allowed + * Helper function to check if hwcrypto is allowed. */ -static inline int vb2_hwcrypto_rsa_allowed(struct vb2_context *ctx) { +static inline int vb2_hwcrypto_allowed(struct vb2_context *ctx) +{ /* disable hwcrypto in recovery mode */ if (ctx->flags & VB2_CONTEXT_RECOVERY_MODE) diff --git a/firmware/lib20/misc.c b/firmware/lib20/misc.c index 6ad3cab4..bc8e9955 100644 --- a/firmware/lib20/misc.c +++ b/firmware/lib20/misc.c @@ -43,7 +43,7 @@ vb2_error_t vb2_load_fw_keyblock(struct vb2_context *ctx) /* Unpack the root key */ VB2_TRY(vb2_unpack_key_buffer(&root_key, key_data, key_size)); - root_key.allow_hwcrypto = vb2_hwcrypto_rsa_allowed(ctx); + root_key.allow_hwcrypto = vb2_hwcrypto_allowed(ctx); /* Load the firmware keyblock header after the root key */ kb = vb2_workbuf_alloc(&wb, sizeof(*kb)); @@ -149,7 +149,7 @@ vb2_error_t vb2_load_fw_preamble(struct vb2_context *ctx) VB2_TRY(vb2_unpack_key_buffer(&data_key, key_data, key_size)); - data_key.allow_hwcrypto = vb2_hwcrypto_rsa_allowed(ctx); + data_key.allow_hwcrypto = vb2_hwcrypto_allowed(ctx); /* Load the firmware preamble header */ pre = vb2_workbuf_alloc(&wb, sizeof(*pre)); |