From nobody Mon Nov 16 06:33:22 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 4jSdNM0sqWz71HrZ for ; Mon, 16 Nov 2026 06:33:23 +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 4jSdNL6P9Vz3NTv for ; Mon, 16 Nov 2026 06:33:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794810802; 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=tfDUmWeHMTq1KI5bjwCQIRxMLHWG2RneyEzR1edvCuA=; b=ShkuUIxaiHNbVIAIkl0ceeG0v6l6OfGICEwTJSVoxmecKUhTuaURggiWqpdYr4l7PcvlAa I/YWvNnRDm4xVyTrhIUu9Yn/0AhiJl6WfysSzBAyLbSBnj877hVCGdpW/JdfOWeR2PHXGz JnvxDMPVfqWBd4QWswsAavYkHaRH4c7g0sbTKOXAZpwe8e1+Woqlou2qYioXJaaQm+smxc Fsk4IQsR9k9gEtA4+tg8Uex35OHjDkIF0WmvaFIo0fWLWbHFBDIkyoQDGre2OWevB7HRpU YrsxprfO2BGHhWjekyKaREzcKdHma2cCgvM58/951yY0IY4ACd9DoZ7I5D1wfw== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794810802; b=cJXDvnSKuEuU82ZAhgn3AyxN5nPT9e2sbWJwM+nDR1MN8ADSMI3+jFUiND7uGTz0jkxFBW 76P+CI4ol7Ni5ct9EO+1ZIlJ5VS6XE8foPqB7CpAmYQpXxEzm7uMyFfb6ysYlg5KLANbFV HzvHJZxA4wi3Ty69L8JDNxBGKVfE05cCz64aUt1BuBN/Yp5g1bxhXJ3DAEkHnhTebIsSE/ PA/8MhVu0sPPvXkFQ4YU8GNBo2p1+0Ve6cRWjcj5pN7kDqh6hvgE9neOgLekeXzEKHadml TUUXAmNGIfe79kQ6ETsQ3vKE11aCdflms0Q4obUjEit1DFUJIxpHMettn3Neow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794810802; 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=tfDUmWeHMTq1KI5bjwCQIRxMLHWG2RneyEzR1edvCuA=; b=QsRlec+QF1OWkowjBnX8iMvcZJjsa/aCfTjzsQbEaGhjmEKglaCFWJnMyrCFMAF77b/Cx/ G5VgxeF20X8PALz/bKQgFF27DLyJzVxIRLqoE7uycixPIgYeJJYTmpejTH/F1W3Ech8KqL 68qqki2Z4uPTtNTLJAune9fehyqSc1I4EL0Kc9UXK8rpizqU19ETE6Otn7jbNsWSn+VdJW mYI0H6zyFs8FjIOtkwwBrQzkOCYmE9UElUuEiP8OSbYDiqymOXGP8PBpdRuV9M/Eoh/mLZ KhMmjLAueZIA8ATRe5yyE2GxD/vZ0mA+MKWe3WeF3o+7KsdQuc8SvFvM+JnBVg== 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 4jSdNL61K9zjr3 for ; Mon, 16 Nov 2026 06:33:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 16569 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 16 Nov 2026 06:33:22 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Gordon Tetlow Subject: git: e987a47237a6 - stable/15 - 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 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/stable/15 X-Git-Reftype: branch X-Git-Commit: e987a47237a61f391aaab99f402da75a2b6b58ec Auto-Submitted: auto-generated Date: Mon, 16 Nov 2026 06:33:22 +0000 Message-Id: <6afaa3b2.16569.52b1b61a@gitrepo.freebsd.org> The branch stable/15 has been updated by gordon: URL: https://cgit.FreeBSD.org/src/commit/?id=e987a47237a61f391aaab99f402da75a2b6b58ec commit e987a47237a61f391aaab99f402da75a2b6b58ec Author: Gordon Tetlow AuthorDate: 2026-11-09 05:39:08 +0000 Commit: Gordon Tetlow CommitDate: 2026-11-16 06:22:19 +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 Event: FreeBSD Vendor Summit 2026 Differential Revision: https://reviews.freebsd.org/D61273 (cherry picked from commit 769c49de261fbbd1293adab9188e5099516675cf) --- 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: *; +};