From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=jiaxin.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 3AB8422361E4C for ; Thu, 8 Feb 2018 19:54:01 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2018 19:59:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,481,1511856000"; d="scan'208";a="29382222" Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.95]) by fmsmga001.fm.intel.com with ESMTP; 08 Feb 2018 19:59:44 -0800 From: Jiaxin Wu To: edk2-devel@lists.01.org Cc: Laszlo Ersek , Kinney Michael D , Zimmer Vincent , Yao Jiewen , Ye Ting , Fu Siyuan , Wu Jiaxin Date: Fri, 9 Feb 2018 11:59:37 +0800 Message-Id: <1518148778-14300-2-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1518148778-14300-1-git-send-email-jiaxin.wu@intel.com> References: <1518148778-14300-1-git-send-email-jiaxin.wu@intel.com> Subject: [Patch 1/2] NetworkPkg: Define one private variable for TLS CipherList configuration. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Feb 2018 03:54:01 -0000 This variable can be set by any platform that want to control its own preferred TlsCipherList for the later HTTPS session. The valid contents of variable must follow the TLS CipherList format defined in RFC 5246. The valid length of variable must be an integral multiple of 2. For example, if below cipher suites are preferred: CipherSuite TLS_RSA_WITH_AES_128_CBC_SHA256 = {0x00,0x3C} CipherSuite TLS_RSA_WITH_AES_256_CBC_SHA256 = {0x00,0x3D} Then, the contents of variable should be: {0x00,0x3C,0x00,0x3D} Cc: Laszlo Ersek Cc: Kinney Michael D Cc: Zimmer Vincent Cc: Yao Jiewen Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin --- NetworkPkg/Include/Guid/TlsCipherList.h | 38 +++++++++++++++++++++++++++++++++ NetworkPkg/NetworkPkg.dec | 3 +++ 2 files changed, 41 insertions(+) create mode 100644 NetworkPkg/Include/Guid/TlsCipherList.h diff --git a/NetworkPkg/Include/Guid/TlsCipherList.h b/NetworkPkg/Include/Guid/TlsCipherList.h new file mode 100644 index 0000000..e31b7bf --- /dev/null +++ b/NetworkPkg/Include/Guid/TlsCipherList.h @@ -0,0 +1,38 @@ +/** @file + This file defines the TlsCipherList variable for HTTPS to configure Tls Cipher List. + +Copyright (c) 2018, 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 that 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 __TLS_CIPHER_LIST_H__ +#define __TLS_CIPHER_LIST_H__ + +// +// Private Variable for HTTPS to configure Tls Cipher List. +// The valid contents of variable must follow the TLS CipherList format defined in RFC 5246. +// The valid length of variable must be an integral multiple of 2. +// For example, if below cipher suites are preferred: +// CipherSuite TLS_RSA_WITH_AES_128_CBC_SHA256 = {0x00,0x3C} +// CipherSuite TLS_RSA_WITH_AES_256_CBC_SHA256 = {0x00,0x3D} +// Then, the contents of variable should be: +// {0x00,0x3C,0x00,0x3D} +// +#define EDKII_TLS_CIPHER_LIST_GUID \ + { \ + 0x46ddb415, 0x5244, 0x49c7, { 0x93, 0x74, 0xf0, 0xe2, 0x98, 0xe7, 0xd3, 0x86 } \ + } + +#define EDKII_TLS_CIPHER_LIST_VARIABLE L"TlsCipherList" + +extern EFI_GUID gTlsCipherListGuid; + +#endif + diff --git a/NetworkPkg/NetworkPkg.dec b/NetworkPkg/NetworkPkg.dec index 902df37..bdf8361 100644 --- a/NetworkPkg/NetworkPkg.dec +++ b/NetworkPkg/NetworkPkg.dec @@ -44,10 +44,13 @@ gTlsAuthConfigGuid = { 0xb0eae4f8, 0x9a04, 0x4c6d, { 0xa7, 0x48, 0x79, 0x3d, 0xaa, 0xf, 0x65, 0xdf }} # Include/Guid/TlsAuthentication.h gEfiTlsCaCertificateGuid = { 0xfd2340D0, 0x3dab, 0x4349, { 0xa6, 0xc7, 0x3b, 0x4f, 0x12, 0xb4, 0x8e, 0xae }} + # Include/Guid/TlsCipherList.h + gTlsCipherListGuid = { 0x46ddb415, 0x5244, 0x49c7, { 0x93, 0x74, 0xf0, 0xe2, 0x98, 0xe7, 0xd3, 0x86 }} + [PcdsFixedAtBuild] ## The max attempt number will be created by iSCSI driver. # @Prompt Max attempt number. gEfiNetworkPkgTokenSpaceGuid.PcdMaxIScsiAttemptNumber|0x08|UINT8|0x0000000D -- 1.9.5.msysgit.1