From f5744b95db93fa9d5cfd6fb206767ad2dcc3c804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Thu, 28 Mar 2024 13:08:42 +0000 Subject: [PATCH] genprotimg: Fix build with OpenSSL 1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OpenSSL 1.1 seems to use a non-const parameter to X509_name_dup(), but x509_armonk_locality_fixup() is passing a const there. The compile then fails on "discards 'const' qualifier", when -Werror is used. Thus resolve with a type-cast like in c2b_name(). Fixes: https://github.com/ibm-s390-linux/s390-tools/pull/167 Reviewed-by: Marc Hartmayer Signed-off-by: Dan HorĂ¡k Signed-off-by: Steffen Eiden --- genprotimg/src/utils/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genprotimg/src/utils/crypto.c b/genprotimg/src/utils/crypto.c index 3636cadb..22868df1 100644 --- a/genprotimg/src/utils/crypto.c +++ b/genprotimg/src/utils/crypto.c @@ -768,7 +768,7 @@ static X509_NAME *x509_armonk_locality_fixup(const X509_NAME *name) PV_IBM_Z_SUBJECT_LOCALITY_NAME_ARMONK)) return NULL; - ret = X509_NAME_dup(name); + ret = X509_NAME_dup((X509_NAME *)name); if (!ret) g_abort();