FreeBSD Bugzilla – Attachment 243008 Details for
Bug 272190
security/pkcs11-helper: make OpenSSL 3.0 compatible
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
security/pkcs11-helper: fix build with clang 16 and openssl 3.0
security__pkcs11-helper-fix-clang16-openssl3-build-1.diff (text/plain), 2.43 KB, created by
Dimitry Andric
on 2023-06-26 09:56:39 UTC
(
hide
)
Description:
security/pkcs11-helper: fix build with clang 16 and openssl 3.0
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2023-06-26 09:56:39 UTC
Size:
2.43 KB
patch
obsolete
>commit 644870592a0798d3213ee301d30ea68eece07110 >Author: Dimitry Andric <dim@FreeBSD.org> >Date: 2023-06-26 11:54:22 +0200 > > security/pkcs11-helper: fix build with clang 16 and openssl 3.0 > > Clang 16 has a new error about incompatible function types, which shows > up with security/pkcs11-helper, when the base system has OpenSSL 3.0: > > pkcs11h-openssl.c:1112:3: error: incompatible function pointer types passing 'int (CRYPTO_EX_DATA *, const CRYPTO_EX_DATA *, void *, int, long, void *)' (aka 'int (struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void *, int, long, void *)') to parameter of type 'CRYPTO_EX_dup *' (aka 'int (*)(struct crypto_ex_data_st *, const struct crypto_ex_data_st *, void **, int, long, void *)') [-Wincompatible-function-pointer-types] > __pkcs11h_openssl_ex_data_dup, > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > This is because in OpenSSL 3.0, the 'from_d' parameter has changed from > a 'void *' to a 'void **'. Add a #elif case to handle this scenario. > >diff --git a/security/pkcs11-helper/files/patch-lib_pkcs11h-openssl.c b/security/pkcs11-helper/files/patch-lib_pkcs11h-openssl.c >index e0bc64247fc7..1c22df9dae62 100644 >--- a/security/pkcs11-helper/files/patch-lib_pkcs11h-openssl.c >+++ b/security/pkcs11-helper/files/patch-lib_pkcs11h-openssl.c >@@ -1,6 +1,6 @@ >---- lib/pkcs11h-openssl.c.orig 2022-10-20 14:36:14 UTC >+--- lib/pkcs11h-openssl.c.orig 2022-04-07 17:01:01 UTC > +++ lib/pkcs11h-openssl.c >-@@ -235,9 +235,13 @@ DSA_meth_free (DSA_METHOD *meth) >+@@ -235,9 +235,13 @@ DSA_meth_set1_name (DSA_METHOD *meth, const char *name > static int > DSA_meth_set1_name (DSA_METHOD *meth, const char *name) > { >@@ -14,3 +14,42 @@ > } > #endif > >+@@ -330,28 +334,32 @@ static struct { >+ #endif >+ } __openssl_methods; >+ >+-#if OPENSSL_VERSION_NUMBER < 0x10100001L >+ static >+ int >+ __pkcs11h_openssl_ex_data_dup ( >++#if OPENSSL_VERSION_NUMBER < 0x10100001L >+ CRYPTO_EX_DATA *to, >+ CRYPTO_EX_DATA *from, >+ void *from_d, >+ int idx, >+ long argl, >+ void *argp >+-) { >+-#else >+-int >+-__pkcs11h_openssl_ex_data_dup ( >++#elif OPENSSL_VERSION_NUMBER < 0x30000000L >+ CRYPTO_EX_DATA *to, >+ const CRYPTO_EX_DATA *from, >+ void *from_d, >+ int idx, >+ long argl, >+ void *argp >+-) { >++#else >++ CRYPTO_EX_DATA *to, >++ const CRYPTO_EX_DATA *from, >++ void **from_d, >++ int idx, >++ long argl, >++ void *argp >+ #endif >++) { >+ pkcs11h_openssl_session_t openssl_session; >+ >+ _PKCS11H_DEBUG (
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 272190
:
242975
| 243008