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)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@399059 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Michelson
2013-09-13 14:24:15 +00:00
parent 491188ab75
commit a0f8a2e4ce
3 changed files with 38 additions and 4 deletions

View File

@@ -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;