Hello All, I found a rare sofia bug when answering a "401 Authentication Required" message if the realm is defined as an IPv6 address (e.g. "scheme:\"[fe80::204:23ff:fea7:d60a]\":user:password"). The symptom was a "904 No Matching Challenge" reply to the nua_authenticate().
I changed the following lines (from base version 1.12.9+) in libsofia-sip-ua/iptsec/auth_client.c (diff file also attached). This modification successfully authenticates the IPv6 formatted realm. 303,308c303,309 < /* Data is string like "Basic:\"agni\":user1:secret" */ < if (s && (s = strchr(scheme = s, ':'))) < *s++ = 0; < if (s && (s = strchr(realm = s, ':'))) < *s++ = 0; < if (s && (s = strchr(user = s, ':'))) --- > /* Data is string like "Basic:\"agni\":user1:secret" (IPv4) or "Basic:\"[fe80::204:23ff:fea7:d60a]\":user1:secret" (IPv6) */ > if (s && (s = strchr(scheme = s, '\"'))) > *(s-1) = 0; > if (s) realm = s++; > if (s && (s = strchr(s, '\"'))) > *++s = 0; > if (s && (s = strchr(user = ++s, ':'))) Best Regards, Jerry
auth_client_diff
Description: Binary data
------------------------------------------------------------------------------ This SF.net email is sponsored by: High Quality Requirements in a Collaborative Environment. Download a free trial of Rational Requirements Composer Now! http://p.sf.net/sfu/www-ibm-com
_______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel