Skip to content

Commit

Permalink
genprotimg: Fix build with OpenSSL 1.1
Browse files Browse the repository at this point in the history
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: #167
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Dan Horák <dan@danny.cz>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
  • Loading branch information
sharkcz authored and steffen-eiden committed Apr 2, 2024
1 parent 13d721a commit f5744b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion genprotimg/src/utils/crypto.c
Expand Up @@ -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();

Expand Down

0 comments on commit f5744b9

Please sign in to comment.