diff options
author | Mark Michelson <mmichelson@digium.com> | 2013-09-13 14:44:43 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2013-09-13 14:44:43 +0000 |
commit | bbf5fbbd8c6aa4ec2e8b48da1926b24a32632ca5 (patch) | |
tree | 1252c88d3cb3ff488b35bbba9f5ace52300a5cc0 /res/res_pjsip_authenticator_digest.c | |
parent | 8c24c69724f4dcebc655707783b4af177435d249 (diff) |
Change how realms are handled for outbound authentication.
With this change, if no realm is specified in an outbound auth
section, then we will simply match the realm that was present
in the 401/407 challenge.
(closes issue ASTERISK-22471)
Reported by George Joseph
(closes issue ASTERISK-22386)
Reported by Rusty Newton
Patches:
outbound_auth_realm_v4.patch uploaded by George Joseph (License #6322)
........
Merged revisions 399059 from http://svn.asterisk.org/svn/asterisk/branches/12
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@399082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_authenticator_digest.c')
-rw-r--r-- | res/res_pjsip_authenticator_digest.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/res/res_pjsip_authenticator_digest.c b/res/res_pjsip_authenticator_digest.c index b2c6cccb4..cc312b1e0 100644 --- a/res/res_pjsip_authenticator_digest.c +++ b/res/res_pjsip_authenticator_digest.c @@ -395,6 +395,9 @@ static enum ast_sip_check_auth_result digest_check_auth(struct ast_sip_endpoint } for (i = 0; i < endpoint->inbound_auths.num; ++i) { + if (ast_strlen_zero(auths[i]->realm)) { + ast_string_field_set(auths[i], realm, "asterisk"); + } verify_res[i] = verify(auths[i], rdata, tdata->pool); if (verify_res[i] == AUTH_SUCCESS) { res = AST_SIP_AUTHENTICATION_SUCCESS; |