Commit 6dd247e0 authored by Pekka Pessi's avatar Pekka Pessi
Browse files

Fixed auth-int authentication for INVITE requests.

Files: nua/nua_stack.c, nua/nua_session.c, iptsec/auth_client.c.

darcs-hash:20060420084605-65a35-181582b9fbbee9a6d476559f9b68c42b7ab997b3.gz
parent 9a457587
......@@ -492,6 +492,12 @@ int auc_authorization(auth_client_t **auc_list, msg_t *msg, msg_pub_t *pub,
auth_client_t *ca;
msg_mclass_t const *mc = msg_mclass(msg);
if (auc_list == NULL || msg == NULL)
return -1;
if (pub == NULL)
pub = msg_object(msg);
/* Make sure every challenge has credentials */
for (ca = *auc_list; ca; ca = ca->ca_next) {
if (!ca->ca_user || !ca->ca_pass || !ca->ca_authorize)
......
......@@ -1369,17 +1369,18 @@ int nua_creq_check_restart(nua_handle_t *nh,
((status == 401 && sip->sip_www_authenticate) ||
(status == 407 && sip->sip_proxy_authenticate)) &&
nh_challenge(nh, sip) > 0) {
sip_t *rsip;
msg_t *request = nta_outgoing_getrequest(orq);
sip_t *rsip = sip_object(request);
int done;
rsip = sip_object(cr->cr_msg);
/* XXX - check for instant restart */
done = auc_authorization(&nh->nh_auth, cr->cr_msg, (msg_pub_t*)rsip,
done = auc_authorization(&nh->nh_auth, cr->cr_msg, (msg_pub_t*)NULL,
rsip->sip_request->rq_method_name,
rsip->sip_request->rq_url,
rsip->sip_payload);
msg_destroy(request);
if (done > 0) {
return
nua_creq_restart_with(nh, cr, orq,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment