From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web12.13647.1638547756938708380 for ; Fri, 03 Dec 2021 08:09:17 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=KBNQHGeG; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1638547756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NkyQNcTw8IrnKPkjWhOu85JbkVahhlyMDJq1cCluOFE=; b=KBNQHGeGsMK7Ftq0XpYsQB7pRxyKEylVJhBzJa1Vu4p8yb3ZIPcHZHLAha2/t9VZVl/N9Z ZJCdQP8814LMLGEk1uSPCoD/gXXWhWpGCWffpypAN0ugCqDBkqY7I4cVIlSPscNctVaCaj irwB8/GJuFKuksSfeTpkW20mRAS2OY4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-590-zz4oG8mmOKOPLF6zqKW-Uw-1; Fri, 03 Dec 2021 11:09:13 -0500 X-MC-Unique: zz4oG8mmOKOPLF6zqKW-Uw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F34D21023F4F; Fri, 3 Dec 2021 16:09:11 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.193.170]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BF06319D9F; Fri, 3 Dec 2021 16:09:08 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0755F18003A8; Fri, 3 Dec 2021 17:07:49 +0100 (CET) From: "Gerd Hoffmann" To: devel@edk2.groups.io Cc: Jiewen Yao , Jian J Wang , Guomin Jiang , Pawel Polawski , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Xiaoyu Lu , Gerd Hoffmann Subject: [PATCH 12/24] CryptoPkg/BaseCryptLib; adapt CryptSm3.c to openssl 3.0 changes. Date: Fri, 3 Dec 2021 17:07:36 +0100 Message-Id: <20211203160748.866150-13-kraxel@redhat.com> In-Reply-To: <20211203160748.866150-1-kraxel@redhat.com> References: <20211203160748.866150-1-kraxel@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Functions have been renamed. FIXME: Should probably switch to EVP_Digest*() instead of using internal openssl functions. Signed-off-by: Gerd Hoffmann --- CryptoPkg/Library/BaseCryptLib/Hash/CryptSm3.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CryptoPkg/Library/BaseCryptLib/Hash/CryptSm3.c b/CryptoPkg/Library/BaseCryptLib/Hash/CryptSm3.c index 235331c2a038..97ac9660c1ea 100644 --- a/CryptoPkg/Library/BaseCryptLib/Hash/CryptSm3.c +++ b/CryptoPkg/Library/BaseCryptLib/Hash/CryptSm3.c @@ -7,7 +7,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "InternalCryptLib.h" -#include "crypto/sm3.h" +#include "internal/sm3.h" /** Retrieves the size, in bytes, of the context buffer required for SM3 hash operations. @@ -55,7 +55,7 @@ Sm3Init ( // // Openssl SM3 Context Initialization // - sm3_init ((SM3_CTX *) Sm3Context); + ossl_sm3_init ((SM3_CTX *) Sm3Context); return TRUE; } @@ -136,7 +136,7 @@ Sm3Update ( // // Openssl SM3 Hash Update // - sm3_update ((SM3_CTX *) Sm3Context, Data, DataSize); + ossl_sm3_update ((SM3_CTX *) Sm3Context, Data, DataSize); return TRUE; } @@ -178,7 +178,7 @@ Sm3Final ( // // Openssl SM3 Hash Finalization // - sm3_final (HashValue, (SM3_CTX *) Sm3Context); + ossl_sm3_final (HashValue, (SM3_CTX *) Sm3Context); return TRUE; } @@ -224,11 +224,11 @@ Sm3HashAll ( // // SM3 Hash Computation. // - sm3_init(&Ctx); + ossl_sm3_init(&Ctx); - sm3_update(&Ctx, Data, DataSize); + ossl_sm3_update(&Ctx, Data, DataSize); - sm3_final(HashValue, &Ctx); + ossl_sm3_final(HashValue, &Ctx); return TRUE; } -- 2.33.1