aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAKASHI Takahiro2022-07-05 14:48:12 +0900
committerHeinrich Schuchardt2022-07-05 14:37:16 +0200
commitb330140659eab02c31236dd1925e1c573d503a03 (patch)
tree18b49b04c5a6cb2c366fca96e88f7eaff779c99c
parentb124efc09fc5f62cc2e17d956ba3c5c9168738e8 (diff)
efi_loader: signature: export efi_hash_regions()
This function is used to calculate a message digest as part of authentication process in a later patch. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
-rw-r--r--include/efi_loader.h2
-rw-r--r--lib/efi_loader/efi_signature.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h
index c1e00ebac39..11930fbea83 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -931,6 +931,8 @@ struct efi_signature_store {
struct x509_certificate;
struct pkcs7_message;
+bool efi_hash_regions(struct image_region *regs, int count,
+ void **hash, const char *hash_algo, int *len);
bool efi_signature_lookup_digest(struct efi_image_regions *regs,
struct efi_signature_store *db,
bool dbx);
diff --git a/lib/efi_loader/efi_signature.c b/lib/efi_loader/efi_signature.c
index ddac751d128..742d8919402 100644
--- a/lib/efi_loader/efi_signature.c
+++ b/lib/efi_loader/efi_signature.c
@@ -125,8 +125,8 @@ struct pkcs7_message *efi_parse_pkcs7_header(const void *buf,
*
* Return: true on success, false on error
*/
-static bool efi_hash_regions(struct image_region *regs, int count,
- void **hash, const char *hash_algo, int *len)
+bool efi_hash_regions(struct image_region *regs, int count,
+ void **hash, const char *hash_algo, int *len)
{
int ret, hash_len;