[Bug 272190] security/pkcs11-helper: make OpenSSL 3.0 compatible

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 24 Jun 2023 18:39:20 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272190

            Bug ID: 272190
           Summary: security/pkcs11-helper: make OpenSSL 3.0 compatible
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Keywords: needs-qa, patch
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ale@FreeBSD.org
          Reporter: mandree@FreeBSD.org
                CC: gert@greenie.muc.de
          Assignee: ale@FreeBSD.org
             Flags: maintainer-feedback?(ale@FreeBSD.org)

Created attachment 242975
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=242975&action=edit
git format-patch like patch to let pkcs11-helper compile with LLVM16 and
OpenSSL3.0 - run-time untested!

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 uses OpenSSL 3.0.9 in base, and
also uses the stricter LLVM/clang 16.0.6.

Add an OPENSSL_VERSION_SWITCH to support the newer
OpenSSL >= 3.0 prototype.

This could go with an
Approved by: portmgr@ (blanket just-fix-it)

... but I cannot test the run-time myself, so I am looking for ale@'s or
somebody else's support to test.

-- 
You are receiving this mail because:
You are the assignee for the bug.