From nobody Tue Feb 10 05:10:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+92359+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+92359+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1660200858; cv=none; d=zohomail.com; s=zohoarc; b=LYdXRa6so/ciEGYmYRPc3JQoHIK62P95K2i9NS3E+VbZxeUEmpCtB90GOWBiQvubaS0KfNAKzKW72Xd3Q13nplVR5H2GVZ3RLVnMoIYDzyykbLmTXrStSwwZLNZePWO+LdbJD6PKsi3IaYC8m1UF7KGHrisG8pzOlsELKUa343w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1660200858; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=sLWIk0WkmzjGp2CVIiXQ89i30o7Y3ziR+x59lk0gFDg=; b=bfAZ/Z4xVf9ufV9wRywSayU0515Kh7XhMGB65BX6lsv0k7Oi3EyO9xXUoe69LvFN3BsEy0dIdIqkNMLEi8FX3y8TMe8sCINvUc3QyBJgwC5+sxZN97bTMoAXZNvwd3bzzYDiH7jSMkb/Bko1fTSJL7UnZs1t+cB99kxb6OkY3Ls= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+92359+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1660200858114707.8149424732162; Wed, 10 Aug 2022 23:54:18 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id OMjwYY1788612xqK2K1XYZ3u; Wed, 10 Aug 2022 23:54:17 -0700 X-Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mx.groups.io with SMTP id smtpd.web11.3635.1660200856636046300 for ; Wed, 10 Aug 2022 23:54:16 -0700 X-IronPort-AV: E=McAfee;i="6400,9594,10435"; a="377565818" X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="377565818" X-Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2022 23:54:16 -0700 X-IronPort-AV: E=Sophos;i="5.93,228,1654585200"; d="scan'208";a="673586391" X-Received: from moisespe-mobl.amr.corp.intel.com (HELO jvang-mobl.amr.corp.intel.com) ([10.212.171.64]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2022 23:54:16 -0700 From: "Judah Vang" To: devel@edk2.groups.io Cc: Jian J Wang , Jiewen Yao , Nishant C Mistry Subject: [edk2-devel] [PATCH v4 15/28] SecurityPkg: Add null encryption variable libs Date: Wed, 10 Aug 2022 23:53:24 -0700 Message-Id: <20220811065337.2068-16-judah.vang@intel.com> In-Reply-To: <20220811065337.2068-1-judah.vang@intel.com> References: <20220811065337.2068-1-judah.vang@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,judah.vang@intel.com X-Gm-Message-State: tvCv2ceSFQM0fvbLtVXkUo3gx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1660200857; bh=guRFUAwkq1IzLRng4OfG4GJsecoIQrAPWLzrew2riBg=; h=Cc:Date:From:Reply-To:Subject:To; b=rrS6y5l8SXHuDciBzW4asQoo0UZdSPVw6MzG8Dksb1YSWDu+IR+UGVVQQODbS5h8C5X 8sbYJnnG5plxsidLB9I1Fbt9gn+l8GF47DxaKbvVDs67Ee/r8NxVNdaCLoiHiPeWvIqKS p1UVo/mqf+NOPV/vveidOyaZSpb3oOz2p/g= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1660200859855100062 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2594 V4: Applied code review - Remove empty Guids section from .inf file. Update description in *.c. Remove *.uni file and reference to it. V1: Provide null ecryption variable libraries. These will be used by default for platforms that don't support protected variable encryption. Cc: Jian J Wang Cc: Jiewen Yao Cc: Nishant C Mistry Signed-off-by: Jian J Wang Signed-off-by: Nishant C Mistry Signed-off-by: Judah Vang Reviewed-by: Jian J Wang --- SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVariableLibNull.in= f | 34 ++++++++ SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVariable.c = | 92 ++++++++++++++++++++ 2 files changed, 126 insertions(+) diff --git a/SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVariab= leLibNull.inf b/SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVar= iableLibNull.inf new file mode 100644 index 000000000000..185b6f9bedf7 --- /dev/null +++ b/SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVariableLibNu= ll.inf @@ -0,0 +1,34 @@ +## @file +# Provides NULL version of encryption variable services. +# +# Copyright (c) 2015 - 2022, Intel Corporation. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D EncryptionVariableLibNull + FILE_GUID =3D 3972E6FE-74D5-45C3-A9FB-DB9E5E5C9C17 + MODULE_TYPE =3D BASE + VERSION_STRING =3D 1.0 + LIBRARY_CLASS =3D EncryptionVariableLib + +# +# The following information is for reference only and not required by the = build tools. +# +# VALID_ARCHITECTURES =3D IA32 X64 +# + +[Sources] + EncryptionVariable.c + +[Packages] + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + SecurityPkg/SecurityPkg.dec + +[LibraryClasses] + BaseLib + DebugLib diff --git a/SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVariab= le.c b/SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVariable.c new file mode 100644 index 000000000000..52ee8a7b5aae --- /dev/null +++ b/SecurityPkg/Library/EncryptionVariableLibNull/EncryptionVariable.c @@ -0,0 +1,92 @@ +/** @file + NULL implementation of EncryptionVariableLib. + +Copyright (c) 2022, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include + +#include +#include + +/** + Encrypt variable data. + + Null version. + + @param[in, out] VarEncInfo Pointer to structure containing detailed + information about a variable. + + @retval EFI_UNSUPPORTED Unsupported to encrypt variable. + +**/ +EFI_STATUS +EFIAPI +EncryptVariable ( + IN OUT VARIABLE_ENCRYPTION_INFO *VarEncInfo + ) +{ + return EFI_UNSUPPORTED; +} + +/** + Decrypt variable data. + + Null version. + + @param[in, out] VarEncInfo Pointer to structure containing detailed + information about a variable. + + @retval EFI_UNSUPPORTED Unsupported to encrypt variable. + +**/ +EFI_STATUS +EFIAPI +DecryptVariable ( + IN OUT VARIABLE_ENCRYPTION_INFO *VarEncInfo + ) +{ + return EFI_UNSUPPORTED; +} + +/** + Get cipher information. + + Null version. + + @param[in] VarEncInfo Pointer to structure containing detailed + information about a variable. + + @retval EFI_UNSUPPORTED Unsupported interface. + +**/ +EFI_STATUS +EFIAPI +GetCipherDataInfo ( + IN VARIABLE_ENCRYPTION_INFO *VarEncInfo + ) +{ + return EFI_UNSUPPORTED; +} + +/** + Set cipher information for a variable. + + Null version. + + @param[in] VarEncInfo Pointer to structure containing detailed + information about a variable. + + @retval EFI_UNSUPPORTED If this method is not supported. + +**/ +EFI_STATUS +EFIAPI +SetCipherDataInfo ( + IN VARIABLE_ENCRYPTION_INFO *VarEncInfo + ) +{ + return EFI_UNSUPPORTED; +} --=20 2.35.1.windows.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#92359): https://edk2.groups.io/g/devel/message/92359 Mute This Topic: https://groups.io/mt/92953541/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-