From 719fa58363ab4e5f6ebd77b4d17f11339d762d3e Mon Sep 17 00:00:00 2001 From: John Regan Date: Wed, 4 May 2022 23:05:03 +0200 Subject: openssl 3.0.0: use new function signature for the dup_func callback --- src/openssl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/openssl.c b/src/openssl.c index 814d95c..92e91ea 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -2846,8 +2846,13 @@ typedef const CRYPTO_EX_DATA const_CRYPTO_EX_DATA; typedef CRYPTO_EX_DATA const_CRYPTO_EX_DATA; #endif +#if OPENSSL_PREREQ(3,0,0) +/* the function signature was fixed in version 3.0.0 */ +static int ex_ondup(CRYPTO_EX_DATA *to NOTUSED, const_CRYPTO_EX_DATA *from NOTUSED, void **from_d, int idx NOTUSED, long argl NOTUSED, void *argp NOTUSED) { +#else static int ex_ondup(CRYPTO_EX_DATA *to NOTUSED, const_CRYPTO_EX_DATA *from NOTUSED, void *from_d, int idx NOTUSED, long argl NOTUSED, void *argp NOTUSED) { - struct ex_data **data = from_d; +#endif + struct ex_data **data = (struct ex_data **)from_d; if (*data) (*data)->refs++; -- cgit v1.2.3-59-g8ed1b