From patchwork Tue Dec 1 01:54:27 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 106613 Received: from mail-dl1-f43.google.com (mail-dl1-f43.google.com [74.125.82.43]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.2334.1796090070472436894 for ; Mon, 30 Nov 2026 17:54:30 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20260707 header.b=t3kCg5UZ; spf=pass (domain: gmail.com, ip: 74.125.82.43, mailfrom: raj.khem@gmail.com) Received: by mail-dl1-f43.google.com with SMTP id a92af1059eb24-1a2761c69fbso18653244c88.0 for ; Mon, 30 Nov 2026 17:54:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796090070; x=1796694870; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=wIh78V7TIhIS4HifURw+a9pmSE9Z5IV94mytCupE3Rg=; b=t3kCg5UZQNc07lQWU2NP0qPCgWz6kRbmdPHpBh1zHRtcuo0i1OrZBtldb5plbbN6SO 3COneH9CdKtvyqcywNi/7MBCB4REKasawjxfVRFhKzep1oxI4ShThQGm9zeHjE6VMWMa NzkB/H1V59Pnhbt3b7C88Z7mid25oJwMbv7I7sE8S5Sdg0aqR7Vmkj49EJhHtbNo0IqT IW+0EjExTN6i+GpsgdwDryrsHpSpnXJXLVLjy+GlBJaoI/cBzZknBvUhNqo9zeaDuPIb TIB8m/rsJfKzs8eRd4RAPbYyNaez1MYvPCXqmard658Qder4tbCD81wkqoE2Ebp0ZkrK 2QMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796090070; x=1796694870; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=wIh78V7TIhIS4HifURw+a9pmSE9Z5IV94mytCupE3Rg=; b=nULSxRHDDvZt6t6Hgfcd4U9pQLeT1KeT0KGsqibf8sFNS7IwOAcx8FpYm7vDaakNeK omt19KUf49n+avUpWpNhAPt2gzTk0hwC7jUxD9gRRplwwhF6s2SDyhU/wiY6qeib7t9Y UYpwLXIifAONQuQB0KA5pXuEv/Deh3+rSwK0E4Pfo05sZO7JM3E7h8lfVmyHvButFf7K q3GDjAXcJNwFS8CK+/OMlvY34DjdgyEIDUpcKukCiuppjrCLBrCuc1oYjimrp7mLxDuC 3BDKzxOXuw4cIsHtxsNxx9v6nYWC/1xOptqlAl8iUVB4T/8SNZeoypKs8ybsmSDVTCDG gikA== X-Gm-Message-State: APuU4Z+eAfsJAwW2l7xVZtqzP1Ca3iaCqoICuXN3PtvWu53lAu3vmT4g ZpvkMhNz+dkaaLGSN14QTqy2qDGaq4qhtVcopYW3vCquthaBBhmQazaBRYSUGzq1 X-Gm-Gg: AZFdTZeYMXFDFg3LsJErUhqz0mnCU4a3ZAnlmzkzlfYut4G5kP0Nmt3i37voWpLD9c/ xLdaI+/SWa2TEEV09mNTakNoEhA9Db2Fq1QwCz3T0pjSc5cyqPWvROg1L0KFnZwSX0ba/ld07cJ wHXpNwxuezD+QrWK09xm7171WH3VWLcXQ9C+2BINPu1GrcwkRJ0SGlAy0uSZ7uGY/i/cnkhYp6J uYwxqKWSl9hode2KGlUemgU1zs6lpelVwroUXTvs3s74QRiRZmsioz81tzpPOMabCsh4QfyMdWS aCBTzFBaykLzuBsHOooxAVE7qlXeFmptRkrscQVuE7RroPe4v3JW3SE0QoOxSyAUTjaSuTHycMK P0xBkfIyNSTXoU7WDJ3skTiL2irqXqRM0Wzc3tY234zzYW/rIOxCG/BoL/Zgx8jB7q6bFD9HY6I iAoVOYcMWxtZpZJZaD8hFL9ij0aWYqXVuA8gybBbd8Mgvruom/Bf/ya3wqo1J+nPpklJ4Sf5gZH AUj1hK5gYKBG/iOrwlloouH+IBJ2bXiQRSgvr/0qlw/V03f5/CzYIB9ShOQDy6AFM3xzDlzkhou JOSOznM+D/sfT+eK+f74KCWMDvjrmir7gVnddX7TnXewcKWpmHELB8IMCBFUtbeS5Ruk7+Z0eFo BM2oSWaJDl+rho1yx+ccNjdDzgdOtF8hDMM/0Xq3cQWKw+DrKpXYCnKIwFTaY7g6LrREiiKFBUm 9ETkps9fcSwdekwAcR2Hsr2cPEwqY43yl2YwY0B3YPERoM36PCsZqHpBjjF3gqYTRjvTvnqPL3j u6bX7ftXXouvjk1XgtiNAklrY8nrzueV5sbmvm210dCK5XowPN+mg6vDbAKSV4FVil2Plrxb+t5 8qjN X-Received: by 2002:a05:701b:230d:b0:1b5:8a6e:8791 with SMTP id a92af1059eb24-1b58a6e8aaamr17046727c88.7.1796090069672; Mon, 30 Nov 2026 17:54:29 -0800 (PST) Return-Path: Received: from apollo.tail3ccdd3.ts.net ([147.160.63.35]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b55681301asm81519161c88.8.2026.11.30.17.54.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 17:54:29 -0800 (PST) From: Khem Raj X-Google-Original-From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-oe][PATCH v2] librelp: upgrade 1.14.0 -> 1.15.0 Date: Mon, 30 Nov 2026 17:54:27 -0800 Message-ID: <20261201015427.3533499-1-khem.raj@oss.qualcomm.com> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261130211916.1887290-5-khem.raj@oss.qualcomm.com> References: <20261130211916.1887290-5-khem.raj@oss.qualcomm.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Tue, 01 Dec 2026 01:54:33 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/133617 librelp is now licensed entirely under Apache-2.0. Earlier releases were GPL-3.0-or-later (with part of the files already Apache-2.0 in 1.14.0); code whose contributors could not be cleared was rewritten. COPYING now states the license and points to COPYING.ASL20, which holds the license text, so track both. This is the last 1.x release and the last to support OpenSSL 1.0.2 and 1.1.0. The API is extended in a backward compatible way and the soname is unchanged. Behaviour changes: - servers accept at most 500 sessions, an incomplete session open must finish within 30 s and an idle session is closed after 3600 s; new relpEngineSetMaxSessions(), relpEngineSetOpenTimeout() and relpEngineSetIdleTimeout() change the limits - OpenSSL clients in "certvalid" and "name" auth modes verify the certificate chain, each client and listener with its own SSL context - a TLS listener no longer falls back to plain TCP in a build without TLS support - client-only commands are rejected, and syslog messages are not acknowledged when the host callback is missing or fails Fixes: no SIGPIPE on plain TCP sends to a closed peer, the default listen port, a listener leak on failed startup, the connect timeout (monotonic clock, EINTR) and relpTcpWaitWriteable() timing. The GnuTLS fingerprint matcher is rewritten, and librelp.h can be included from C++. Add a patch for building with OpenSSL 4.1: 1.15.0 calls the now deprecated ASN1_STRING_length() and passes the const X509_NAME * that X509_get_issuer_name() returns to a non-const parameter, both errors under the -Werror the build uses. License-Update: relicensed from GPL-3.0-or-later to Apache-2.0 AI-Generated: Uses Claude Code Signed-off-by: Khem Raj --- v2: Rework 0002-tcp-build-with-OpenSSL-4.1.patch to match upstream PR rsyslog/librelp#360 (relpOsslAsn1StrLen() helper with a size_t SAN length, const X509_NAME * for relpTcpCertNameText()), keeping the pre-1.1.0 OpenSSL code paths that 1.15.0 still supports, and mark it Upstream-Status: Submitted. Commit message unchanged. .../0002-tcp-build-with-OpenSSL-4.1.patch | 96 +++++++++++++++++++ .../{librelp_1.14.0.bb => librelp_1.15.0.bb} | 8 +- 2 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 meta-oe/recipes-extended/rsyslog/librelp/0002-tcp-build-with-OpenSSL-4.1.patch rename meta-oe/recipes-extended/rsyslog/{librelp_1.14.0.bb => librelp_1.15.0.bb} (91%) diff --git a/meta-oe/recipes-extended/rsyslog/librelp/0002-tcp-build-with-OpenSSL-4.1.patch b/meta-oe/recipes-extended/rsyslog/librelp/0002-tcp-build-with-OpenSSL-4.1.patch new file mode 100644 index 0000000000..b745d36770 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/librelp/0002-tcp-build-with-OpenSSL-4.1.patch @@ -0,0 +1,96 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 30 Nov 2026 15:38:30 -0800 +Subject: [PATCH] tcp: build with OpenSSL 4.1 + +OpenSSL 4.0 makes X509_get_issuer_name() and X509_get_subject_name() +return a const X509_NAME *, and OpenSSL 4.1 deprecates +ASN1_STRING_length() in favour of ASN1_STRING_get_length(). With +-Werror, the build fails with: + + src/tcp.c:395:14: error: 'ASN1_STRING_length' is deprecated: Since OpenSSL 4.1; use ASN1_STRING_get_length() [-Werror,-Wdeprecated-declarations] + src/tcp.c:485:22: error: passing 'const X509_NAME *' (aka 'const struct X509_name_st *') to parameter of type 'X509_NAME *' (aka 'struct X509_name_st *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers] + +This takes the two corresponding changes from upstream PR #360: the +relpOsslAsn1StrLen() helper, with the SAN length as a size_t, and a +const X509_NAME * for relpTcpCertNameText(). The PR is stacked on #354, +which drops support for OpenSSL older than 1.1.1, so its hunks do not +apply to 1.15.0. Here the older code paths are kept, and +X509_NAME_oneline() gets a cast for OpenSSL before 1.1.0, where it takes +a non-const name. The rest of the PR (SSL_get1_peer_certificate(), the +SSL_CTX_set_ecdh_auto() removal and a CI job) is not needed to build. + +Upstream-Status: Submitted [https://github.com/rsyslog/librelp/pull/360] +Signed-off-by: Khem Raj +--- + src/tcp.c | 28 ++++++++++++++++++++++++---- + 1 file changed, 24 insertions(+), 4 deletions(-) + +diff --git a/src/tcp.c b/src/tcp.c +index e748b3f..d6b3aeb 100644 +--- a/src/tcp.c ++++ b/src/tcp.c +@@ -338,6 +338,21 @@ finalize_it: + LEAVE_RELPFUNC; + } + ++/* Length of an ASN1_STRING. OpenSSL 4.1 deprecates ASN1_STRING_length() ++ * in favour of ASN1_STRING_get_length(). A negative legacy result maps to ++ * SIZE_MAX, which callers reject as too long. ++ */ ++static size_t ++relpOsslAsn1StrLen(const ASN1_STRING *const str) ++{ ++#if OPENSSL_VERSION_NUMBER >= 0x40100000L && !defined(LIBRESSL_VERSION_NUMBER) ++ return ASN1_STRING_get_length(str); ++#else ++ const int len = ASN1_STRING_length(str); ++ return (len < 0) ? SIZE_MAX : (size_t) len; ++#endif ++} ++ + /* Check the peer's ID in name auth mode. */ + static int + relpTcpChkPeerName_ossl(relpTcp_t *const pThis, void *vcert) +@@ -357,7 +372,7 @@ relpTcpChkPeerName_ossl(relpTcp_t *const pThis, void *vcert) + int gtype; + ASN1_STRING *asDnsName; + const unsigned char *sanData; +- int sanLen; ++ size_t sanLen; + char sanName[1024]; + + ENTER_RELPFUNC; +@@ -392,14 +407,14 @@ relpTcpChkPeerName_ossl(relpTcp_t *const pThis, void *vcert) + continue; + if(asDnsName == NULL) + ABORT_FINALIZE(RELP_RET_AUTH_CERT_INVL); +- sanLen = ASN1_STRING_length(asDnsName); ++ sanLen = relpOsslAsn1StrLen(asDnsName); + + # if OPENSSL_VERSION_NUMBER >= 0x10100000L + sanData = ASN1_STRING_get0_data(asDnsName); + # else + sanData = ASN1_STRING_data(asDnsName); + # endif +- if(sanLen <= 0 || (size_t)sanLen >= sizeof(sanName) || sanData == NULL ++ if(sanLen == 0 || sanLen >= sizeof(sanName) || sanData == NULL + || memchr(sanData, '\0', sanLen) != NULL) + ABORT_FINALIZE(RELP_RET_AUTH_CERT_INVL); + memcpy(sanName, sanData, sanLen); +@@ -448,9 +463,14 @@ finalize_it: + * A missing certificate or name yields "(none)". + */ + static void +-relpTcpCertNameText(X509_NAME *const name, char *const buf, const size_t lenBuf) ++relpTcpCertNameText(const X509_NAME *const name, char *const buf, const size_t lenBuf) + { ++# if OPENSSL_VERSION_NUMBER >= 0x10100000L + if(name == NULL || X509_NAME_oneline(name, buf, (int) lenBuf) == NULL) { ++# else ++ /* before OpenSSL 1.1.0, X509_NAME_oneline() takes a non-const name */ ++ if(name == NULL || X509_NAME_oneline((X509_NAME *) name, buf, (int) lenBuf) == NULL) { ++# endif + snprintf(buf, lenBuf, "(none)"); + } + } diff --git a/meta-oe/recipes-extended/rsyslog/librelp_1.14.0.bb b/meta-oe/recipes-extended/rsyslog/librelp_1.15.0.bb similarity index 91% rename from meta-oe/recipes-extended/rsyslog/librelp_1.14.0.bb rename to meta-oe/recipes-extended/rsyslog/librelp_1.15.0.bb index 55dbef2509..3ee31be3ec 100644 --- a/meta-oe/recipes-extended/rsyslog/librelp_1.14.0.bb +++ b/meta-oe/recipes-extended/rsyslog/librelp_1.15.0.bb @@ -1,17 +1,19 @@ SUMMARY = "A reliable logging library" HOMEPAGE = "https://github.com/rsyslog/librelp" -LICENSE = "GPL-3.0-only" -LIC_FILES_CHKSUM = "file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=12b2b1deab5b47f85769b01d9a339204 \ + file://COPYING.ASL20;md5=3b83ef96387f14655fc854ddc3c6bd57" DEPENDS = "gmp libidn zlib" SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https;branch=main;tag=v${PV} \ file://run-ptest \ file://0001-tests-skip-tls-ossl-connect-failure-vg.sh-without-li.patch \ + file://0002-tcp-build-with-OpenSSL-4.1.patch \ " -SRCREV = "87a447e3f656d3e4d6e5f9d1f0e72a16527d342d" +SRCREV = "9212985f9309413d520558a0682bcb29cd6a0cdc" CVE_PRODUCT = "rsyslog:librelp"