Browse code

uid_auth_db: add ha1 parameter in auth_api.post_auth

auth api was updated to support Authentication-Info header and requires
now the ha1 value in post_auth.

AndreasHuber-CH authored on 25/05/2016 13:42:29
Showing 1 changed files
... ...
@@ -288,7 +288,7 @@ static inline int check_all_ha1(struct sip_msg* msg, struct hdr_field* hdr,
288 288
 					}
289 289
 
290 290
 					if (!check_response(dig, method, ha1)) {
291
-						if (auth_api.post_auth(msg, hdr) == AUTHENTICATED) {
291
+						if (auth_api.post_auth(msg, hdr, ha1) == AUTHENTICATED) {
292 292
 							generate_avps(*res, row);
293 293
 							return 0;
294 294
 						}
... ...
@@ -416,7 +416,7 @@ static inline int authenticate(struct sip_msg* msg, str* realm, authdb_table_inf
416 416
     
417 417
 	/* Recalculate response, it must be same to authorize successfully */
418 418
 	if (!check_response(&(cred->digest), &msg->first_line.u.request.method, ha1)) {
419
-		switch(auth_api.post_auth(msg, h)) {
419
+		switch(auth_api.post_auth(msg, h, ha1)) {
420 420
 		case ERROR:
421 421
 		case BAD_CREDENTIALS:
422 422
 			ret = -2;