From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B069C820B7 for ; Wed, 8 Feb 2017 22:04:46 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP; 08 Feb 2017 22:04:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,349,1484035200"; d="scan'208,217";a="223122256" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga004.fm.intel.com with ESMTP; 08 Feb 2017 22:04:46 -0800 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 8 Feb 2017 22:04:45 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 8 Feb 2017 22:04:45 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.88]) by SHSMSX104.ccr.corp.intel.com ([10.239.4.70]) with mapi id 14.03.0248.002; Thu, 9 Feb 2017 14:04:43 +0800 From: "Yao, Jiewen" To: "Long, Qin" , "edk2-devel@lists.01.org" CC: "Zhang, Chao B" Thread-Topic: [PATCH V2 3/6] SecurityPkg/include: Add PlatformPasswordLib lib class. Thread-Index: AQHSgmz0Wox983eBJ02yjHApwSVgl6FgL+qA Date: Thu, 9 Feb 2017 06:04:42 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503A8EBBE9@shsmsx102.ccr.corp.intel.com> References: <1486455866-7896-1-git-send-email-jiewen.yao@intel.com> <1486455866-7896-4-git-send-email-jiewen.yao@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: [PATCH V2 3/6] SecurityPkg/include: Add PlatformPasswordLib lib class. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Feb 2017 06:04:46 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Good catch. Fixed. From: Long, Qin Sent: Wednesday, February 8, 2017 4:39 PM To: Yao, Jiewen ; edk2-devel@lists.01.org Cc: Zhang, Chao B Subject: RE: [PATCH V2 3/6] SecurityPkg/include: Add PlatformPasswordLib li= b class. Reviewed-by: Qin Long > Please also check the typo: passowrd --> password. Best Regards & Thanks, LONG, Qin > -----Original Message----- > From: Yao, Jiewen > Sent: Tuesday, February 7, 2017 12:24 AM > To: edk2-devel@lists.01.org > Cc: Long, Qin >; Zhang, Cha= o B > > > Subject: [PATCH V2 3/6] SecurityPkg/include: Add PlatformPasswordLib lib > class. > > This lib is to indicate if the password is cleared. > > Cc: Qin Long > > Cc: Chao Zhang > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jiewen Yao > > --- > SecurityPkg/Include/Library/PlatformPasswordLib.h | 54 > ++++++++++++++++++++ > SecurityPkg/SecurityPkg.dec | 4 ++ > 2 files changed, 58 insertions(+) > > diff --git a/SecurityPkg/Include/Library/PlatformPasswordLib.h > b/SecurityPkg/Include/Library/PlatformPasswordLib.h > new file mode 100644 > index 0000000..79067d2 > --- /dev/null > +++ b/SecurityPkg/Include/Library/PlatformPasswordLib.h > @@ -0,0 +1,54 @@ > +/** @file > + Provides a platform-specific method to return password policy. > + > +Copyright (c) 2017, Intel Corporation. All rights reserved.
This > +program and the accompanying materials are licensed and made available > +under the terms and conditions of the BSD License which accompanies > +this distribution. The full text of the license may be found at > +http://opensource.org/licenses/bsd-license.php > + > +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" > BASIS, > +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER > EXPRESS OR IMPLIED. > + > +**/ > + > +#ifndef __PLATFORM_PASSWORD_LIB_H__ > +#define __PLATFORM_PASSWORD_LIB_H__ > + > +/** > + This function is called at password driver entrypoint. > + This function should be called only once, to clear the password. > + > + This function provides a way to reset the password, just in case the > + platform owner forgets the password. > + The platform should provide a secure way to make sure only the > + platform owner is allowed to clear password. > + > + Once the password is cleared, the platform should provide a way to > + set a new password. > + > + @retval TRUE There is a platform request to clear the password. > + @retval FALSE There is no platform request to clear the password. > +**/ > +BOOLEAN > +EFIAPI > +IsPasswordCleared ( > + VOID > + ); > + > +/** > + This function is called if the password driver finds that the > +password is not enrolled, > + when the password is required to input. > + > + This function should return the action accroding to platform policy. > + > + @retval TRUE The caller should force the user to enroll the password. > + @retval FALSE The caller may skip the password enroll. > +**/ > +BOOLEAN > +EFIAPI > +NeedEnrollPassword ( > + VOID > + ); > + > +#endif > diff --git a/SecurityPkg/SecurityPkg.dec b/SecurityPkg/SecurityPkg.dec in= dex > da2f84f..7050d3e 100644 > --- a/SecurityPkg/SecurityPkg.dec > +++ b/SecurityPkg/SecurityPkg.dec > @@ -93,6 +93,10 @@ > # > OpalPasswordSupportLib|Include/Library/OpalPasswordSupportLib.h > > + ## @libraryclass Provides a platform-specific method to return passw= ord > policy. > + # > + PlatformPasswordLib|Include/Library/PlatformPasswordLib.h > + > [Guids] > ## Security package token space guid. > # Include/Guid/SecurityPkgTokenSpace.h > -- > 2.7.4.windows.1