mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-08-31 15:51:17 +00:00
pjproject: fix build with OpenSSL 4.0
OpenSSL 4.0 makes ASN1_TIME opaque. Backport upstream fix using ASN1_TIME_to_tm() API. Upstream-Status: Backport [https://github.com/pjsip/pjproject/commit/3923fad2e4f6] Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech> Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
||||
From 3923fad2e4f6f3403c3d6f1176b113c1c1b91066 Mon Sep 17 00:00:00 2001
|
||||
From: Ravi Kant Sharma <rks1986@gmail.com>
|
||||
Date: Wed, 24 Jun 2026 11:30:40 +0200
|
||||
Subject: [PATCH] ssl_sock_ossl: fix OpenSSL 4.0 compatibility (#5036)
|
||||
|
||||
Upstream-Status: Backport [https://github.com/pjsip/pjproject/commit/3923fad2e4f6]
|
||||
Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
|
||||
---
|
||||
pjlib/src/pj/ssl_sock_ossl.c | 11 ++++-------
|
||||
1 file changed, 4 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/pjlib/src/pj/ssl_sock_ossl.c b/pjlib/src/pj/ssl_sock_ossl.c
|
||||
index 000aabad61..93fcf10f14 100644
|
||||
--- a/pjlib/src/pj/ssl_sock_ossl.c
|
||||
+++ b/pjlib/src/pj/ssl_sock_ossl.c
|
||||
@@ -1645,10 +1645,7 @@ static pj_status_t init_ossl_ctx(pj_ssl_sock_t *ssock)
|
||||
if (PEM_read_bio_X509(new_bio, &x, NULL, NULL) == NULL)
|
||||
break;
|
||||
|
||||
- if ((xn = X509_get_subject_name(x)) == NULL)
|
||||
- break;
|
||||
-
|
||||
- if ((xn = X509_NAME_dup(xn)) == NULL )
|
||||
+ if ((xn = X509_NAME_dup(X509_get_subject_name(x))) == NULL )
|
||||
break;
|
||||
|
||||
#if !USING_BORINGSSL
|
||||
@@ -2105,9 +2102,9 @@ static pj_bool_t parse_ossl_asn1_time(pj_time_val *tv, pj_bool_t *gmt,
|
||||
pj_parsed_time pt;
|
||||
int i;
|
||||
|
||||
- utc = tm->type == V_ASN1_UTCTIME;
|
||||
- p = (char*)tm->data;
|
||||
- len = tm->length;
|
||||
+ utc = ASN1_STRING_type(tm) == V_ASN1_UTCTIME;
|
||||
+ p = (char*)M_ASN1_STRING_data(tm);
|
||||
+ len = M_ASN1_STRING_length(tm);
|
||||
end = p + len - 1;
|
||||
|
||||
/* GMT */
|
||||
@@ -12,7 +12,9 @@ SECTION = "libs"
|
||||
LICENSE = "GPL-2.0-or-later"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
|
||||
|
||||
SRC_URI = "git://github.com/pjsip/pjproject.git;protocol=https;branch=master;tag=${PV}"
|
||||
SRC_URI = "git://github.com/pjsip/pjproject.git;protocol=https;branch=master;tag=${PV} \
|
||||
file://0001-ssl_sock_ossl-fix-OpenSSL-4.0-compatibility.patch \
|
||||
"
|
||||
SRCREV = "5a457451fa2712ba18e12b01738e8ff3af2b26fd"
|
||||
|
||||
DEPENDS = "swig-native python3-setuptools-native"
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ and use ASN1_STRING accessors for opaque struct access.
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/grpc/grpc/pull/41932]
|
||||
|
||||
Note: Our fix for areas not covered by the upstream PR.
|
||||
|
||||
Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
|
||||
---
|
||||
src/core/tsi/ssl_transport_security.cc | 10 +++++-----
|
||||
|
||||
+2
@@ -9,6 +9,8 @@ auto* for X509_NAME and const for ASN1_OCTET_STRING.
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/grpc/grpc/pull/41932]
|
||||
|
||||
Note: Our fix for areas not covered by the upstream PR.
|
||||
|
||||
Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
|
||||
---
|
||||
src/core/tsi/ssl_transport_security_utils.cc | 10 +++++-----
|
||||
|
||||
+2
@@ -10,6 +10,8 @@ to avoid const-to-non-const assignment.
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/grpc/grpc/pull/41932]
|
||||
|
||||
Note: Our fix for areas not covered by the upstream PR.
|
||||
|
||||
Signed-off-by: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
|
||||
---
|
||||
src/core/tsi/ssl_transport_security.cc | 7 +++----
|
||||
|
||||
Reference in New Issue
Block a user