From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web11.11981.1597331016946877029 for ; Thu, 13 Aug 2020 08:03:37 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=exqzXhWf; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: jiewen.yao@intel.com) IronPort-SDR: fewqiB9t98HV1sNSBTV6VVyq/WTk073KRrF4upw2VXvdLZ7PlPpUfz8dzPG4v6K1xCDOTwuf+B lHLMIRJdsoyw== X-IronPort-AV: E=McAfee;i="6000,8403,9712"; a="141861762" X-IronPort-AV: E=Sophos;i="5.76,308,1592895600"; d="scan'208";a="141861762" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Aug 2020 08:03:35 -0700 IronPort-SDR: hMa/UxAxtMbA2u4S2tBFs6RbC4OforMF5o3j1XzUo+rt0Zh+4sgosAZ72jVgAgun0PAfVNQqj5 0zIZsf04DIQA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,308,1592895600"; d="scan'208";a="291418100" Received: from fmsmsx603-2.cps.intel.com (HELO fmsmsx603.amr.corp.intel.com) ([10.18.84.213]) by orsmga003.jf.intel.com with ESMTP; 13 Aug 2020 08:03:35 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 13 Aug 2020 08:03:34 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 13 Aug 2020 08:03:34 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.102) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 13 Aug 2020 08:03:33 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kL2/Byy2GiJ4CGuQw/m8i7utK0UQwpZ2NEh9+cx2DwZVzn+VkuiNQ6Gva6Y3YjYuvu0oBxR72txHKCOt58MJkxmuubdaye2F6H0aFoxs6KQLqR3OSwHxIuTcyw9nJtJB6HwOjPk75AH9e1uHIcv/yjw66YhlrXQlJvoID6evPINpnpS0dOjl1kpPKlk8qOefkcyEyEHLrPWHUvrcC6/8DS+5S+0A5htIOCaRg+zc5FF1gntj1fUyvv+V6UqEPI2QWi3baSlg/cM1dbQYenLKG9l9p0fhZk/R/3IiDiu4PLXSo5rlLMwjEItJp5TS9RMlpyMl/P6cVekavY4pLLleAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5OsAhHGGWkYb6h4Vid193Lgv39+x+JxaDN7fJfUo9co=; b=HWNJmC/DNYlcFUfMpFrya75mqGbYmZPqnn7GWYNAnp/zHwiQe2mp98HCWhNlM0fgxHsC9YVTkZG7DANsWnXdXgL6c/kDiM6vH7s1lRk/wi15AdEkyYyjIU5ruy97QlyQlUX/Z/XvyVQ09acGjY3COjFO0zmqGuxyZOQqRAunEVcNgsbhuV0Oq9upIKGQgiKo+jQNwiwR9xD9832b7nQPg9RnbPX3ExudChWOCV4tIodPRTDXIAYjeYx7L6jF1A/A06joR+suW+5hcV7/ZZQ2uOfkbWdOl1+T79xJDw6NNKuDK9r43w761QWN5BIjb36KQl2ccw0xEnmoggUbSn1M9A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5OsAhHGGWkYb6h4Vid193Lgv39+x+JxaDN7fJfUo9co=; b=exqzXhWfvEyttYWH+Y1E+eAmPGp5Vnt19Y3dbmxaEVKL1qh+DjEmuqiwpBxXxFtX5hNyUrA/e6CpuLyl7JZE2SHjqY0kr+ev/+3zSVHVT4GdEUlIkmHxZ2johpPvyl0MFWp5Oca7OHIEnt3IZ7VOvH7rOwcoyn2Mp4Bqa8EKi40= Received: from CY4PR11MB1288.namprd11.prod.outlook.com (2603:10b6:903:23::8) by CY4PR11MB1286.namprd11.prod.outlook.com (2603:10b6:903:2e::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.16; Thu, 13 Aug 2020 15:03:31 +0000 Received: from CY4PR11MB1288.namprd11.prod.outlook.com ([fe80::163:9209:a92d:812]) by CY4PR11MB1288.namprd11.prod.outlook.com ([fe80::163:9209:a92d:812%6]) with mapi id 15.20.3283.018; Thu, 13 Aug 2020 15:03:31 +0000 From: "Yao, Jiewen" To: "Zurcher, Christopher J" , "devel@edk2.groups.io" CC: "Wang, Jian J" , "Lu, XiaoyuX" , Ard Biesheuvel Subject: Re: [PATCH v2 1/2] CryptoPkg/OpensslLib: Add native instruction support for X64 Thread-Topic: [PATCH v2 1/2] CryptoPkg/OpensslLib: Add native instruction support for X64 Thread-Index: AQHWafWk4Fp7/vSvg0yxS46YX8nrdKk2MGcg Date: Thu, 13 Aug 2020 15:03:31 +0000 Message-ID: References: <20200804002429.3897-1-christopher.j.zurcher@intel.com> <20200804002429.3897-2-christopher.j.zurcher@intel.com> In-Reply-To: <20200804002429.3897-2-christopher.j.zurcher@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTQ3N2Q5YzctNTQwOC00YTA5LTg0YWItOGY0OTdlNTg2ZjJiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNHhTRE9uS3JZakx2cTRYdnhJTHY0dU13cDlCajZGR3lmY3MrXC9ZUXlBYWhcLzhib2ZxMldFSERMT0RsU3JQYWJlIn0= x-ctpclassification: CTP_NT dlp-version: 11.5.1.3 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.198] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 35104f37-3259-4f16-82a4-08d83f9a0aee x-ms-traffictypediagnostic: CY4PR11MB1286: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:494; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: pBmjdOLxZjv3sOtclSKcTBYc+iTQ0IDR5U2Exm433OZGmo4LD4h2561jJl8CXRtDPeuQX9lvCnJ/dtgy3pS7clN4+/fT8T8qkFenRt1xAFxsUVzMwqzw+dTS0LtkZpWiHHFIyr5HC0vRbEMrfgqjOXn83dfp0r4gfv2cncd5LCOvynx34gCozHNBVxTG4Sxr5xixL5RpU1XK79rGwlBnEdv8vVkdetzlcBKnkdrmJJOEapSrERw7vr0QCy6KN1VoO9kpEz4aaCe/DHJfeeedTCvS/FEuyTtXRl7O80+Dq9tlVuY4zLOLUR3n0vWqyL0Lee6a1uQHjF8UuVDs9IrVm92yiNPbPT5GwP9Lg8nDtQQO4zxIGa5zozx/MgsCPQOHCnSvuWbamNqYrmvP0fHwhVDx/YLT2OMQx3SmWyAh5n6qGGyDOpFNqTLgkJLhh+BnQq3y1WjmBFjmV4kSe+kGJA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR11MB1288.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(396003)(136003)(346002)(366004)(376002)(83380400001)(9686003)(52536014)(33656002)(316002)(55016002)(54906003)(966005)(4326008)(478600001)(7696005)(30864003)(110136005)(86362001)(26005)(64756008)(66446008)(19627235002)(66946007)(5660300002)(76116006)(6506007)(2906002)(66556008)(66476007)(53546011)(8676002)(71200400001)(8936002)(186003)(559001)(579004)(545624004);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: XZ2iAWnffjxNIriiO7jtG5Tw9RTWRYoWyB/0CpkYTwejRFb8L7/CVdCVJiEDlf9/UybQcyL8eepHyR1Uf2zQ1djABugC4eL6PL/2ANbgrGwi5Ip9PAq4OOeFX6Qj5rdtJLpK4VnveW9twF9SU4SVh7mjUbJAPzHUCKA8Ry/5uK0XCuHQoh7u83kRxHkqA2jbDd76sfncLXCF/1U5e4ePPBvIhwOoSi9hVDpPScEEB/94QD+pXqxpJQbxihNalRvYRoAxZcN03TJlP1L1ZUqoAG9PvlOdGFJZwOK/XyXN6OeSIeX7bB/lUbWFDBdsn7KP+ZqdO8tXoE+iUi8d7XyJJcfY94PFMawAKm/Ljkq8rAW4Q+uK0ftxo7uTW+10NFd0EDy6RkuXdEmtckXl/0imxiDEDZr33hKJ7qCtItEpMcH2PZ1rmyw6/cUvS6X+0lzkIVhBEKfO5PgvOJPF6sfXE5XMQY5qkhkjwk+CjcT9USmtvoTGiGoumsZJYGdlMDFtbwxe25JTftOUU+iBVMQ5QoWfM4txUK8B4ckjahi8OrMP8U4MtSKo9kfrn3BqBBSINt/pql/XuDgEp8U88njng3uVjKvmkHGv968oklKI2Zvn51+yDLpivfRFehRk4RRhIF66QprUTq8tXQYM6frBgA== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CY4PR11MB1288.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 35104f37-3259-4f16-82a4-08d83f9a0aee X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Aug 2020 15:03:31.0783 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vCARXFEva3Uvb3g0Wu6qw6cPo3OhL4gtncpVs/0N3B8CPJJd5WjmAoIv63SrWhqpjaawIEmfLHICFlBF9vg/LA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1286 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Christopher Thanks. 1) Would you please help me understand more on "ApiHooks.c contains a stub = function for a Windows API call" ? Why we need this? If it is compiler specific in openssl, should we submit patch to openssl to= exclude this with OPENSSL_SYS_UEFI? That should be a cleaner solution for = UEFI. 2) Would you please describe what compiler you have tried? VS? GCC? LLVM? 3) Would you please describe what unit test you have done? Thank you Yao Jiewen > -----Original Message----- > From: Zurcher, Christopher J > Sent: Tuesday, August 4, 2020 8:24 AM > To: devel@edk2.groups.io > Cc: Yao, Jiewen ; Wang, Jian J ; > Lu, XiaoyuX ; Ard Biesheuvel > Subject: [PATCH v2 1/2] CryptoPkg/OpensslLib: Add native instruction supp= ort > for X64 >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2507 >=20 > Adding OpensslLibX64.inf and modifying process_files.pl to process this > file and generate the necessary assembly files. > ApiHooks.c contains a stub function for a Windows API call. > uefi-asm.conf contains the limited assembly configurations for OpenSSL. >=20 > Cc: Jiewen Yao > Cc: Jian J Wang > Cc: Xiaoyu Lu > Cc: Ard Biesheuvel > Signed-off-by: Christopher J Zurcher > --- > CryptoPkg/Library/OpensslLib/OpensslLib.inf | 2 +- > CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 2 +- > CryptoPkg/Library/OpensslLib/OpensslLibX64.inf | 656 > ++++++++++++++++++++ > CryptoPkg/Library/Include/openssl/opensslconf.h | 3 - > CryptoPkg/Library/OpensslLib/ApiHooks.c | 18 + > CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c | 34 + > CryptoPkg/Library/OpensslLib/process_files.pl | 223 +++++-- > CryptoPkg/Library/OpensslLib/uefi-asm.conf | 15 + > 8 files changed, 903 insertions(+), 50 deletions(-) >=20 > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf > b/CryptoPkg/Library/OpensslLib/OpensslLib.inf > index dbbe5386a1..bd62d86936 100644 > --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf > +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf > @@ -16,7 +16,7 @@ > VERSION_STRING =3D 1.0 >=20 > LIBRARY_CLASS =3D OpensslLib >=20 > DEFINE OPENSSL_PATH =3D openssl >=20 > - DEFINE OPENSSL_FLAGS =3D -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRIN= T > -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE >=20 > + DEFINE OPENSSL_FLAGS =3D -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRIN= T > -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE - > DOPENSSL_NO_ASM >=20 >=20 >=20 > # >=20 > # VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 >=20 > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > index 616ccd9f62..2b7324a990 100644 > --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > @@ -16,7 +16,7 @@ > VERSION_STRING =3D 1.0 >=20 > LIBRARY_CLASS =3D OpensslLib >=20 > DEFINE OPENSSL_PATH =3D openssl >=20 > - DEFINE OPENSSL_FLAGS =3D -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRIN= T > -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE >=20 > + DEFINE OPENSSL_FLAGS =3D -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRIN= T > -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE - > DOPENSSL_NO_ASM >=20 >=20 >=20 > # >=20 > # VALID_ARCHITECTURES =3D IA32 X64 ARM AARCH64 >=20 > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibX64.inf > b/CryptoPkg/Library/OpensslLib/OpensslLibX64.inf > new file mode 100644 > index 0000000000..825eea0254 > --- /dev/null > +++ b/CryptoPkg/Library/OpensslLib/OpensslLibX64.inf > @@ -0,0 +1,656 @@ > +## @file >=20 > +# This module provides OpenSSL Library implementation. >=20 > +# >=20 > +# Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved. >=20 > +# (C) Copyright 2020 Hewlett Packard Enterprise Development LP
>=20 > +# SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > +# >=20 > +## >=20 > + >=20 > +[Defines] >=20 > + INF_VERSION =3D 0x00010005 >=20 > + BASE_NAME =3D OpensslLibX64 >=20 > + MODULE_UNI_FILE =3D OpensslLib.uni >=20 > + FILE_GUID =3D 18125E50-0117-4DD0-BE54-4784AD995FE= F >=20 > + MODULE_TYPE =3D BASE >=20 > + VERSION_STRING =3D 1.0 >=20 > + LIBRARY_CLASS =3D OpensslLib >=20 > + DEFINE OPENSSL_PATH =3D openssl >=20 > + DEFINE OPENSSL_FLAGS =3D -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRIN= T > -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE >=20 > + DEFINE OPENSSL_FLAGS_CONFIG =3D -DOPENSSL_CPUID_OBJ -DSHA1_ASM - > DSHA256_ASM -DSHA512_ASM -DAESNI_ASM -DVPAES_ASM -DGHASH_ASM >=20 > + CONSTRUCTOR =3D OpensslLibConstructor >=20 > + >=20 > +# >=20 > +# VALID_ARCHITECTURES =3D X64 >=20 > +# >=20 > + >=20 > +[Sources] >=20 > + OpensslLibConstructor.c >=20 > + $(OPENSSL_PATH)/e_os.h >=20 > + $(OPENSSL_PATH)/ms/uplink.h >=20 > +# Autogenerated files list starts here >=20 > + X64/crypto/aes/aesni-mb-x86_64.nasm >=20 > + X64/crypto/aes/aesni-sha1-x86_64.nasm >=20 > + X64/crypto/aes/aesni-sha256-x86_64.nasm >=20 > + X64/crypto/aes/aesni-x86_64.nasm >=20 > + X64/crypto/aes/vpaes-x86_64.nasm >=20 > + X64/crypto/modes/ghash-x86_64.nasm >=20 > + X64/crypto/sha/sha1-mb-x86_64.nasm >=20 > + X64/crypto/sha/sha1-x86_64.nasm >=20 > + X64/crypto/sha/sha256-mb-x86_64.nasm >=20 > + X64/crypto/sha/sha256-x86_64.nasm >=20 > + X64/crypto/sha/sha512-x86_64.nasm >=20 > + X64/crypto/x86_64cpuid.nasm >=20 > + $(OPENSSL_PATH)/crypto/aes/aes_cbc.c >=20 > + $(OPENSSL_PATH)/crypto/aes/aes_cfb.c >=20 > + $(OPENSSL_PATH)/crypto/aes/aes_core.c >=20 > + $(OPENSSL_PATH)/crypto/aes/aes_ige.c >=20 > + $(OPENSSL_PATH)/crypto/aes/aes_misc.c >=20 > + $(OPENSSL_PATH)/crypto/aes/aes_ofb.c >=20 > + $(OPENSSL_PATH)/crypto/aes/aes_wrap.c >=20 > + $(OPENSSL_PATH)/crypto/aria/aria.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_bitstr.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_d2i_fp.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_digest.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_dup.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_gentm.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_i2d_fp.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_int.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_mbstr.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_object.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_octet.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_print.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_sign.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_strex.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_strnid.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_time.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_type.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_utctm.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_utf8.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/a_verify.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/ameth_lib.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/asn1_err.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/asn1_gen.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/asn1_item_list.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/asn1_lib.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/asn1_par.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/asn_mime.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/asn_moid.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/asn_mstbl.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/asn_pack.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/bio_asn1.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/bio_ndef.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/d2i_pr.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/d2i_pu.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/evp_asn1.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/f_int.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/f_string.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/i2d_pr.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/i2d_pu.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/n_pkey.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/nsseq.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/p5_pbe.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/p5_pbev2.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/p5_scrypt.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/p8_pkey.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/t_bitst.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/t_pkey.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/t_spki.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/tasn_dec.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/tasn_enc.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/tasn_fre.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/tasn_new.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/tasn_prn.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/tasn_scn.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/tasn_typ.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/tasn_utl.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/x_algor.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/x_bignum.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/x_info.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/x_int64.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/x_long.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/x_pkey.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/x_sig.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/x_spki.c >=20 > + $(OPENSSL_PATH)/crypto/asn1/x_val.c >=20 > + $(OPENSSL_PATH)/crypto/async/arch/async_null.c >=20 > + $(OPENSSL_PATH)/crypto/async/arch/async_posix.c >=20 > + $(OPENSSL_PATH)/crypto/async/arch/async_win.c >=20 > + $(OPENSSL_PATH)/crypto/async/async.c >=20 > + $(OPENSSL_PATH)/crypto/async/async_err.c >=20 > + $(OPENSSL_PATH)/crypto/async/async_wait.c >=20 > + $(OPENSSL_PATH)/crypto/bio/b_addr.c >=20 > + $(OPENSSL_PATH)/crypto/bio/b_dump.c >=20 > + $(OPENSSL_PATH)/crypto/bio/b_sock.c >=20 > + $(OPENSSL_PATH)/crypto/bio/b_sock2.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bf_buff.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bf_lbuf.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bf_nbio.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bf_null.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bio_cb.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bio_err.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bio_lib.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bio_meth.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bss_acpt.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bss_bio.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bss_conn.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bss_dgram.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bss_fd.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bss_file.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bss_log.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bss_mem.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bss_null.c >=20 > + $(OPENSSL_PATH)/crypto/bio/bss_sock.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_add.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_asm.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_blind.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_const.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_ctx.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_depr.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_dh.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_div.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_err.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_exp.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_exp2.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_gcd.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_gf2m.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_intern.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_kron.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_lib.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_mod.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_mont.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_mpi.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_mul.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_nist.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_prime.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_print.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_rand.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_recp.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_shift.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_sqr.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_sqrt.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_srp.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_word.c >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_x931p.c >=20 > + $(OPENSSL_PATH)/crypto/buffer/buf_err.c >=20 > + $(OPENSSL_PATH)/crypto/buffer/buffer.c >=20 > + $(OPENSSL_PATH)/crypto/cmac/cm_ameth.c >=20 > + $(OPENSSL_PATH)/crypto/cmac/cm_pmeth.c >=20 > + $(OPENSSL_PATH)/crypto/cmac/cmac.c >=20 > + $(OPENSSL_PATH)/crypto/comp/c_zlib.c >=20 > + $(OPENSSL_PATH)/crypto/comp/comp_err.c >=20 > + $(OPENSSL_PATH)/crypto/comp/comp_lib.c >=20 > + $(OPENSSL_PATH)/crypto/conf/conf_api.c >=20 > + $(OPENSSL_PATH)/crypto/conf/conf_def.c >=20 > + $(OPENSSL_PATH)/crypto/conf/conf_err.c >=20 > + $(OPENSSL_PATH)/crypto/conf/conf_lib.c >=20 > + $(OPENSSL_PATH)/crypto/conf/conf_mall.c >=20 > + $(OPENSSL_PATH)/crypto/conf/conf_mod.c >=20 > + $(OPENSSL_PATH)/crypto/conf/conf_sap.c >=20 > + $(OPENSSL_PATH)/crypto/conf/conf_ssl.c >=20 > + $(OPENSSL_PATH)/crypto/cpt_err.c >=20 > + $(OPENSSL_PATH)/crypto/cryptlib.c >=20 > + $(OPENSSL_PATH)/crypto/ctype.c >=20 > + $(OPENSSL_PATH)/crypto/cversion.c >=20 > + $(OPENSSL_PATH)/crypto/dh/dh_ameth.c >=20 > + $(OPENSSL_PATH)/crypto/dh/dh_asn1.c >=20 > + $(OPENSSL_PATH)/crypto/dh/dh_check.c >=20 > + $(OPENSSL_PATH)/crypto/dh/dh_depr.c >=20 > + $(OPENSSL_PATH)/crypto/dh/dh_err.c >=20 > + $(OPENSSL_PATH)/crypto/dh/dh_gen.c >=20 > + $(OPENSSL_PATH)/crypto/dh/dh_kdf.c >=20 > + $(OPENSSL_PATH)/crypto/dh/dh_key.c >=20 > + $(OPENSSL_PATH)/crypto/dh/dh_lib.c >=20 > + $(OPENSSL_PATH)/crypto/dh/dh_meth.c >=20 > + $(OPENSSL_PATH)/crypto/dh/dh_pmeth.c >=20 > + $(OPENSSL_PATH)/crypto/dh/dh_prn.c >=20 > + $(OPENSSL_PATH)/crypto/dh/dh_rfc5114.c >=20 > + $(OPENSSL_PATH)/crypto/dh/dh_rfc7919.c >=20 > + $(OPENSSL_PATH)/crypto/dso/dso_dl.c >=20 > + $(OPENSSL_PATH)/crypto/dso/dso_dlfcn.c >=20 > + $(OPENSSL_PATH)/crypto/dso/dso_err.c >=20 > + $(OPENSSL_PATH)/crypto/dso/dso_lib.c >=20 > + $(OPENSSL_PATH)/crypto/dso/dso_openssl.c >=20 > + $(OPENSSL_PATH)/crypto/dso/dso_vms.c >=20 > + $(OPENSSL_PATH)/crypto/dso/dso_win32.c >=20 > + $(OPENSSL_PATH)/crypto/ebcdic.c >=20 > + $(OPENSSL_PATH)/crypto/err/err.c >=20 > + $(OPENSSL_PATH)/crypto/err/err_prn.c >=20 > + $(OPENSSL_PATH)/crypto/evp/bio_b64.c >=20 > + $(OPENSSL_PATH)/crypto/evp/bio_enc.c >=20 > + $(OPENSSL_PATH)/crypto/evp/bio_md.c >=20 > + $(OPENSSL_PATH)/crypto/evp/bio_ok.c >=20 > + $(OPENSSL_PATH)/crypto/evp/c_allc.c >=20 > + $(OPENSSL_PATH)/crypto/evp/c_alld.c >=20 > + $(OPENSSL_PATH)/crypto/evp/cmeth_lib.c >=20 > + $(OPENSSL_PATH)/crypto/evp/digest.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_aes.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_aes_cbc_hmac_sha1.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_aes_cbc_hmac_sha256.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_aria.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_bf.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_camellia.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_cast.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_chacha20_poly1305.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_des.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_des3.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_idea.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_null.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_old.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_rc2.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_rc4.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_rc4_hmac_md5.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_rc5.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_seed.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_sm4.c >=20 > + $(OPENSSL_PATH)/crypto/evp/e_xcbc_d.c >=20 > + $(OPENSSL_PATH)/crypto/evp/encode.c >=20 > + $(OPENSSL_PATH)/crypto/evp/evp_cnf.c >=20 > + $(OPENSSL_PATH)/crypto/evp/evp_enc.c >=20 > + $(OPENSSL_PATH)/crypto/evp/evp_err.c >=20 > + $(OPENSSL_PATH)/crypto/evp/evp_key.c >=20 > + $(OPENSSL_PATH)/crypto/evp/evp_lib.c >=20 > + $(OPENSSL_PATH)/crypto/evp/evp_pbe.c >=20 > + $(OPENSSL_PATH)/crypto/evp/evp_pkey.c >=20 > + $(OPENSSL_PATH)/crypto/evp/m_md2.c >=20 > + $(OPENSSL_PATH)/crypto/evp/m_md4.c >=20 > + $(OPENSSL_PATH)/crypto/evp/m_md5.c >=20 > + $(OPENSSL_PATH)/crypto/evp/m_md5_sha1.c >=20 > + $(OPENSSL_PATH)/crypto/evp/m_mdc2.c >=20 > + $(OPENSSL_PATH)/crypto/evp/m_null.c >=20 > + $(OPENSSL_PATH)/crypto/evp/m_ripemd.c >=20 > + $(OPENSSL_PATH)/crypto/evp/m_sha1.c >=20 > + $(OPENSSL_PATH)/crypto/evp/m_sha3.c >=20 > + $(OPENSSL_PATH)/crypto/evp/m_sigver.c >=20 > + $(OPENSSL_PATH)/crypto/evp/m_wp.c >=20 > + $(OPENSSL_PATH)/crypto/evp/names.c >=20 > + $(OPENSSL_PATH)/crypto/evp/p5_crpt.c >=20 > + $(OPENSSL_PATH)/crypto/evp/p5_crpt2.c >=20 > + $(OPENSSL_PATH)/crypto/evp/p_dec.c >=20 > + $(OPENSSL_PATH)/crypto/evp/p_enc.c >=20 > + $(OPENSSL_PATH)/crypto/evp/p_lib.c >=20 > + $(OPENSSL_PATH)/crypto/evp/p_open.c >=20 > + $(OPENSSL_PATH)/crypto/evp/p_seal.c >=20 > + $(OPENSSL_PATH)/crypto/evp/p_sign.c >=20 > + $(OPENSSL_PATH)/crypto/evp/p_verify.c >=20 > + $(OPENSSL_PATH)/crypto/evp/pbe_scrypt.c >=20 > + $(OPENSSL_PATH)/crypto/evp/pmeth_fn.c >=20 > + $(OPENSSL_PATH)/crypto/evp/pmeth_gn.c >=20 > + $(OPENSSL_PATH)/crypto/evp/pmeth_lib.c >=20 > + $(OPENSSL_PATH)/crypto/ex_data.c >=20 > + $(OPENSSL_PATH)/crypto/getenv.c >=20 > + $(OPENSSL_PATH)/crypto/hmac/hm_ameth.c >=20 > + $(OPENSSL_PATH)/crypto/hmac/hm_pmeth.c >=20 > + $(OPENSSL_PATH)/crypto/hmac/hmac.c >=20 > + $(OPENSSL_PATH)/crypto/init.c >=20 > + $(OPENSSL_PATH)/crypto/kdf/hkdf.c >=20 > + $(OPENSSL_PATH)/crypto/kdf/kdf_err.c >=20 > + $(OPENSSL_PATH)/crypto/kdf/scrypt.c >=20 > + $(OPENSSL_PATH)/crypto/kdf/tls1_prf.c >=20 > + $(OPENSSL_PATH)/crypto/lhash/lh_stats.c >=20 > + $(OPENSSL_PATH)/crypto/lhash/lhash.c >=20 > + $(OPENSSL_PATH)/crypto/md5/md5_dgst.c >=20 > + $(OPENSSL_PATH)/crypto/md5/md5_one.c >=20 > + $(OPENSSL_PATH)/crypto/mem.c >=20 > + $(OPENSSL_PATH)/crypto/mem_dbg.c >=20 > + $(OPENSSL_PATH)/crypto/mem_sec.c >=20 > + $(OPENSSL_PATH)/crypto/modes/cbc128.c >=20 > + $(OPENSSL_PATH)/crypto/modes/ccm128.c >=20 > + $(OPENSSL_PATH)/crypto/modes/cfb128.c >=20 > + $(OPENSSL_PATH)/crypto/modes/ctr128.c >=20 > + $(OPENSSL_PATH)/crypto/modes/cts128.c >=20 > + $(OPENSSL_PATH)/crypto/modes/gcm128.c >=20 > + $(OPENSSL_PATH)/crypto/modes/ocb128.c >=20 > + $(OPENSSL_PATH)/crypto/modes/ofb128.c >=20 > + $(OPENSSL_PATH)/crypto/modes/wrap128.c >=20 > + $(OPENSSL_PATH)/crypto/modes/xts128.c >=20 > + $(OPENSSL_PATH)/crypto/o_dir.c >=20 > + $(OPENSSL_PATH)/crypto/o_fips.c >=20 > + $(OPENSSL_PATH)/crypto/o_fopen.c >=20 > + $(OPENSSL_PATH)/crypto/o_init.c >=20 > + $(OPENSSL_PATH)/crypto/o_str.c >=20 > + $(OPENSSL_PATH)/crypto/o_time.c >=20 > + $(OPENSSL_PATH)/crypto/objects/o_names.c >=20 > + $(OPENSSL_PATH)/crypto/objects/obj_dat.c >=20 > + $(OPENSSL_PATH)/crypto/objects/obj_err.c >=20 > + $(OPENSSL_PATH)/crypto/objects/obj_lib.c >=20 > + $(OPENSSL_PATH)/crypto/objects/obj_xref.c >=20 > + $(OPENSSL_PATH)/crypto/ocsp/ocsp_asn.c >=20 > + $(OPENSSL_PATH)/crypto/ocsp/ocsp_cl.c >=20 > + $(OPENSSL_PATH)/crypto/ocsp/ocsp_err.c >=20 > + $(OPENSSL_PATH)/crypto/ocsp/ocsp_ext.c >=20 > + $(OPENSSL_PATH)/crypto/ocsp/ocsp_ht.c >=20 > + $(OPENSSL_PATH)/crypto/ocsp/ocsp_lib.c >=20 > + $(OPENSSL_PATH)/crypto/ocsp/ocsp_prn.c >=20 > + $(OPENSSL_PATH)/crypto/ocsp/ocsp_srv.c >=20 > + $(OPENSSL_PATH)/crypto/ocsp/ocsp_vfy.c >=20 > + $(OPENSSL_PATH)/crypto/ocsp/v3_ocsp.c >=20 > + $(OPENSSL_PATH)/crypto/pem/pem_all.c >=20 > + $(OPENSSL_PATH)/crypto/pem/pem_err.c >=20 > + $(OPENSSL_PATH)/crypto/pem/pem_info.c >=20 > + $(OPENSSL_PATH)/crypto/pem/pem_lib.c >=20 > + $(OPENSSL_PATH)/crypto/pem/pem_oth.c >=20 > + $(OPENSSL_PATH)/crypto/pem/pem_pk8.c >=20 > + $(OPENSSL_PATH)/crypto/pem/pem_pkey.c >=20 > + $(OPENSSL_PATH)/crypto/pem/pem_sign.c >=20 > + $(OPENSSL_PATH)/crypto/pem/pem_x509.c >=20 > + $(OPENSSL_PATH)/crypto/pem/pem_xaux.c >=20 > + $(OPENSSL_PATH)/crypto/pem/pvkfmt.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_add.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_asn.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_attr.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_crpt.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_crt.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_decr.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_init.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_key.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_kiss.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_mutl.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_npas.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_p8d.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_p8e.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_sbag.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_utl.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/pk12err.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs7/bio_pk7.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs7/pk7_asn1.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs7/pk7_attr.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs7/pk7_doit.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs7/pk7_lib.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs7/pk7_mime.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs7/pk7_smime.c >=20 > + $(OPENSSL_PATH)/crypto/pkcs7/pkcs7err.c >=20 > + $(OPENSSL_PATH)/crypto/rand/drbg_ctr.c >=20 > + $(OPENSSL_PATH)/crypto/rand/drbg_lib.c >=20 > + $(OPENSSL_PATH)/crypto/rand/rand_egd.c >=20 > + $(OPENSSL_PATH)/crypto/rand/rand_err.c >=20 > + $(OPENSSL_PATH)/crypto/rand/rand_lib.c >=20 > + $(OPENSSL_PATH)/crypto/rand/rand_unix.c >=20 > + $(OPENSSL_PATH)/crypto/rand/rand_vms.c >=20 > + $(OPENSSL_PATH)/crypto/rand/rand_win.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_ameth.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_asn1.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_chk.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_crpt.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_depr.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_err.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_gen.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_lib.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_meth.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_mp.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_none.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_oaep.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_ossl.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_pk1.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_pmeth.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_prn.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_pss.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_saos.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_sign.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_ssl.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_x931.c >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_x931g.c >=20 > + $(OPENSSL_PATH)/crypto/sha/keccak1600.c >=20 > + $(OPENSSL_PATH)/crypto/sha/sha1_one.c >=20 > + $(OPENSSL_PATH)/crypto/sha/sha1dgst.c >=20 > + $(OPENSSL_PATH)/crypto/sha/sha256.c >=20 > + $(OPENSSL_PATH)/crypto/sha/sha512.c >=20 > + $(OPENSSL_PATH)/crypto/siphash/siphash.c >=20 > + $(OPENSSL_PATH)/crypto/siphash/siphash_ameth.c >=20 > + $(OPENSSL_PATH)/crypto/siphash/siphash_pmeth.c >=20 > + $(OPENSSL_PATH)/crypto/sm3/m_sm3.c >=20 > + $(OPENSSL_PATH)/crypto/sm3/sm3.c >=20 > + $(OPENSSL_PATH)/crypto/sm4/sm4.c >=20 > + $(OPENSSL_PATH)/crypto/stack/stack.c >=20 > + $(OPENSSL_PATH)/crypto/threads_none.c >=20 > + $(OPENSSL_PATH)/crypto/threads_pthread.c >=20 > + $(OPENSSL_PATH)/crypto/threads_win.c >=20 > + $(OPENSSL_PATH)/crypto/txt_db/txt_db.c >=20 > + $(OPENSSL_PATH)/crypto/ui/ui_err.c >=20 > + $(OPENSSL_PATH)/crypto/ui/ui_lib.c >=20 > + $(OPENSSL_PATH)/crypto/ui/ui_null.c >=20 > + $(OPENSSL_PATH)/crypto/ui/ui_openssl.c >=20 > + $(OPENSSL_PATH)/crypto/ui/ui_util.c >=20 > + $(OPENSSL_PATH)/crypto/uid.c >=20 > + $(OPENSSL_PATH)/crypto/x509/by_dir.c >=20 > + $(OPENSSL_PATH)/crypto/x509/by_file.c >=20 > + $(OPENSSL_PATH)/crypto/x509/t_crl.c >=20 > + $(OPENSSL_PATH)/crypto/x509/t_req.c >=20 > + $(OPENSSL_PATH)/crypto/x509/t_x509.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_att.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_cmp.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_d2.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_def.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_err.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_ext.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_lu.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_meth.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_obj.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_r2x.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_req.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_set.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_trs.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_txt.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_v3.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_vfy.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_vpm.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509cset.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509name.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509rset.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509spki.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x509type.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x_all.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x_attrib.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x_crl.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x_exten.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x_name.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x_pubkey.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x_req.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x_x509.c >=20 > + $(OPENSSL_PATH)/crypto/x509/x_x509a.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/pcy_cache.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/pcy_data.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/pcy_lib.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/pcy_map.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/pcy_node.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/pcy_tree.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_addr.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_admis.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_akey.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_akeya.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_alt.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_asid.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_bcons.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_bitst.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_conf.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_cpols.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_crld.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_enum.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_extku.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_genn.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_ia5.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_info.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_int.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_lib.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_ncons.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_pci.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_pcia.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_pcons.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_pku.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_pmaps.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_prn.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_purp.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_skey.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_sxnet.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_tlsf.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_utl.c >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3err.c >=20 > + $(OPENSSL_PATH)/crypto/arm_arch.h >=20 > + $(OPENSSL_PATH)/crypto/mips_arch.h >=20 > + $(OPENSSL_PATH)/crypto/ppc_arch.h >=20 > + $(OPENSSL_PATH)/crypto/s390x_arch.h >=20 > + $(OPENSSL_PATH)/crypto/sparc_arch.h >=20 > + $(OPENSSL_PATH)/crypto/vms_rms.h >=20 > + $(OPENSSL_PATH)/crypto/aes/aes_local.h >=20 > + $(OPENSSL_PATH)/crypto/asn1/asn1_item_list.h >=20 > + $(OPENSSL_PATH)/crypto/asn1/asn1_local.h >=20 > + $(OPENSSL_PATH)/crypto/asn1/charmap.h >=20 > + $(OPENSSL_PATH)/crypto/asn1/standard_methods.h >=20 > + $(OPENSSL_PATH)/crypto/asn1/tbl_standard.h >=20 > + $(OPENSSL_PATH)/crypto/async/async_local.h >=20 > + $(OPENSSL_PATH)/crypto/async/arch/async_null.h >=20 > + $(OPENSSL_PATH)/crypto/async/arch/async_posix.h >=20 > + $(OPENSSL_PATH)/crypto/async/arch/async_win.h >=20 > + $(OPENSSL_PATH)/crypto/bio/bio_local.h >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_local.h >=20 > + $(OPENSSL_PATH)/crypto/bn/bn_prime.h >=20 > + $(OPENSSL_PATH)/crypto/bn/rsaz_exp.h >=20 > + $(OPENSSL_PATH)/crypto/comp/comp_local.h >=20 > + $(OPENSSL_PATH)/crypto/conf/conf_def.h >=20 > + $(OPENSSL_PATH)/crypto/conf/conf_local.h >=20 > + $(OPENSSL_PATH)/crypto/dh/dh_local.h >=20 > + $(OPENSSL_PATH)/crypto/dso/dso_local.h >=20 > + $(OPENSSL_PATH)/crypto/evp/evp_local.h >=20 > + $(OPENSSL_PATH)/crypto/hmac/hmac_local.h >=20 > + $(OPENSSL_PATH)/crypto/lhash/lhash_local.h >=20 > + $(OPENSSL_PATH)/crypto/md5/md5_local.h >=20 > + $(OPENSSL_PATH)/crypto/modes/modes_local.h >=20 > + $(OPENSSL_PATH)/crypto/objects/obj_dat.h >=20 > + $(OPENSSL_PATH)/crypto/objects/obj_local.h >=20 > + $(OPENSSL_PATH)/crypto/objects/obj_xref.h >=20 > + $(OPENSSL_PATH)/crypto/ocsp/ocsp_local.h >=20 > + $(OPENSSL_PATH)/crypto/pkcs12/p12_local.h >=20 > + $(OPENSSL_PATH)/crypto/rand/rand_local.h >=20 > + $(OPENSSL_PATH)/crypto/rsa/rsa_local.h >=20 > + $(OPENSSL_PATH)/crypto/sha/sha_local.h >=20 > + $(OPENSSL_PATH)/crypto/siphash/siphash_local.h >=20 > + $(OPENSSL_PATH)/crypto/sm3/sm3_local.h >=20 > + $(OPENSSL_PATH)/crypto/store/store_local.h >=20 > + $(OPENSSL_PATH)/crypto/ui/ui_local.h >=20 > + $(OPENSSL_PATH)/crypto/x509/x509_local.h >=20 > + $(OPENSSL_PATH)/crypto/x509v3/ext_dat.h >=20 > + $(OPENSSL_PATH)/crypto/x509v3/pcy_local.h >=20 > + $(OPENSSL_PATH)/crypto/x509v3/standard_exts.h >=20 > + $(OPENSSL_PATH)/crypto/x509v3/v3_admis.h >=20 > + $(OPENSSL_PATH)/ssl/bio_ssl.c >=20 > + $(OPENSSL_PATH)/ssl/d1_lib.c >=20 > + $(OPENSSL_PATH)/ssl/d1_msg.c >=20 > + $(OPENSSL_PATH)/ssl/d1_srtp.c >=20 > + $(OPENSSL_PATH)/ssl/methods.c >=20 > + $(OPENSSL_PATH)/ssl/packet.c >=20 > + $(OPENSSL_PATH)/ssl/pqueue.c >=20 > + $(OPENSSL_PATH)/ssl/record/dtls1_bitmap.c >=20 > + $(OPENSSL_PATH)/ssl/record/rec_layer_d1.c >=20 > + $(OPENSSL_PATH)/ssl/record/rec_layer_s3.c >=20 > + $(OPENSSL_PATH)/ssl/record/ssl3_buffer.c >=20 > + $(OPENSSL_PATH)/ssl/record/ssl3_record.c >=20 > + $(OPENSSL_PATH)/ssl/record/ssl3_record_tls13.c >=20 > + $(OPENSSL_PATH)/ssl/s3_cbc.c >=20 > + $(OPENSSL_PATH)/ssl/s3_enc.c >=20 > + $(OPENSSL_PATH)/ssl/s3_lib.c >=20 > + $(OPENSSL_PATH)/ssl/s3_msg.c >=20 > + $(OPENSSL_PATH)/ssl/ssl_asn1.c >=20 > + $(OPENSSL_PATH)/ssl/ssl_cert.c >=20 > + $(OPENSSL_PATH)/ssl/ssl_ciph.c >=20 > + $(OPENSSL_PATH)/ssl/ssl_conf.c >=20 > + $(OPENSSL_PATH)/ssl/ssl_err.c >=20 > + $(OPENSSL_PATH)/ssl/ssl_init.c >=20 > + $(OPENSSL_PATH)/ssl/ssl_lib.c >=20 > + $(OPENSSL_PATH)/ssl/ssl_mcnf.c >=20 > + $(OPENSSL_PATH)/ssl/ssl_rsa.c >=20 > + $(OPENSSL_PATH)/ssl/ssl_sess.c >=20 > + $(OPENSSL_PATH)/ssl/ssl_stat.c >=20 > + $(OPENSSL_PATH)/ssl/ssl_txt.c >=20 > + $(OPENSSL_PATH)/ssl/ssl_utst.c >=20 > + $(OPENSSL_PATH)/ssl/statem/extensions.c >=20 > + $(OPENSSL_PATH)/ssl/statem/extensions_clnt.c >=20 > + $(OPENSSL_PATH)/ssl/statem/extensions_cust.c >=20 > + $(OPENSSL_PATH)/ssl/statem/extensions_srvr.c >=20 > + $(OPENSSL_PATH)/ssl/statem/statem.c >=20 > + $(OPENSSL_PATH)/ssl/statem/statem_clnt.c >=20 > + $(OPENSSL_PATH)/ssl/statem/statem_dtls.c >=20 > + $(OPENSSL_PATH)/ssl/statem/statem_lib.c >=20 > + $(OPENSSL_PATH)/ssl/statem/statem_srvr.c >=20 > + $(OPENSSL_PATH)/ssl/t1_enc.c >=20 > + $(OPENSSL_PATH)/ssl/t1_lib.c >=20 > + $(OPENSSL_PATH)/ssl/t1_trce.c >=20 > + $(OPENSSL_PATH)/ssl/tls13_enc.c >=20 > + $(OPENSSL_PATH)/ssl/tls_srp.c >=20 > + $(OPENSSL_PATH)/ssl/packet_local.h >=20 > + $(OPENSSL_PATH)/ssl/ssl_cert_table.h >=20 > + $(OPENSSL_PATH)/ssl/ssl_local.h >=20 > + $(OPENSSL_PATH)/ssl/record/record.h >=20 > + $(OPENSSL_PATH)/ssl/record/record_local.h >=20 > + $(OPENSSL_PATH)/ssl/statem/statem.h >=20 > + $(OPENSSL_PATH)/ssl/statem/statem_local.h >=20 > +# Autogenerated files list ends here >=20 > + buildinf.h >=20 > + rand_pool_noise.h >=20 > + ossl_store.c >=20 > + rand_pool.c >=20 > + >=20 > +[Sources.X64] >=20 > + rand_pool_noise_tsc.c >=20 > + ApiHooks.c >=20 > + >=20 > +[Packages] >=20 > + MdePkg/MdePkg.dec >=20 > + CryptoPkg/CryptoPkg.dec >=20 > + >=20 > +[LibraryClasses] >=20 > + BaseLib >=20 > + DebugLib >=20 > + TimerLib >=20 > + PrintLib >=20 > + >=20 > +[BuildOptions] >=20 > + # >=20 > + # Disables the following Visual Studio compiler warnings brought by op= enssl > source, >=20 > + # so we do not break the build with /WX option: >=20 > + # C4090: 'function' : different 'const' qualifiers >=20 > + # C4132: 'object' : const object should be initialized (tls13_enc.c) >=20 > + # C4210: nonstandard extension used: function given file scope >=20 > + # C4244: conversion from type1 to type2, possible loss of data >=20 > + # C4245: conversion from type1 to type2, signed/unsigned mismatch >=20 > + # C4267: conversion from size_t to type, possible loss of data >=20 > + # C4306: 'identifier' : conversion from 'type1' to 'type2' of greate= r size >=20 > + # C4310: cast truncates constant value >=20 > + # C4389: 'operator' : signed/unsigned mismatch (xxxx) >=20 > + # C4700: uninitialized local variable 'name' used. (conf_sap.c(71)) >=20 > + # C4702: unreachable code >=20 > + # C4706: assignment within conditional expression >=20 > + # C4819: The file contains a character that cannot be represented in= the > current code page >=20 > + # >=20 > + MSFT:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER > $(OPENSSL_FLAGS) $(OPENSSL_FLAGS_CONFIG) /wd4090 /wd4132 /wd4210 > /wd4244 /wd4245 /wd4267 /wd4306 /wd4310 /wd4700 /wd4389 /wd4702 > /wd4706 /wd4819 >=20 > + >=20 > + INTEL:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC > $(OPENSSL_FLAGS) $(OPENSSL_FLAGS_CONFIG) /w >=20 > + >=20 > + # >=20 > + # Suppress the following build warnings in openssl so we don't break t= he build > with -Werror >=20 > + # -Werror=3Dmaybe-uninitialized: there exist some other paths for wh= ich the > variable is not initialized. >=20 > + # -Werror=3Dformat: Check calls to printf and scanf, etc., to make s= ure that the > arguments supplied have >=20 > + # types appropriate to the format string specified. >=20 > + # -Werror=3Dunused-but-set-variable: Warn whenever a local variable = is > assigned to, but otherwise unused (aside from its declaration). >=20 > + # >=20 > + GCC:*_*_X64_CC_FLAGS =3D -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) > $(OPENSSL_FLAGS_CONFIG) -Wno-error=3Dmaybe-uninitialized -Wno- > error=3Dformat -Wno-format -Wno-error=3Dunused-but-set-variable - > DNO_MSABI_VA_FUNCS >=20 > + >=20 > + # suppress the following warnings in openssl so we don't break the bui= ld with > warnings-as-errors: >=20 > + # 1295: Deprecated declaration - give arg types >=20 > + # 550: was set but never used >=20 > + # 1293: assignment in condition >=20 > + # 111: statement is unreachable (invariably "break;" after "return X;= " in case > statement) >=20 > + # 68: integer conversion resulted in a change of sign ("if (Status = =3D=3D -1)") >=20 > + # 177: was declared but never referenced >=20 > + # 223: function declared implicitly >=20 > + # 144: a value of type cannot be used to initialize an entity = of type > >=20 > + # 513: a value of type cannot be assigned to an entity of type= >=20 > + # 188: enumerated type mixed with another type (i.e. passing an integ= er as an > enum without a cast) >=20 > + # 1296: Extended constant initialiser used >=20 > + # 128: loop is not reachable - may be emitted inappropriately if code= follows > a conditional return >=20 > + # from the function that evaluates to true at compile time >=20 > + # 546: transfer of control bypasses initialization - may be emitted > inappropriately if the uninitialized >=20 > + # variable is never referenced after the jump >=20 > + # 1: ignore "#1-D: last line of file ends without a newline" >=20 > + # 3017: may be used before being set (NOTE: This was fixed in > OpenSSL 1.1 HEAD with >=20 > + # commit d9b8b89bec4480de3a10bdaf9425db371c19145b, and can be > dropped then.) >=20 > + XCODE:*_*_X64_CC_FLAGS =3D -mmmx -msse -U_WIN32 -U_WIN64 > $(OPENSSL_FLAGS) $(OPENSSL_FLAGS_CONFIG) -w -std=3Dc99 -Wno- > error=3Duninitialized >=20 > diff --git a/CryptoPkg/Library/Include/openssl/opensslconf.h > b/CryptoPkg/Library/Include/openssl/opensslconf.h > index 3a2544ea5c..e8f73c4d10 100644 > --- a/CryptoPkg/Library/Include/openssl/opensslconf.h > +++ b/CryptoPkg/Library/Include/openssl/opensslconf.h > @@ -112,9 +112,6 @@ extern "C" { > #ifndef OPENSSL_NO_ASAN >=20 > # define OPENSSL_NO_ASAN >=20 > #endif >=20 > -#ifndef OPENSSL_NO_ASM >=20 > -# define OPENSSL_NO_ASM >=20 > -#endif >=20 > #ifndef OPENSSL_NO_ASYNC >=20 > # define OPENSSL_NO_ASYNC >=20 > #endif >=20 > diff --git a/CryptoPkg/Library/OpensslLib/ApiHooks.c > b/CryptoPkg/Library/OpensslLib/ApiHooks.c > new file mode 100644 > index 0000000000..58cff16838 > --- /dev/null > +++ b/CryptoPkg/Library/OpensslLib/ApiHooks.c > @@ -0,0 +1,18 @@ > +/** @file >=20 > + OpenSSL Library API hooks. >=20 > + >=20 > +Copyright (c) 2020, Intel Corporation. All rights reserved.
>=20 > +SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > + >=20 > +**/ >=20 > + >=20 > +#include >=20 > + >=20 > +VOID * >=20 > +__imp_RtlVirtualUnwind ( >=20 > + VOID * Args >=20 > + ) >=20 > +{ >=20 > + return NULL; >=20 > +} >=20 > + >=20 > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c > b/CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c > new file mode 100644 > index 0000000000..ef20d2b84e > --- /dev/null > +++ b/CryptoPkg/Library/OpensslLib/OpensslLibConstructor.c > @@ -0,0 +1,34 @@ > +/** @file >=20 > + Constructor to initialize CPUID data for OpenSSL assembly operations. >=20 > + >=20 > +Copyright (c) 2020, Intel Corporation. All rights reserved.
>=20 > +SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > + >=20 > +**/ >=20 > + >=20 > +#include >=20 > + >=20 > +extern void OPENSSL_cpuid_setup (void); >=20 > + >=20 > +/** >=20 > + Constructor routine for OpensslLib. >=20 > + >=20 > + The constructor calls an internal OpenSSL function which fetches a loc= al copy >=20 > + of the hardware capability flags, used to enable native crypto instruc= tions. >=20 > + >=20 > + @param None >=20 > + >=20 > + @retval EFI_SUCCESS The construction succeeded. >=20 > + >=20 > +**/ >=20 > +EFI_STATUS >=20 > +EFIAPI >=20 > +OpensslLibConstructor ( >=20 > + VOID >=20 > + ) >=20 > +{ >=20 > + OPENSSL_cpuid_setup (); >=20 > + >=20 > + return EFI_SUCCESS; >=20 > +} >=20 > + >=20 > diff --git a/CryptoPkg/Library/OpensslLib/process_files.pl > b/CryptoPkg/Library/OpensslLib/process_files.pl > index 57ce195394..472f59bc8e 100755 > --- a/CryptoPkg/Library/OpensslLib/process_files.pl > +++ b/CryptoPkg/Library/OpensslLib/process_files.pl > @@ -9,9 +9,63 @@ > # do not need to do this, since the results are stored in the EDK2 >=20 > # git repository for them. >=20 > # >=20 > +# Due to the script wrapping required to process the OpenSSL >=20 > +# configuration data, each native architecture must be processed >=20 > +# individually by the maintainer (in addition to the standard version): >=20 > +# ./process_files.pl >=20 > +# ./process_files.pl X64 >=20 > +# ./process_files.pl [Arch] >=20 > + >=20 > use strict; >=20 > use Cwd; >=20 > use File::Copy; >=20 > +use File::Basename; >=20 > +use File::Path qw(make_path remove_tree); >=20 > +use Text::Tabs; >=20 > + >=20 > +# >=20 > +# OpenSSL perlasm generator script does not transfer the copyright heade= r >=20 > +# >=20 > +sub copy_license_header >=20 > +{ >=20 > + my @args =3D split / /, shift; #Separate args by spaces >=20 > + my $source =3D $args[1]; #Source file is second (after "per= l") >=20 > + my $target =3D pop @args; #Target file is always last >=20 > + chop ($target); #Remove newline char >=20 > + >=20 > + my $temp_file_name =3D "license.tmp"; >=20 > + open (my $source_file, "<" . $source) || die $source; >=20 > + open (my $target_file, "<" . $target) || die $target; >=20 > + open (my $temp_file, ">" . $temp_file_name) || die $temp_file_name; >=20 > + >=20 > + #Add "generated file" warning >=20 > + $source =3D~ s/^..//; #Remove leading "./" >=20 > + print ($temp_file "; WARNING: do not edit!\r\n"); >=20 > + print ($temp_file "; Generated from $source\r\n"); >=20 > + print ($temp_file ";\r\n"); >=20 > + >=20 > + #Copy source file header to temp file >=20 > + while (my $line =3D <$source_file>) { >=20 > + next if ($line =3D~ /#!/); #Ignore shebang line >=20 > + $line =3D~ s/#/;/; #Fix comment character for assembl= y >=20 > + $line =3D~ s/\s+$/\r\n/; #Trim trailing whitepsace, fixup l= ine endings >=20 > + print ($temp_file $line); >=20 > + last if ($line =3D~ /http/); #Last line of copyright header con= tains a web link >=20 > + } >=20 > + print ($temp_file "\r\n"); >=20 > + #Retrieve generated assembly contents >=20 > + while (my $line =3D <$target_file>) { >=20 > + $line =3D~ s/\s+$/\r\n/; #Trim trailing whitepsace, fixup l= ine endings >=20 > + print ($temp_file expand ($line)); #expand() replaces tabs with= spaces >=20 > + } >=20 > + >=20 > + close ($source_file); >=20 > + close ($target_file); >=20 > + close ($temp_file); >=20 > + >=20 > + move ($temp_file_name, $target) || >=20 > + die "Cannot replace \"" . $target . "\"!"; >=20 > +} >=20 >=20 >=20 > # >=20 > # Find the openssl directory name for use lib. We have to do this >=20 > @@ -21,10 +75,41 @@ use File::Copy; > # >=20 > my $inf_file; >=20 > my $OPENSSL_PATH; >=20 > +my $uefi_config; >=20 > +my $extension; >=20 > +my $arch; >=20 > my @inf; >=20 >=20 >=20 > BEGIN { >=20 > $inf_file =3D "OpensslLib.inf"; >=20 > + $uefi_config =3D "UEFI"; >=20 > + $arch =3D shift; >=20 > + >=20 > + if (defined $arch) { >=20 > + if (uc ($arch) eq "X64") { >=20 > + $arch =3D "X64"; >=20 > + $inf_file =3D "OpensslLibX64.inf"; >=20 > + $uefi_config =3D "UEFI-x86_64"; >=20 > + $extension =3D "nasm"; >=20 > + } else { >=20 > + die "Unsupported architecture \"" . $arch . "\"!"; >=20 > + } >=20 > + if ($extension eq "nasm") { >=20 > + if (`nasm -v 2>&1`) { >=20 > + #Presence of nasm executable will trigger inclusion of A= VX instructions >=20 > + die "\nCannot run assembly generators with NASM in path!= \n\n"; >=20 > + } >=20 > + } >=20 > + >=20 > + # Prepare assembly folder >=20 > + if (-d $arch) { >=20 > + remove_tree ($arch, {safe =3D> 1}) || >=20 > + die "Cannot clean assembly folder \"" . $arch . "\"!"; >=20 > + } else { >=20 > + mkdir $arch || >=20 > + die "Cannot create assembly folder \"" . $arch . "\"!"; >=20 > + } >=20 > + } >=20 >=20 >=20 > # Read the contents of the inf file >=20 > open( FD, "<" . $inf_file ) || >=20 > @@ -47,9 +132,9 @@ BEGIN { > # Configure UEFI >=20 > system( >=20 > "./Configure", >=20 > - "UEFI", >=20 > + "--config=3D../uefi-asm.conf", >=20 > + "$uefi_config", >=20 > "no-afalgeng", >=20 > - "no-asm", >=20 > "no-async", >=20 > "no-autoerrinit", >=20 > "no-autoload-config", >=20 > @@ -129,23 +214,53 @@ BEGIN { > # Retrieve file lists from OpenSSL configdata >=20 > # >=20 > use configdata qw/%unified_info/; >=20 > +use configdata qw/%config/; >=20 > +use configdata qw/%target/; >=20 > + >=20 > +# >=20 > +# Collect build flags from configdata >=20 > +# >=20 > +my $flags =3D ""; >=20 > +foreach my $f (@{$config{lib_defines}}) { >=20 > + $flags .=3D " -D$f"; >=20 > +} >=20 >=20 >=20 > my @cryptofilelist =3D (); >=20 > my @sslfilelist =3D (); >=20 > +my @asmfilelist =3D (); >=20 > +my @asmbuild =3D (); >=20 > foreach my $product ((@{$unified_info{libraries}}, >=20 > @{$unified_info{engines}})) { >=20 > foreach my $o (@{$unified_info{sources}->{$product}}) { >=20 > foreach my $s (@{$unified_info{sources}->{$o}}) { >=20 > - next if ($unified_info{generate}->{$s}); >=20 > - next if $s =3D~ "crypto/bio/b_print.c"; >=20 > - >=20 > # No need to add unused files in UEFI. >=20 > # So it can reduce porting time, compile time, library size. >=20 > + next if $s =3D~ "crypto/bio/b_print.c"; >=20 > next if $s =3D~ "crypto/rand/randfile.c"; >=20 > next if $s =3D~ "crypto/store/"; >=20 > next if $s =3D~ "crypto/err/err_all.c"; >=20 > next if $s =3D~ "crypto/aes/aes_ecb.c"; >=20 >=20 >=20 > + if ($unified_info{generate}->{$s}) { >=20 > + if (defined $arch) { >=20 > + my $buildstring =3D "perl"; >=20 > + foreach my $arg (@{$unified_info{generate}->{$s}}) { >=20 > + if ($arg =3D~ ".pl") { >=20 > + $buildstring .=3D " ./openssl/$arg"; >=20 > + } elsif ($arg =3D~ "PERLASM_SCHEME") { >=20 > + $buildstring .=3D " $target{perlasm_scheme}"= ; >=20 > + } elsif ($arg =3D~ "LIB_CFLAGS") { >=20 > + $buildstring .=3D "$flags"; >=20 > + } >=20 > + } >=20 > + ($s, my $path, undef) =3D fileparse($s, qr/\.[^.]*/)= ; >=20 > + $buildstring .=3D " ./$arch/$path$s.$extension"; >=20 > + make_path ("./$arch/$path"); >=20 > + push @asmbuild, "$buildstring\n"; >=20 > + push @asmfilelist, " $arch/$path$s.$extension\r\n"; >=20 > + } >=20 > + next; >=20 > + } >=20 > if ($product =3D~ "libssl") { >=20 > push @sslfilelist, ' $(OPENSSL_PATH)/' . $s . "\r\n"; >=20 > next; >=20 > @@ -183,15 +298,31 @@ foreach (@headers){ > } >=20 >=20 >=20 >=20 >=20 > +# >=20 > +# Generate assembly files >=20 > +# >=20 > +if (@asmbuild) { >=20 > + print "\n--> Generating assembly files ... "; >=20 > + foreach my $buildstring (@asmbuild) { >=20 > + system ("$buildstring"); >=20 > + copy_license_header ($buildstring); >=20 > + } >=20 > + print "Done!"; >=20 > +} >=20 > + >=20 > # >=20 > # Update OpensslLib.inf with autogenerated file list >=20 > # >=20 > my @new_inf =3D (); >=20 > my $subbing =3D 0; >=20 > -print "\n--> Updating OpensslLib.inf ... "; >=20 > +print "\n--> Updating $inf_file ... "; >=20 > foreach (@inf) { >=20 > + if ($_ =3D~ "DEFINE OPENSSL_FLAGS_CONFIG") { >=20 > + push @new_inf, " DEFINE OPENSSL_FLAGS_CONFIG =3D" . $flags .= "\r\n"; >=20 > + next; >=20 > + } >=20 > if ( $_ =3D~ "# Autogenerated files list starts here" ) { >=20 > - push @new_inf, $_, @cryptofilelist, @sslfilelist; >=20 > + push @new_inf, $_, @asmfilelist, @cryptofilelist, @sslfilelist; >=20 > $subbing =3D 1; >=20 > next; >=20 > } >=20 > @@ -216,49 +347,51 @@ rename( $new_inf_file, $inf_file ) || > die "rename $inf_file"; >=20 > print "Done!"; >=20 >=20 >=20 > -# >=20 > -# Update OpensslLibCrypto.inf with auto-generated file list (no libssl) >=20 > -# >=20 > -$inf_file =3D "OpensslLibCrypto.inf"; >=20 > - >=20 > -# Read the contents of the inf file >=20 > -@inf =3D (); >=20 > -@new_inf =3D (); >=20 > -open( FD, "<" . $inf_file ) || >=20 > - die "Cannot open \"" . $inf_file . "\"!"; >=20 > -@inf =3D (); >=20 > -close(FD) || >=20 > - die "Cannot close \"" . $inf_file . "\"!"; >=20 > +if (!defined $arch) { >=20 > + # >=20 > + # Update OpensslLibCrypto.inf with auto-generated file list (no libs= sl) >=20 > + # >=20 > + $inf_file =3D "OpensslLibCrypto.inf"; >=20 >=20 >=20 > -$subbing =3D 0; >=20 > -print "\n--> Updating OpensslLibCrypto.inf ... "; >=20 > -foreach (@inf) { >=20 > - if ( $_ =3D~ "# Autogenerated files list starts here" ) { >=20 > - push @new_inf, $_, @cryptofilelist; >=20 > - $subbing =3D 1; >=20 > - next; >=20 > - } >=20 > - if ( $_ =3D~ "# Autogenerated files list ends here" ) { >=20 > - push @new_inf, $_; >=20 > - $subbing =3D 0; >=20 > - next; >=20 > + # Read the contents of the inf file >=20 > + @inf =3D (); >=20 > + @new_inf =3D (); >=20 > + open( FD, "<" . $inf_file ) || >=20 > + die "Cannot open \"" . $inf_file . "\"!"; >=20 > + @inf =3D (); >=20 > + close(FD) || >=20 > + die "Cannot close \"" . $inf_file . "\"!"; >=20 > + >=20 > + $subbing =3D 0; >=20 > + print "\n--> Updating OpensslLibCrypto.inf ... "; >=20 > + foreach (@inf) { >=20 > + if ( $_ =3D~ "# Autogenerated files list starts here" ) { >=20 > + push @new_inf, $_, @cryptofilelist; >=20 > + $subbing =3D 1; >=20 > + next; >=20 > + } >=20 > + if ( $_ =3D~ "# Autogenerated files list ends here" ) { >=20 > + push @new_inf, $_; >=20 > + $subbing =3D 0; >=20 > + next; >=20 > + } >=20 > + >=20 > + push @new_inf, $_ >=20 > + unless ($subbing); >=20 > } >=20 >=20 >=20 > - push @new_inf, $_ >=20 > - unless ($subbing); >=20 > + $new_inf_file =3D $inf_file . ".new"; >=20 > + open( FD, ">" . $new_inf_file ) || >=20 > + die $new_inf_file; >=20 > + print( FD @new_inf ) || >=20 > + die $new_inf_file; >=20 > + close(FD) || >=20 > + die $new_inf_file; >=20 > + rename( $new_inf_file, $inf_file ) || >=20 > + die "rename $inf_file"; >=20 > + print "Done!"; >=20 > } >=20 >=20 >=20 > -$new_inf_file =3D $inf_file . ".new"; >=20 > -open( FD, ">" . $new_inf_file ) || >=20 > - die $new_inf_file; >=20 > -print( FD @new_inf ) || >=20 > - die $new_inf_file; >=20 > -close(FD) || >=20 > - die $new_inf_file; >=20 > -rename( $new_inf_file, $inf_file ) || >=20 > - die "rename $inf_file"; >=20 > -print "Done!"; >=20 > - >=20 > # >=20 > # Copy opensslconf.h and dso_conf.h generated from OpenSSL Configuration >=20 > # >=20 > diff --git a/CryptoPkg/Library/OpensslLib/uefi-asm.conf > b/CryptoPkg/Library/OpensslLib/uefi-asm.conf > new file mode 100644 > index 0000000000..55eedbf3ba > --- /dev/null > +++ b/CryptoPkg/Library/OpensslLib/uefi-asm.conf > @@ -0,0 +1,15 @@ > +## -*- mode: perl; -*- >=20 > +## UEFI assembly openssl configuration targets. >=20 > + >=20 > +my %targets =3D ( >=20 > +#### UEFI >=20 > + "UEFI-x86_64" =3D> { >=20 > + perlasm_scheme =3D> "nasm", >=20 > + # inherit_from =3D> [ "UEFI", asm("x86_64_asm") ], >=20 > + inherit_from =3D> [ "UEFI" ], >=20 > + cpuid_asm_src =3D> "x86_64cpuid.s", >=20 > + aes_asm_src =3D> "aes_core.c aes_cbc.c vpaes-x86_64.s aesni-= x86_64.s > aesni-sha1-x86_64.s aesni-sha256-x86_64.s aesni-mb-x86_64.s", >=20 > + sha1_asm_src =3D> "sha1-x86_64.s sha256-x86_64.s sha512-x86_6= 4.s > sha1-mb-x86_64.s sha256-mb-x86_64.s", >=20 > + modes_asm_src =3D> "ghash-x86_64.s", >=20 > + }, >=20 > +); >=20 > -- > 2.28.0.windows.1