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 4259521ECCB0F for ; Wed, 20 Sep 2017 10:05:21 -0700 (PDT) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Sep 2017 10:08:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,421,1500966000"; d="scan'208,217";a="137575340" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 20 Sep 2017 10:08:25 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 20 Sep 2017 10:08:24 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 20 Sep 2017 10:04:55 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Thu, 21 Sep 2017 01:04:53 +0800 From: "Long, Qin" To: Laszlo Ersek , "Ye, Ting" , "Zhang, Chao B" CC: "edk2-devel@lists.01.org" Thread-Topic: [PATCH v2] CryptoPkg: Add new API to retrieve commonName of X.509 certificate Thread-Index: AQHTMi7d1Tb3ZWZZ9U6JJu9mzvsEGaK9+qWQ Date: Wed, 20 Sep 2017 17:04:53 +0000 Message-ID: References: <20170920160515.6792-1-qin.long@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: Re: [PATCH v2] CryptoPkg: Add new API to retrieve commonName of X.509 certificate 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: Wed, 20 Sep 2017 17:05:21 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 DQoNCkZyb206IExhc3psbyBFcnNlayBbbWFpbHRvOmxlcnNla0ByZWRoYXQuY29tXQ0KU2VudDog VGh1cnNkYXksIFNlcHRlbWJlciAyMSwgMjAxNyAxMjozOCBBTQ0KVG86IExvbmcsIFFpbiA8cWlu LmxvbmdAaW50ZWwuY29tPjsgWWUsIFRpbmcgPHRpbmcueWVAaW50ZWwuY29tPjsgWmhhbmcsIENo YW8gQiA8Y2hhby5iLnpoYW5nQGludGVsLmNvbT4NCkNjOiBlZGsyLWRldmVsQGxpc3RzLjAxLm9y Zw0KU3ViamVjdDogUmU6IFtQQVRDSCB2Ml0gQ3J5cHRvUGtnOiBBZGQgbmV3IEFQSSB0byByZXRy aWV2ZSBjb21tb25OYW1lIG9mIFguNTA5IGNlcnRpZmljYXRlDQoNCkhlbGxvIFFpbiwNCg0KT24g MDkvMjAvMTcgMTg6MDUsIFFpbiBMb25nIHdyb3RlOg0KPiB2MjogVXBkYXRlIGZ1bmN0aW9uIGlu dGVyZmFjZSB0byByZXR1cm4gUkVUVVJOX1NUQVRVUyB0byByZXByZXNlbnQNCj4gICAgIGRpZmZl cmVudCBlcnJvciBjYXNlcy4NCj4NCj4gQWRkIG9uZSBuZXcgQVBJIChYNTA5R2V0Q29tbW9uTmFt ZSgpKSB0byByZXRyaWV2ZSB0aGUgc3ViamVjdCBjb21tb25OYW1lDQo+IHN0cmluZyBmcm9tIG9u ZSBYLjUwOSBjZXJ0aWZpY2F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iZQ0KPiArICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMIGluIG9yZGVyIHRvIGRldGVybWluZSB0aGUg c2l6ZSBidWZmZXIgbmVlZGVkLg0KPiArICBAcGFyYW1baW4sb3V0XSAgQ29tbW9uTmFtZVNpemUg ICBUaGUgc2l6ZSBpbiBieXRlcyBvZiB0aGUgQ29tbW9uTmFtZSBidWZmZXIgb24gaW5wdXQsDQo+ ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuZCB0aGUgc2l6ZSBvZiBidWZm ZXIgcmV0dXJuZWQgQ29tbW9uTmFtZSBvbiBvdXRwdXQuDQo+ICsgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIElmIENvbW1vbk5hbWUgaXMgTlVMTCB0aGVuIHRoZSBhbW91bnQgb2Yg c3BhY2UgbmVlZGVkDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluIGJ1 ZmZlciAoaW5jbHVkaW5nIHRoZSBmaW5hbCBudWxsKSBpcyByZXR1cm5lZC4NCj4gKw0KPiArICBA cmV0dmFsIFJFVFVSTl9TVUNDRVNTICAgICAgICAgICBUaGUgY2VydGlmaWNhdGUgQ29tbW9uTmFt ZSByZXRyaWV2ZWQgc3VjY2Vzc2Z1bGx5Lg0KPiArICBAcmV0dmFsIFJFVFVSTl9JTlZBTElEX1BB UkFNRVRFUiBJZiBDZXJ0IGlzIE5VTEwuDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIElmIENvbW1vbk5hbWVTaXplIGlzIE5VTEwuDQo+ICsgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIElmIENlcnRpZmljYXRlIGlzIGludmFsaWQuDQo+ICsgIEByZXR2YWwg UkVUVVJOX05PVF9GT1VORCAgICAgICAgIElmIG5vIENvbW1vbk5hbWUgZW50cnkgZXhpc3RzLg0K PiArICBAcmV0dmFsIFJFVFVSTl9CVUZGRVJf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