From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 AB50921A04820 for ; Thu, 6 Apr 2017 01:40:17 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP; 06 Apr 2017 01:40:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,283,1488873600"; d="scan'208";a="1151851615" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 06 Apr 2017 01:40:17 -0700 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 6 Apr 2017 01:40:16 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 6 Apr 2017 01:40:16 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.117]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.217]) with mapi id 14.03.0319.002; Thu, 6 Apr 2017 16:40:14 +0800 From: "Ye, Ting" To: "Long, Qin" , "Gao, Liming" CC: "edk2-devel@lists.01.org" Thread-Topic: [Patch] CryptoPkg: Move openssl and CRT headers to private include section Thread-Index: AQHSrpqdP4/V2gJ9Kka/cs1S2hFDYKG4BYdg Date: Thu, 6 Apr 2017 08:40:14 +0000 Message-ID: References: <20170406055612.10168-1-qin.long@intel.com> In-Reply-To: <20170406055612.10168-1-qin.long@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch] CryptoPkg: Move openssl and CRT headers to private include section X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2017 08:40:17 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ye Ting =20 -----Original Message----- From: Long, Qin=20 Sent: Thursday, April 6, 2017 1:56 PM To: Gao, Liming ; Ye, Ting Cc: edk2-devel@lists.01.org; Long, Qin Subject: [Patch] CryptoPkg: Move openssl and CRT headers to private include= section Moving the header files for openssl and CRT wrappers to the private include= section, since these files should be referenced by CryptoPkg internally. T= his update was supported by new [Includes.Common.Private] setting in Packag= e DEC file. The external consumer modules should only use the interfaces defined in Bas= eCryptLib.h to access crypto functions. This change will be helpful to imme= diately detect any illegal direct reference to internal openssl headers. The Perl script "process_files.pl" was also updated to reflect the new priv= ate include path. Cc: Gao Liming Cc: Ting Ye Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qin Long Signed-off-by: Long Qin --- CryptoPkg/CryptoPkg.dec | 3 +++ CryptoPkg/{ =3D> Library}/Include/CrtLibSupport.h | 0 CryptoPkg/{ =3D> Library}/Include/assert.h | 0 CryptoPkg/{ =3D> Library}/Include/ctype.h | 0 CryptoPkg/{ =3D> Library}/Include/errno.h | 0 CryptoPkg/{ =3D> Library}/Include/internal/dso_conf.h | 0 CryptoPkg/{ =3D> Library}/Include/limits.h | 0 CryptoPkg/{ =3D> Library}/Include/memory.h | 0 CryptoPkg/{ =3D> Library}/Include/openssl/opensslconf.h | 0 CryptoPkg/{ =3D> Library}/Include/stdarg.h | 0 CryptoPkg/{ =3D> Library}/Include/stddef.h | 0 CryptoPkg/{ =3D> Library}/Include/stdio.h | 0 CryptoPkg/{ =3D> Library}/Include/stdlib.h | 0 CryptoPkg/{ =3D> Library}/Include/string.h | 0 CryptoPkg/{ =3D> Library}/Include/strings.h | 0 CryptoPkg/{ =3D> Library}/Include/sys/time.h | 0 CryptoPkg/{ =3D> Library}/Include/sys/types.h | 0 CryptoPkg/{ =3D> Library}/Include/syslog.h | 0 CryptoPkg/{ =3D> Library}/Include/time.h | 0 CryptoPkg/{ =3D> Library}/Include/unistd.h | 0 CryptoPkg/Library/OpensslLib/process_files.pl | 2 +- 21 files changed, 4 insertions(+), 1 deletion(-) rename CryptoPkg/{ =3D> = Library}/Include/CrtLibSupport.h (100%) rename CryptoPkg/{ =3D> Library}/I= nclude/assert.h (100%) rename CryptoPkg/{ =3D> Library}/Include/ctype.h (1= 00%) rename CryptoPkg/{ =3D> Library}/Include/errno.h (100%) rename Crypt= oPkg/{ =3D> Library}/Include/internal/dso_conf.h (100%) rename CryptoPkg/{= =3D> Library}/Include/limits.h (100%) rename CryptoPkg/{ =3D> Library}/In= clude/memory.h (100%) rename CryptoPkg/{ =3D> Library}/Include/openssl/ope= nsslconf.h (100%) rename CryptoPkg/{ =3D> Library}/Include/stdarg.h (100%)= rename CryptoPkg/{ =3D> Library}/Include/stddef.h (100%) rename CryptoPk= g/{ =3D> Library}/Include/stdio.h (100%) rename CryptoPkg/{ =3D> Library}/= Include/stdlib.h (100%) rename CryptoPkg/{ =3D> Library}/Include/string.h = (100%) rename CryptoPkg/{ =3D> Library}/Include/strings.h (100%) rename C= ryptoPkg/{ =3D> Library}/Include/sys/time.h (100%) rename CryptoPkg/{ =3D>= Library}/Include/sys/types.h (100%) rename CryptoPkg/{ =3D> Library}/Incl= ude/syslog.h (100%) rename CryptoPkg/{ =3D> Library}/Include/time.h (100%)= rename CryptoPkg/{ =3D> Library}/Include/unistd.h (100%) diff --git a/CryptoPkg/CryptoPkg.dec b/CryptoPkg/CryptoPkg.dec index fdccbf= 06f7..b2fae6142a 100644 --- a/CryptoPkg/CryptoPkg.dec +++ b/CryptoPkg/CryptoPkg.dec @@ -24,6 +24,9 @@ =20 [Includes] Include + +[Includes.Common.Private] + Library/Include Library/OpensslLib/openssl/include Library/OpensslLib/openssl/crypto/include =20 diff --git a/CryptoPkg/Include/CrtLibSupport.h b/CryptoPkg/Library/Include/= CrtLibSupport.h similarity index 100% rename from CryptoPkg/Include/CrtLibSupport.h rename to CryptoPkg/Library/I= nclude/CrtLibSupport.h diff --git a/CryptoPkg/Include/assert.h b/CryptoPkg/Library/Include/assert.= h similarity index 100% rename from CryptoPkg/Include/assert.h rename to CryptoPkg/Library/Include/assert.h diff --git a/CryptoPkg/Include/ctype.h b/CryptoPkg/Library/Include/ctype.h similarity index 100% rename from CryptoPkg/Include/ctype.h rename to CryptoPkg/Library/Include/ctype.h diff --git a/CryptoPkg/Include/= errno.h b/CryptoPkg/Library/Include/errno.h similarity index 100% rename from CryptoPkg/Include/errno.h rename to CryptoPkg/Library/Include/errno.h diff --git a/CryptoPkg/Include/= internal/dso_conf.h b/CryptoPkg/Library/Include/internal/dso_conf.h similarity index 100% rename from CryptoPkg/Include/internal/dso_conf.h rename to CryptoPkg/Library/Include/internal/dso_conf.h diff --git a/CryptoPkg/Include/limits.h b/CryptoPkg/Library/Include/limits.= h similarity index 100% rename from CryptoPkg/Include/limits.h rename to CryptoPkg/Library/Include/limits.h diff --git a/CryptoPkg/Include/memory.h b/CryptoPkg/Library/Include/memory.= h similarity index 100% rename from CryptoPkg/Include/memory.h rename to CryptoPkg/Library/Include/memory.h diff --git a/CryptoPkg/Include/openssl/opensslconf.h b/CryptoPkg/Library/In= clude/openssl/opensslconf.h similarity index 100% rename from CryptoPkg/Include/openssl/opensslconf.h rename to CryptoPkg/Library/Include/openssl/opensslconf.h diff --git a/CryptoPkg/Include/stdarg.h b/CryptoPkg/Library/Include/stdarg.= h similarity index 100% rename from CryptoPkg/Include/stdarg.h rename to CryptoPkg/Library/Include/stdarg.h diff --git a/CryptoPkg/Include/stddef.h b/CryptoPkg/Library/Include/stddef.= h similarity index 100% rename from CryptoPkg/Include/stddef.h rename to CryptoPkg/Library/Include/stddef.h diff --git a/CryptoPkg/Include/stdio.h b/CryptoPkg/Library/Include/stdio.h similarity index 100% rename from CryptoPkg/Include/stdio.h rename to CryptoPkg/Library/Include/stdio.h diff --git a/CryptoPkg/Include/= stdlib.h b/CryptoPkg/Library/Include/stdlib.h similarity index 100% rename from CryptoPkg/Include/stdlib.h rename to CryptoPkg/Library/Include/stdlib.h diff --git a/CryptoPkg/Include/string.h b/CryptoPkg/Library/Include/string.= h similarity index 100% rename from CryptoPkg/Include/string.h rename to CryptoPkg/Library/Include/string.h diff --git a/CryptoPkg/Include/strings.h b/CryptoPkg/Library/Include/string= s.h similarity index 100% rename from CryptoPkg/Include/strings.h rename to CryptoPkg/Library/Include/strings.h diff --git a/CryptoPkg/Include/sys/time.h b/CryptoPkg/Library/Include/sys/t= ime.h similarity index 100% rename from CryptoPkg/Include/sys/time.h rename to CryptoPkg/Library/Includ= e/sys/time.h diff --git a/CryptoPkg/Include/sys/types.h b/CryptoPkg/Library/Include/sys/= types.h similarity index 100% rename from CryptoPkg/Include/sys/types.h rename to CryptoPkg/Library/Inclu= de/sys/types.h diff --git a/CryptoPkg/Include/syslog.h b/CryptoPkg/Library/Include/syslog.= h similarity index 100% rename from CryptoPkg/Include/syslog.h rename to CryptoPkg/Library/Include/syslog.h diff --git a/CryptoPkg/Include/time.h b/CryptoPkg/Library/Include/time.h similarity index 100% rename from CryptoPkg/Include/time.h rename to CryptoPkg/Library/Include/time.h diff --git a/CryptoPkg/Include/u= nistd.h b/CryptoPkg/Library/Include/unistd.h similarity index 100% rename from CryptoPkg/Include/unistd.h rename to CryptoPkg/Library/Include/unistd.h diff --git a/CryptoPkg/Library/OpensslLib/process_files.pl b/CryptoPkg/Libr= ary/OpensslLib/process_files.pl index 210811b9ed..716ecbf39a 100644 --- a/CryptoPkg/Library/OpensslLib/process_files.pl +++ b/CryptoPkg/Library/OpensslLib/process_files.pl @@ -214,7 +214,7 @@ print "Done!"; # print "\n--> Duplicating opensslconf.h into Include/openssl ... "; copy($= OPENSSL_PATH . "/include/openssl/opensslconf.h", - $OPENSSL_PATH . "/../../../Include/openssl/") || + $OPENSSL_PATH . "/../../Include/openssl/") || die "Cannot copy opensslconf.h!"; print "Done!\n"; =20 -- 2.12.2.windows.1