efi_loader: signature: move efi_guid_cert_type_pkcs7 to efi_signature.c
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Fri, 29 May 2020 06:41:18 +0000 (15:41 +0900)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 3 Jun 2020 15:19:19 +0000 (17:19 +0200)
The global variable, efi_guid_cert_type_pkcs7, will also be used in
efi_image_loader.c in a succeeding patch so as to correctly handle
a signature type of authenticode in signed image.

Meanwhile, it is currently defined in efi_variable.c. Once some secure
storage solution for UEFI variables is introduced, efi_variable.c may
not always be compiled in.

So move the definition to efi_signature.c as a common place.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_signature.c
lib/efi_loader/efi_variable.c

index adcb8c9cca650f01796fe727520cfd148361dd3a..6685253856acfa60d0d4d510c695c45ab65b8320 100644 (file)
@@ -22,6 +22,7 @@ const efi_guid_t efi_guid_sha256 = EFI_CERT_SHA256_GUID;
 const efi_guid_t efi_guid_cert_rsa2048 = EFI_CERT_RSA2048_GUID;
 const efi_guid_t efi_guid_cert_x509 = EFI_CERT_X509_GUID;
 const efi_guid_t efi_guid_cert_x509_sha256 = EFI_CERT_X509_SHA256_GUID;
+const efi_guid_t efi_guid_cert_type_pkcs7 = EFI_CERT_TYPE_PKCS7_GUID;
 
 #ifdef CONFIG_EFI_SECURE_BOOT
 
index 0a43db56788abf2dcaace97c2b7199915e5eb7e7..e097670e2832bd7b0cab05946f1784790afc81f9 100644 (file)
@@ -26,7 +26,6 @@ enum efi_secure_mode {
        EFI_MODE_DEPLOYED,
 };
 
-const efi_guid_t efi_guid_cert_type_pkcs7 = EFI_CERT_TYPE_PKCS7_GUID;
 static bool efi_secure_boot;
 static int efi_secure_mode;
 static u8 efi_vendor_keys;