uadk_engine/0014-sm2-fix-build-warning-in-openssl-3.0-of-incompatible.patch
Zhao Mengmeng 95a99bb0f2 Backport upstream uadk engine patches
This series backport upstream 8 patches, it also fix spec file error
by removing wrong changelog and fixing wrong date.

Signed-off-by: Zhao Mengmeng <zhaomengmeng@kylinos.cn>
2024-05-31 16:09:20 +08:00

33 lines
909 B
Diff

From b840e2d5d9ff7b828b0e82047e06fa374aa6354c Mon Sep 17 00:00:00 2001
From: Zhangfei Gao <zhangfei.gao@linaro.org>
Date: Sun, 26 May 2024 01:17:38 +0000
Subject: [PATCH 14/15] sm2: fix build warning in openssl 3.0 of incompatible
pointer type
openssl 3.0 introduce const, fixed by version check
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
---
src/uadk_sm2.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/uadk_sm2.c b/src/uadk_sm2.c
index c0a5303..b8548d1 100644
--- a/src/uadk_sm2.c
+++ b/src/uadk_sm2.c
@@ -1605,7 +1605,11 @@ static int sm2_digest_custom(EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx)
return EVP_DigestUpdate(mctx, z, (size_t)mdlen);
}
+# if OPENSSL_VERSION_NUMBER < 0x30000000
static int sm2_copy(EVP_PKEY_CTX *dst, EVP_PKEY_CTX *src)
+# else
+static int sm2_copy(EVP_PKEY_CTX *dst, const EVP_PKEY_CTX *src)
+# endif
{
struct sm2_ctx *dctx, *sctx;
--
2.43.0