From f5120a46371ff75f401c1cb724c3880811bfbae0 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 3 Dec 2022 15:41:32 +0100 Subject: pjproject: bump to 2.12.1 This is a manual cherry-pick of a57228588602e5217b95f1e9ded0b76402cb6c72 and 472f1ac7ac867b8fbc2841c56e7d61935dba9d52. The only difference is that the uclibc-related patches were not dropped, because uclibc is used in OpenWrt 21.02. - add "--disable-android-mediacodec" to configure - add EXCLUDE_APP=1 to "make" calls so some apps aren't built (speeds up the build a bit) - drop "sed" call as no longer needed - update 0004-config_site.patch to sync up with Asterisk 18.14.0 - update 0006-fix-pkg_config-file.patch as there were some changes in this area upstream - add 0007-execinfo.patch to prevent errors due to missing - sync patches with Asterisk 18.14.0 - backports two security fixes (c4d3498 and 450baca) from pjproject 2.13, source: asterisk 20.0.1 Signed-off-by: Sebastian Kemper --- ...90-Skip-unsupported-digest-algorithm-2408.patch | 201 --------------------- 1 file changed, 201 deletions(-) delete mode 100644 libs/pjproject/patches/0090-Skip-unsupported-digest-algorithm-2408.patch (limited to 'libs/pjproject/patches/0090-Skip-unsupported-digest-algorithm-2408.patch') diff --git a/libs/pjproject/patches/0090-Skip-unsupported-digest-algorithm-2408.patch b/libs/pjproject/patches/0090-Skip-unsupported-digest-algorithm-2408.patch deleted file mode 100644 index c779f67..0000000 --- a/libs/pjproject/patches/0090-Skip-unsupported-digest-algorithm-2408.patch +++ /dev/null @@ -1,201 +0,0 @@ -From bdbeb7c4b2b11efc2e59f5dee7aa4360a2bc9fff Mon Sep 17 00:00:00 2001 -From: sauwming -Date: Thu, 22 Apr 2021 14:03:28 +0800 -Subject: [PATCH 90/90] Skip unsupported digest algorithm (#2408) - -Co-authored-by: Nanang Izzuddin ---- - pjsip/src/pjsip/sip_auth_client.c | 32 +++++-- - tests/pjsua/scripts-sipp/uas-auth-two-algo.py | 7 ++ - .../pjsua/scripts-sipp/uas-auth-two-algo.xml | 83 +++++++++++++++++++ - 3 files changed, 117 insertions(+), 5 deletions(-) - create mode 100644 tests/pjsua/scripts-sipp/uas-auth-two-algo.py - create mode 100644 tests/pjsua/scripts-sipp/uas-auth-two-algo.xml - ---- a/pjsip/src/pjsip/sip_auth_client.c -+++ b/pjsip/src/pjsip/sip_auth_client.c -@@ -1042,7 +1042,7 @@ static pj_status_t process_auth( pj_pool - pjsip_hdr *hdr; - pj_status_t status; - -- /* See if we have sent authorization header for this realm */ -+ /* See if we have sent authorization header for this realm (and scheme) */ - hdr = tdata->msg->hdr.next; - while (hdr != &tdata->msg->hdr) { - if ((hchal->type == PJSIP_H_WWW_AUTHENTICATE && -@@ -1052,7 +1052,8 @@ static pj_status_t process_auth( pj_pool - { - sent_auth = (pjsip_authorization_hdr*) hdr; - if (pj_stricmp(&hchal->challenge.common.realm, -- &sent_auth->credential.common.realm )==0) -+ &sent_auth->credential.common.realm)==0 && -+ pj_stricmp(&hchal->scheme, &sent_auth->scheme)==0) - { - /* If this authorization has empty response, remove it. */ - if (pj_stricmp(&sent_auth->scheme, &pjsip_DIGEST_STR)==0 && -@@ -1062,6 +1063,14 @@ static pj_status_t process_auth( pj_pool - hdr = hdr->next; - pj_list_erase(sent_auth); - continue; -+ } else -+ if (pj_stricmp(&sent_auth->scheme, &pjsip_DIGEST_STR)==0 && -+ pj_stricmp(&sent_auth->credential.digest.algorithm, -+ &hchal->challenge.digest.algorithm)!=0) -+ { -+ /* Same 'digest' scheme but different algo */ -+ hdr = hdr->next; -+ continue; - } else { - /* Found previous authorization attempt */ - break; -@@ -1155,9 +1164,10 @@ PJ_DEF(pj_status_t) pjsip_auth_clt_reini - { - pjsip_tx_data *tdata; - const pjsip_hdr *hdr; -- unsigned chal_cnt; -+ unsigned chal_cnt, auth_cnt; - pjsip_via_hdr *via; - pj_status_t status; -+ pj_status_t last_auth_err; - - PJ_ASSERT_RETURN(sess && rdata && old_request && new_request, - PJ_EINVAL); -@@ -1178,6 +1188,8 @@ PJ_DEF(pj_status_t) pjsip_auth_clt_reini - */ - hdr = rdata->msg_info.msg->hdr.next; - chal_cnt = 0; -+ auth_cnt = 0; -+ last_auth_err = PJSIP_EAUTHNOAUTH; - while (hdr != &rdata->msg_info.msg->hdr) { - pjsip_cached_auth *cached_auth; - const pjsip_www_authenticate_hdr *hchal; -@@ -1222,8 +1234,13 @@ PJ_DEF(pj_status_t) pjsip_auth_clt_reini - */ - status = process_auth(tdata->pool, hchal, tdata->msg->line.req.uri, - tdata, sess, cached_auth, &hauth); -- if (status != PJ_SUCCESS) -- return status; -+ if (status != PJ_SUCCESS) { -+ last_auth_err = status; -+ -+ /* Process next header. */ -+ hdr = hdr->next; -+ continue; -+ } - - if (pj_pool_get_used_size(cached_auth->pool) > - PJSIP_AUTH_CACHED_POOL_MAX_SIZE) -@@ -1236,12 +1253,17 @@ PJ_DEF(pj_status_t) pjsip_auth_clt_reini - - /* Process next header. */ - hdr = hdr->next; -+ auth_cnt++; - } - - /* Check if challenge is present */ - if (chal_cnt == 0) - return PJSIP_EAUTHNOCHAL; - -+ /* Check if any authorization header has been created */ -+ if (auth_cnt == 0) -+ return last_auth_err; -+ - /* Remove branch param in Via header. */ - via = (pjsip_via_hdr*) pjsip_msg_find_hdr(tdata->msg, PJSIP_H_VIA, NULL); - via->branch_param.slen = 0; ---- /dev/null -+++ b/tests/pjsua/scripts-sipp/uas-auth-two-algo.py -@@ -0,0 +1,7 @@ -+# $Id$ -+# -+import inc_const as const -+ -+PJSUA = ["--null-audio --max-calls=1 --id=sip:a@localhost --username=a --realm=* --registrar=$SIPP_URI"] -+ -+PJSUA_EXPECTS = [[0, "registration success", ""]] ---- /dev/null -+++ b/tests/pjsua/scripts-sipp/uas-auth-two-algo.xml -@@ -0,0 +1,83 @@ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -+ -- cgit