From 32d1440aaddde976379b43430b913a99980d1741 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Thu, 25 Apr 2019 14:15:10 +0200 Subject: [PATCH] OvmfPkg/EnrollDefaultKeys: clean up global variable name prefixes In edk2, we should start the names of module-global variables with "m". Rename the "RedHatPkKek1", "MicrosoftKEK", "MicrosoftPCA", "MicrosoftUefiCA" variables accordingly, with the following command: sed --regexp-extended --in-place \ --expression='s,\<(RedHatPkKek1|Microsoft(KEK|PCA|UefiCA))\>,m\1,g' \ OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1747 Signed-off-by: Laszlo Ersek Reviewed-by: Philippe Mathieu-Daude Acked-by: Ard Biesheuvel Reviewed-by: Gary Lin --- OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c index aa827ac6aa..fb30f4906d 100644 --- a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c +++ b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c @@ -22,7 +22,7 @@ // "Red Hat Secure Boot (PK/KEK key 1)/emailAddress=secalert@redhat.com" // SHA1: fd:fc:7f:3c:7e:f3:e0:57:76:ad:d7:98:78:21:6c:9b:e0:e1:95:97 // -STATIC CONST UINT8 RedHatPkKek1[] = { +STATIC CONST UINT8 mRedHatPkKek1[] = { 0x30, 0x82, 0x03, 0xa0, 0x30, 0x82, 0x02, 0x88, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x09, 0x00, 0xfe, 0xf5, 0x88, 0xe8, 0xf3, 0x96, 0xc0, 0xf1, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, @@ -103,7 +103,7 @@ STATIC CONST UINT8 RedHatPkKek1[] = { // // "dbx" updates in "dbxtool" are signed with a key derived from this KEK. // -STATIC CONST UINT8 MicrosoftKEK[] = { +STATIC CONST UINT8 mMicrosoftKEK[] = { 0x30, 0x82, 0x05, 0xe8, 0x30, 0x82, 0x03, 0xd0, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x0a, 0x61, 0x0a, 0xd1, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, @@ -230,7 +230,7 @@ STATIC CONST UINT8 MicrosoftKEK[] = { // Windows 8 and Windows Server 2012 R2 boot loaders are signed with a chain // rooted in this certificate. // -STATIC CONST UINT8 MicrosoftPCA[] = { +STATIC CONST UINT8 mMicrosoftPCA[] = { 0x30, 0x82, 0x05, 0xd7, 0x30, 0x82, 0x03, 0xbf, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x0a, 0x61, 0x07, 0x76, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, @@ -355,7 +355,7 @@ STATIC CONST UINT8 MicrosoftPCA[] = { // // To verify the "shim" binary and PCI expansion ROMs with. // -STATIC CONST UINT8 MicrosoftUefiCA[] = { +STATIC CONST UINT8 mMicrosoftUefiCA[] = { 0x30, 0x82, 0x06, 0x10, 0x30, 0x82, 0x03, 0xf8, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x0a, 0x61, 0x08, 0xd3, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, @@ -943,8 +943,8 @@ ShellAppMain ( EFI_IMAGE_SECURITY_DATABASE, &gEfiImageSecurityDatabaseGuid, &gEfiCertX509Guid, - MicrosoftPCA, sizeof MicrosoftPCA, &mMicrosoftOwnerGuid, - MicrosoftUefiCA, sizeof MicrosoftUefiCA, &mMicrosoftOwnerGuid, + mMicrosoftPCA, sizeof mMicrosoftPCA, &mMicrosoftOwnerGuid, + mMicrosoftUefiCA, sizeof mMicrosoftUefiCA, &mMicrosoftOwnerGuid, NULL); if (EFI_ERROR (Status)) { return 1; @@ -964,8 +964,8 @@ ShellAppMain ( EFI_KEY_EXCHANGE_KEY_NAME, &gEfiGlobalVariableGuid, &gEfiCertX509Guid, - RedHatPkKek1, sizeof RedHatPkKek1, &gEfiCallerIdGuid, - MicrosoftKEK, sizeof MicrosoftKEK, &mMicrosoftOwnerGuid, + mRedHatPkKek1, sizeof mRedHatPkKek1, &gEfiCallerIdGuid, + mMicrosoftKEK, sizeof mMicrosoftKEK, &mMicrosoftOwnerGuid, NULL); if (EFI_ERROR (Status)) { return 1; @@ -975,7 +975,7 @@ ShellAppMain ( EFI_PLATFORM_KEY_NAME, &gEfiGlobalVariableGuid, &gEfiCertX509Guid, - RedHatPkKek1, sizeof RedHatPkKek1, &gEfiGlobalVariableGuid, + mRedHatPkKek1, sizeof mRedHatPkKek1, &gEfiGlobalVariableGuid, NULL); if (EFI_ERROR (Status)) { return 1;