From nobody Wed Jun 28 20:54:47 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Qrv3C5Fgbz4kg1C; Wed, 28 Jun 2023 20:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Qrv3C4q8Fz3rxp; Wed, 28 Jun 2023 20:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687985687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5RSWEW7TH3CoKGDbjAqIi0lhnXiUmytyEdDLBZSRl3I=; b=K32H1gpLIYPfnhKZWQhHVAJziqTSRaZdVt2QUuX+gVmSsPTiMqUe1nD/f7GBROUSOKKlOG dMQFWnSUOt6+/deBazisqem5Cr1Hj8nZHRBAWNsdlRPnrD8HpGwgN+Ot6NJ6Zq2heLCrkj Whu350aYwTiIqo8uwjEJvdF7K42juGDbmsNMlwB2wB+GPu8HUBk6CY5gokjVHjfk2CGOjh frzDmGtggJs6uPMkBOoQXo0OMkEO8Rj8R1OznAtlxqm++G+UDCJrNJqmUMQPxpUfFnRxdx wbY6qaWjdMzSxMxxPZD4GCpoNbUonf9Dfj3XhV0N4KSmH6J6VYdUq7JBYvEu6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687985687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5RSWEW7TH3CoKGDbjAqIi0lhnXiUmytyEdDLBZSRl3I=; b=VGSZHmwN2M8sl1qlDAEBDrjYM/CIp/c6NjmfJF5/yZ/QbX2JBr/g6idG0p7uCdLbc4JO0j a3ThhmVofb9cWbi0v9TVh1IcFr+4ymkpMwc9h1Zxz13j/abNLDCCbepRqPMcDE0YAsU2yj NuCdKL28QjdldIt9pnXFLAvVBpGUl58OYcL4QCe1xw9VTOB/zXUZNvEkLswpn37GSL+Q4Z c+eCIBrAZOCd54dd0ECmoqkpGX5vy3XS6cMXQZHGsfKpfXH6iR0r9btIrlu5Zh2zdWAYbb FvUj3cLkCaKqBGjKBN+sbUeZhB11YZ7K2OlEao+m7VpDYfBzun/+grhxx6z/JQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687985687; a=rsa-sha256; cv=none; b=ham+STgul5OAVo/ewO1cLVGaL0XYbkAmxMsoz92rgkJ31M8D5j43muN5BgdbnobWiVdPVg UPfcKHYDMtcHYAhDy65qfWKk/C+ns/Pwchqop6jXH/IqyEbrABPZuCJLv4zacbO9W5pdky 560zafe7pYEpfU8RsnJailzZilXj/O1IEw+epQyZpvejwBZ81IA5LyAST8P2Qe2Rf5rBkI 7FLWR3EQtcD+6JE0UHBWPAgZfxhC6eRSmf4iZfBdQ/VhRl/0tZCu2qyMXC5K/T+ZZlpGkr 3mcNiEqys1rf3/HtXoADdjyOqvrmAkeZkV0p4dig1X0iGWyDrQXrIyVkCF/wOg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Qrv3C3sZTzpbj; Wed, 28 Jun 2023 20:54:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 35SKsl7v074139; Wed, 28 Jun 2023 20:54:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35SKslRU074138; Wed, 28 Jun 2023 20:54:47 GMT (envelope-from git) Date: Wed, 28 Jun 2023 20:54:47 GMT Message-Id: <202306282054.35SKslRU074138@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Matthias Andree Subject: git: b419a572ee2e - main - security/pkcs11-helper: make OpenSSL 3.0 compatible List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mandree X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b419a572ee2ea98a2dbf4b1e219e057ffef56cb3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mandree: URL: https://cgit.FreeBSD.org/ports/commit/?id=b419a572ee2ea98a2dbf4b1e219e057ffef56cb3 commit b419a572ee2ea98a2dbf4b1e219e057ffef56cb3 Author: Matthias Andree AuthorDate: 2023-06-24 18:32:19 +0000 Commit: Matthias Andree CommitDate: 2023-06-28 20:49:54 +0000 security/pkcs11-helper: make OpenSSL 3.0 compatible OpenSSL 3.0 changed the prototype for the dup_func of the customer data callback functions, the third argument (from_d) switched from void * to void **. See https://www.openssl.org/docs/man3.0/man3/CRYPTO_get_ex_new_index.html This breaks compile on FreeBSD-CURRENT, which also uses the stricter LLVM/clang 16. Add an OPENSSL_VERSION_NUMBER #elif case to support the newer OpenSSL >= 3.0 prototype. Approved by: ale@ (Alex Dupre, maintainer) PR: 272190 --- .../files/patch-lib_pkcs11h-openssl.c | 28 ++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/security/pkcs11-helper/files/patch-lib_pkcs11h-openssl.c b/security/pkcs11-helper/files/patch-lib_pkcs11h-openssl.c index e0bc64247fc7..e27454eb3d28 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,27 @@ } #endif +@@ -341,12 +345,22 @@ __pkcs11h_openssl_ex_data_dup ( + long argl, + void *argp + ) { +-#else ++#elif OPENSSL_VERSION_NUMBER < 0x30000000L + int + __pkcs11h_openssl_ex_data_dup ( + CRYPTO_EX_DATA *to, + const CRYPTO_EX_DATA *from, + void *from_d, ++ int idx, ++ long argl, ++ void *argp ++) { ++#else ++int ++__pkcs11h_openssl_ex_data_dup ( ++ CRYPTO_EX_DATA *to, ++ const CRYPTO_EX_DATA *from, ++ void **from_d, + int idx, + long argl, + void *argp