Prechádzať zdrojové kódy

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 9 rokov pred
rodič
commit
2a91141eba
1 zmenil súbory, kde vykonal 2 pridanie a 2 odobranie
  1. 2 2
      modules/uid_auth_db/authorize.c

+ 2 - 2
modules/uid_auth_db/authorize.c

@@ -288,7 +288,7 @@ static inline int check_all_ha1(struct sip_msg* msg, struct hdr_field* hdr,
 					}
 					}
 
 
 					if (!check_response(dig, method, ha1)) {
 					if (!check_response(dig, method, ha1)) {
-						if (auth_api.post_auth(msg, hdr) == AUTHENTICATED) {
+						if (auth_api.post_auth(msg, hdr, ha1) == AUTHENTICATED) {
 							generate_avps(*res, row);
 							generate_avps(*res, row);
 							return 0;
 							return 0;
 						}
 						}
@@ -416,7 +416,7 @@ static inline int authenticate(struct sip_msg* msg, str* realm, authdb_table_inf
     
     
 	/* Recalculate response, it must be same to authorize successfully */
 	/* Recalculate response, it must be same to authorize successfully */
 	if (!check_response(&(cred->digest), &msg->first_line.u.request.method, ha1)) {
 	if (!check_response(&(cred->digest), &msg->first_line.u.request.method, ha1)) {
-		switch(auth_api.post_auth(msg, h)) {
+		switch(auth_api.post_auth(msg, h, ha1)) {
 		case ERROR:
 		case ERROR:
 		case BAD_CREDENTIALS:
 		case BAD_CREDENTIALS:
 			ret = -2; 
 			ret = -2;