diff --git a/meta-multimedia/recipes-multimedia/pjproject/pjproject/0001-ssl_sock_ossl-fix-OpenSSL-4.0-compatibility.patch b/meta-multimedia/recipes-multimedia/pjproject/pjproject/0001-ssl_sock_ossl-fix-OpenSSL-4.0-compatibility.patch
new file mode 100644
index 0000000000..938eb6620f
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/pjproject/pjproject/0001-ssl_sock_ossl-fix-OpenSSL-4.0-compatibility.patch
@@ -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 */
diff --git a/meta-multimedia/recipes-multimedia/pjproject/pjproject_2.17.bb b/meta-multimedia/recipes-multimedia/pjproject/pjproject_2.17.bb
index 44100c8231..8aa7775205 100644
--- a/meta-multimedia/recipes-multimedia/pjproject/pjproject_2.17.bb
+++ b/meta-multimedia/recipes-multimedia/pjproject/pjproject_2.17.bb
@@ -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"
diff --git a/meta-oe/recipes-devtools/grpc/grpc/0002-tsi-fix-OpenSSL-4.0-const-and-opaque-compatibility.patch b/meta-oe/recipes-devtools/grpc/grpc/0002-tsi-fix-OpenSSL-4.0-const-and-opaque-compatibility.patch
index afaaf509ad..91f9c7e815 100644
--- a/meta-oe/recipes-devtools/grpc/grpc/0002-tsi-fix-OpenSSL-4.0-const-and-opaque-compatibility.patch
+++ b/meta-oe/recipes-devtools/grpc/grpc/0002-tsi-fix-OpenSSL-4.0-const-and-opaque-compatibility.patch
@@ -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 +++++-----
diff --git a/meta-oe/recipes-devtools/grpc/grpc/0003-tsi-fix-ssl_transport_security_utils-for-OpenSSL-4.0.patch b/meta-oe/recipes-devtools/grpc/grpc/0003-tsi-fix-ssl_transport_security_utils-for-OpenSSL-4.0.patch
index a7d6c0f789..56eaa50ad4 100644
--- a/meta-oe/recipes-devtools/grpc/grpc/0003-tsi-fix-ssl_transport_security_utils-for-OpenSSL-4.0.patch
+++ b/meta-oe/recipes-devtools/grpc/grpc/0003-tsi-fix-ssl_transport_security_utils-for-OpenSSL-4.0.patch
@@ -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 +++++-----
diff --git a/meta-oe/recipes-devtools/grpc/grpc/0004-tsi-fix-remaining-const-qualifiers-for-OpenSSL-4.0.patch b/meta-oe/recipes-devtools/grpc/grpc/0004-tsi-fix-remaining-const-qualifiers-for-OpenSSL-4.0.patch
index 468aa9d669..956ea64f33 100644
--- a/meta-oe/recipes-devtools/grpc/grpc/0004-tsi-fix-remaining-const-qualifiers-for-OpenSSL-4.0.patch
+++ b/meta-oe/recipes-devtools/grpc/grpc/0004-tsi-fix-remaining-const-qualifiers-for-OpenSSL-4.0.patch
@@ -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 +++----
