[PATCH 2/3] openssl: Add legacy packageconfig option

Colin Pinnell McAllister
2026-02-11T18:51:59Z

Add packageconfig option to enable legacy support (disabled by default).
The legacy module includes deprecated and unmaintained OpenSSL
components. The openssl-ossl-module-legacy package that includes the
module is now conditional on the packageconfig option being enabled.
Packages that depend on this package are also now conditional on the
packageconfig option.

Signed-off-by: Colin Pinnell McAllister <colinmca242@gmail.com>
---
meta/recipes-connectivity/openssl/openssl_3.5.5.bb | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-connectivity/openssl/openssl_3.5.5.bb b/meta/recipes-connectivity/openssl/openssl_3.5.5.bb
index 6b9ccef0b5..c9d74002a7 100644
--- a/meta/recipes-connectivity/openssl/openssl_3.5.5.bb
+++ b/meta/recipes-connectivity/openssl/openssl_3.5.5.bb
@@ -29,6 +29,7 @@ PACKAGECONFIG:class-native = ""
PACKAGECONFIG:class-nativesdk = ""

PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux,,cryptodev-module"
+PACKAGECONFIG[legacy] = ",no-legacy"
PACKAGECONFIG[tls1] = ",no-tls1"
PACKAGECONFIG[tls1_1] = ",no-tls1_1"
PACKAGECONFIG[manpages] = ""
@@ -257,7 +258,8 @@ pkg_postinst_ontarget:${PN}-ossl-module-fips () {
# file to be installed for both the openssl-bin package and the libcrypto
# package since the openssl-bin package depends on the libcrypto package.

-PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc ${PN}-ossl-module-legacy ${PN}-ossl-module-fips"
+PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc ${PN}-ossl-module-fips"
+PACKAGES =+ "${@bb.utils.contains("PAKCAGECONFIG", "legacy", "${PN}-ossl-module-legacy", "", d)}"

FILES:libcrypto = "${libdir}/libcrypto${SOLIBS}"
FILES:libssl = "${libdir}/libssl${SOLIBS}"
@@ -275,9 +277,11 @@ FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/open

CONFFILES:openssl-conf = "${sysconfdir}/ssl/openssl.cnf"

-RRECOMMENDS:libcrypto += "openssl-conf ${PN}-ossl-module-legacy"
+RRECOMMENDS:libcrypto += "openssl-conf"
+RRECOMMENDS:libcrypto += "${@bb.utils.contains("PAKCAGECONFIG", "legacy", "${PN}-ossl-module-legacy", "", d)}"
RDEPENDS:${PN}-misc = "perl"
-RDEPENDS:${PN}-ptest += "openssl-bin perl perl-modules bash sed openssl-engines openssl-ossl-module-legacy"
+RDEPENDS:${PN}-ptest += "openssl-bin perl perl-modules bash sed openssl-engines"
+RDEPENDS:${PN}-ptest += "${@bb.utils.contains("PAKCAGECONFIG", "legacy", "${PN}-ossl-module-legacy", "", d)}"

RDEPENDS:${PN}-bin += "openssl-conf"

--
2.53.0