From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.85.128.67, mailfrom: philmd@redhat.com) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by groups.io with SMTP; Mon, 29 Apr 2019 22:10:29 -0700 Received: by mail-wm1-f67.google.com with SMTP id b10so2193901wmj.4 for ; Mon, 29 Apr 2019 22:10:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=JlO2khRj/G35fXg4hfDWiAMO12GnpoAJL3hO0/FYH78=; b=hGfPuG8PCOWHieTmeONjIs1W+IXd4e0fT5VtctW21LqYLqiHXO77qdmAdUZkcSWDuH AWJjhckzmzTbywS47RRotNa5+mcE8IBEzyejgVcq9t11WjKY9hHObn774Azu7fi95aO4 stLPlr7Fw+iGw4iEJH+MnCpi5/TtYW8bYRJJjQNyJ1M+ZKBI/OoC51jiHdZx8tAaZmd8 pjnir9TwiKIaUkhnq7AAn924W10dhe0hUB2Ujjoofwao2O/UaXKpNb5m9hNVTLw5Kp8J W6KVwCvLvWm2myYzCgKv3iFEP/ep19RoKnKHPCjTzF+KXc9WFJjAy/cpAcW6RL2yLMAa PqIg== X-Gm-Message-State: APjAAAU+eCx3LD0BEVxMFAzjHnSw/97iZgcSJQXbDlLytDNUZk3Iv5Vl jxpeBKHxyQLDCAfCDo4vVq6law== X-Google-Smtp-Source: APXvYqyiVMha6fua47BpxjtbgVETjAgVAayKMhI9bOPwGyRuiP1PdxEl+Lv2jjgUpeefRZAuy0fuJQ== X-Received: by 2002:a1c:ef09:: with SMTP id n9mr1665998wmh.104.1556601027206; Mon, 29 Apr 2019 22:10:27 -0700 (PDT) Return-Path: Received: from [192.168.1.37] (193.red-88-21-103.staticip.rima-tde.net. [88.21.103.193]) by smtp.gmail.com with ESMTPSA id z4sm12256436wrq.75.2019.04.29.22.10.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Apr 2019 22:10:26 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH 07/16] OvmfPkg/EnrollDefaultKeys: clean up acronym capitalization in identifiers To: devel@edk2.groups.io, lersek@redhat.com Cc: Anthony Perard , Ard Biesheuvel , Jordan Justen , Julien Grall References: <20190427005328.27005-1-lersek@redhat.com> <20190427005328.27005-8-lersek@redhat.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <859f026d-80c9-3b72-f618-5cc9121b11d3@redhat.com> Date: Tue, 30 Apr 2019 07:10:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190427005328.27005-8-lersek@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 4/27/19 2:53 AM, Laszlo Ersek wrote: > According to the edk2 coding standards, "[w]hen all letters in an acronym > are capitalized, it makes the prior and subsequent words visually > difficult to distinguish". > > Fix the spellings of three acronyms, accordingly: > - "KEK" (Key Exchange Key) should be written as "Kek", in "mMicrosoftKEK", > - "CA" (Certificate Authority) should be written as "Ca", in > "mMicrosoftUefiCA", > - "PCA" (Production Certificate Authority) should be written as "Pca", in > "mMicrosoftPCA". > > Generate the changes with: > > sed --regexp-extended --in-place \ > --expression='s,\,mMicrosoftKek,g' \ > --expression='s,\,mMicrosoftUefiCa,g' \ > --expression='s,\,mMicrosoftPca,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 > --- > OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c > index fb30f4906df7..be0e4d8f8e96 100644 > --- a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c > +++ b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c > @@ -98,17 +98,17 @@ STATIC CONST UINT8 mRedHatPkKek1[] = { > }; > > // > // Second KEK: "Microsoft Corporation KEK CA 2011". > // SHA1: 31:59:0b:fd:89:c9:d7:4e:d0:87:df:ac:66:33:4b:39:31:25:4b:30 > // > // "dbx" updates in "dbxtool" are signed with a key derived from this KEK. > // > -STATIC CONST UINT8 mMicrosoftKEK[] = { > +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, > 0x00, 0x30, 0x81, 0x91, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, > 0x13, 0x02, 0x55, 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, > 0x13, 0x0a, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x6e, 0x31, > 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x07, 0x52, 0x65, 0x64, > 0x6d, 0x6f, 0x6e, 0x64, 0x31, 0x1e, 0x30, 0x1c, 0x06, 0x03, 0x55, 0x04, 0x0a, > @@ -225,17 +225,17 @@ STATIC CONST UINT8 mMicrosoftKEK[] = { > > // > // First DB entry: "Microsoft Windows Production PCA 2011" > // SHA1: 58:0a:6f:4c:c4:e4:b6:69:b9:eb:dc:1b:2b:3e:08:7b:80:d0:67:8d > // > // Windows 8 and Windows Server 2012 R2 boot loaders are signed with a chain > // rooted in this certificate. > // > -STATIC CONST UINT8 mMicrosoftPCA[] = { > +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, > 0x00, 0x30, 0x81, 0x88, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, > 0x13, 0x02, 0x55, 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, > 0x13, 0x0a, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x6e, 0x31, > 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x07, 0x52, 0x65, 0x64, > 0x6d, 0x6f, 0x6e, 0x64, 0x31, 0x1e, 0x30, 0x1c, 0x06, 0x03, 0x55, 0x04, 0x0a, > @@ -350,17 +350,17 @@ STATIC CONST UINT8 mMicrosoftPCA[] = { > }; > > // > // Second DB entry: "Microsoft Corporation UEFI CA 2011" > // SHA1: 46:de:f6:3b:5c:e6:1c:f8:ba:0d:e2:e6:63:9c:10:19:d0:ed:14:f3 > // > // To verify the "shim" binary and PCI expansion ROMs with. > // > -STATIC CONST UINT8 mMicrosoftUefiCA[] = { > +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, > 0x00, 0x30, 0x81, 0x91, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, > 0x13, 0x02, 0x55, 0x53, 0x31, 0x13, 0x30, 0x11, 0x06, 0x03, 0x55, 0x04, 0x08, > 0x13, 0x0a, 0x57, 0x61, 0x73, 0x68, 0x69, 0x6e, 0x67, 0x74, 0x6f, 0x6e, 0x31, > 0x10, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x04, 0x07, 0x13, 0x07, 0x52, 0x65, 0x64, > 0x6d, 0x6f, 0x6e, 0x64, 0x31, 0x1e, 0x30, 0x1c, 0x06, 0x03, 0x55, 0x04, 0x0a, > @@ -938,18 +938,18 @@ ShellAppMain ( > return 1; > } > } > > Status = EnrollListOfCerts ( > EFI_IMAGE_SECURITY_DATABASE, > &gEfiImageSecurityDatabaseGuid, > &gEfiCertX509Guid, > - mMicrosoftPCA, sizeof mMicrosoftPCA, &mMicrosoftOwnerGuid, > - mMicrosoftUefiCA, sizeof mMicrosoftUefiCA, &mMicrosoftOwnerGuid, > + mMicrosoftPca, sizeof mMicrosoftPca, &mMicrosoftOwnerGuid, > + mMicrosoftUefiCa, sizeof mMicrosoftUefiCa, &mMicrosoftOwnerGuid, > NULL); > if (EFI_ERROR (Status)) { > return 1; > } > > Status = EnrollListOfCerts ( > EFI_IMAGE_SECURITY_DATABASE1, > &gEfiImageSecurityDatabaseGuid, > @@ -960,17 +960,17 @@ ShellAppMain ( > return 1; > } > > Status = EnrollListOfCerts ( > EFI_KEY_EXCHANGE_KEY_NAME, > &gEfiGlobalVariableGuid, > &gEfiCertX509Guid, > mRedHatPkKek1, sizeof mRedHatPkKek1, &gEfiCallerIdGuid, > - mMicrosoftKEK, sizeof mMicrosoftKEK, &mMicrosoftOwnerGuid, > + mMicrosoftKek, sizeof mMicrosoftKek, &mMicrosoftOwnerGuid, > NULL); > if (EFI_ERROR (Status)) { > return 1; > } > > Status = EnrollListOfCerts ( > EFI_PLATFORM_KEY_NAME, > &gEfiGlobalVariableGuid, > Reviewed-by: Philippe Mathieu-Daude