From nobody Mon Nov 09 05:41:16 2026 X-Original-To: dev-commits-src-all@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 4jNJYS56wfz6xhfT for ; Mon, 09 Nov 2026 05:41:16 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jNJYS3m3mz4Hv5 for ; Mon, 09 Nov 2026 05:41:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794202876; 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=sL3wT3sPz/B43g72f6/Ja5KDkdRPBxTI7SWnoTh5deI=; b=Zi2YHHbd1LPO1Krf6P8Oh8pfxg8M76SMLJpU/aqhZNZrbiUJLxocMYbrmuYgiXTYxPtnUU TzpA18r6WHoJsvx7BLN5QcavKNlxjfYH8PUvSWB3Hvr/2CBTt4dP/YCcaLzaRoasojs0lZ jtMDQ6Xt8HfbCuX0XeOWR8IK6+OGrmAv89m4jgZFhFctmpJGALcxaAhbKF1foRUYPUiIma ZWHujB6mR4lYoSN3cNu+qkn3apgR+U3x110ui6PR7+6IuikHPG8aMoGNWIy9VWfjjGMgx4 JdrUS132lVkeVV+/YI4oJ7fTXuFB5Vv8uh4ac7AOYJrzTOJufMx1+63sTISCjQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794202876; b=dHwTGcb3ILR2jW5mbbb+kb5c1CrKeEWYk9JsyHrQQZyWi67Si9qZ9bPqjbDCo6qFZXEYup kQJyf5ZH+57IXD4Id9+V9v4bpZsma6kDdtYQ35H4Smjd1wWcmhU6jyjIVJvB216/BAH7oj 3BVgQTUn9ENq/C/rCb0vt+5rqQN4dcFq9BA60Pko8VVkS8U31cwgK643uBubfR517bv9Xf lKZk5zNDoDnx7e5nrYyhTbLyZaZxAlnWvthBQIzJESFWFtMSOPt7AubGtYdT4CELHTGYyj V7TJemjv5EqiQr5EjPYgXE0BdEwv5AntlJjbZ7cbwTpM070Vy235Fu1JHlvlFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794202876; 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=sL3wT3sPz/B43g72f6/Ja5KDkdRPBxTI7SWnoTh5deI=; b=wBKQiLI8WKllaJFTN50lObil+qav8EiFwOnaaIYnY/qFCqfjvcV71z50f5qYNDiM3f8qFD OEkt/BqBR/I158MjUTzCXgNVFyXT6JhdUWkj854KqDYsLh/XRVpmkadyeJXhao/C3RhY7E YmJt4uKQAkev60FvxFjSSF09g1eraWE9NF+RCkP8r/idioS0G3K9lZ9BJjkIxlCQaFdPec G+jVC9n0wFnSRHgLoGOWmIZgiP/+HNjVGMCf2gNbI6y8EU0iKfNTe7wQSeUYgFcOpUV0Kl HjQ8nCKA57QoDybGYeoNd7CGxlcOw5GMdi/f2A7epXr54GDLG+cP+4ybd2xXjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jNJYS3QYszPxt for ; Mon, 09 Nov 2026 05:41:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1eba7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 09 Nov 2026 05:41:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gordon Tetlow Subject: git: 769c49de261f - main - openssl: export only the engine entry points List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gordon X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 769c49de261fbbd1293adab9188e5099516675cf Auto-Submitted: auto-generated Date: Mon, 09 Nov 2026 05:41:16 +0000 Message-Id: <6af15cfc.1eba7.cdb9ff9@gitrepo.freebsd.org> The branch main has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=769c49de261fbbd1293adab9188e5099516675cf commit 769c49de261fbbd1293adab9188e5099516675cf Author: Gordon Tetlow AuthorDate: 2026-11-09 05:39:08 +0000 Commit: Gordon Tetlow CommitDate: 2026-11-09 05:40:49 +0000 openssl: export only the engine entry points Upstream links every dynamic engine with a version script, engines/.ld, that exports bind_engine and v_check and makes everything else local. FreeBSD's engines had no version script, so they exported every global symbol, including _init and _fini. loader_attic.so compiles its own copy of crypto/pem/pvkfmt.c and so also exported 21 of its functions; 14 of them (b2i_*, i2b_*) have the same names as public libcrypto functions. Add one Version.map for all engines, the same as upstream's, and use it from engines/Makefile.inc. The engines are loaded only with dlopen(), and libcrypto looks up only bind_engine and v_check, so hiding the other symbols does not affect any consumer. Tested via tinderbox: capi.so, devcrypto.so and loader_attic.so link with --no-undefined-version and export only bind_engine and v_check. devcrypto lists the same ciphers as before, and loader_attic loads and reads a PVK RSA key through "openssl storeutl -engine loader_attic". Reviewed by: ngie MFC after: 1 week MFC to: stable/15 Event: FreeBSD Vendor Summit 2026 Differential Revision: https://reviews.freebsd.org/D61273 --- secure/lib/libcrypto/engines/Makefile.inc | 3 +++ secure/lib/libcrypto/engines/Version.map | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/secure/lib/libcrypto/engines/Makefile.inc b/secure/lib/libcrypto/engines/Makefile.inc index 146c2f794eb6..b6188571f04c 100644 --- a/secure/lib/libcrypto/engines/Makefile.inc +++ b/secure/lib/libcrypto/engines/Makefile.inc @@ -3,6 +3,9 @@ LIB_PACKAGE= SHLIBDIR= ${LIBDIR}/engines-3 +# Export only the dynamic-engine entry points, as upstream engines/*.ld do. +VERSION_MAP= ${.CURDIR:H}/Version.map + LCRYPTO_SRC= ${SRCTOP}/crypto/openssl CFLAGS+= -I${LCRYPTO_SRC}/engines diff --git a/secure/lib/libcrypto/engines/Version.map b/secure/lib/libcrypto/engines/Version.map new file mode 100644 index 000000000000..7a26b813827b --- /dev/null +++ b/secure/lib/libcrypto/engines/Version.map @@ -0,0 +1,6 @@ +{ + global: + bind_engine; + v_check; + local: *; +};