[PATCH v2 3/4] openssl: Add legacy packageconfig option

Colin Pinnell McAllister
2026-02-13T23:02:07Z

Add packageconfig option to enable legacy support (disabled by default).
The legacy module includes deprecated and unmaintained OpenSSL
components. Drops openssl-oss-module-legacy from a runtime depends to a
runtime recommends for ptest.

Signed-off-by: Colin Pinnell McAllister <colinmca242@gmail.com>
---
v2 changes:
* Removed conditional logic to add the legacy package based on the
packageconfig setting
* Moved ossl-module-legacy back to an rrecommends for libcrypto
* Moved ossl-module-legacy to an rrecommends for ptests instead of an
rdepends

meta/recipes-connectivity/openssl/openssl_3.5.5.bb | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/openssl/openssl_3.5.5.bb b/meta/recipes-connectivity/openssl/openssl_3.5.5.bb
index 6b9ccef0b5..7f81b976ba 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] = ""
@@ -277,7 +278,8 @@ CONFFILES:openssl-conf = "${sysconfdir}/ssl/openssl.cnf"

RRECOMMENDS:libcrypto += "openssl-conf ${PN}-ossl-module-legacy"
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"
+RRECOMMENDS:${PN}-ptest += "${PN}-ossl-module-legacy"

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

--
2.53.0