[Freeswitch-svn] [commit] r3982 - in freeswitch/trunk/libs/sofia-sip: . libsofia-sip-ua/iptsec
Freeswitch SVN
anthm at freeswitch.org
Wed Jan 17 17:04:01 EST 2007
Author: anthm
Date: Wed Jan 17 17:04:01 2007
New Revision: 3982
Modified:
freeswitch/trunk/libs/sofia-sip/.update
freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c
Log:
fix for cnonce crap (tell pekka)
Modified: freeswitch/trunk/libs/sofia-sip/.update
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/.update (original)
+++ freeswitch/trunk/libs/sofia-sip/.update Wed Jan 17 17:04:01 2007
@@ -1 +1 @@
-Thu Jan 4 13:01:49 EST 2007
+Wed Jan 17 17:00:56 EST 2007
Modified: freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c
==============================================================================
--- freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c (original)
+++ freeswitch/trunk/libs/sofia-sip/libsofia-sip-ua/iptsec/auth_client.c Wed Jan 17 17:04:01 2007
@@ -766,12 +766,22 @@
if (ac->ac_qop && (cda->cda_cnonce == NULL || ac->ac_stale)) {
su_guid_t guid[1];
char *cnonce;
+ char *e;
+
if (cda->cda_cnonce != NULL)
/* Free the old one if we are updating after stale=true */
su_free(home, (void *)cda->cda_cnonce);
su_guid_generate(guid);
cda->cda_cnonce = cnonce = su_alloc(home, BASE64_SIZE(sizeof(guid)) + 1);
base64_e(cnonce, BASE64_SIZE(sizeof(guid)) + 1, guid, sizeof(guid));
+ /* somewhere else in the code the '=' chars are stripped in the header
+ we need to strip it now before the digest is created or we're in trouble
+ cos they won't match.....
+ */
+ e = cnonce + strlen(cnonce) - 1;
+ while(*e == '=') {
+ *e-- = '\0';
+ }
cda->cda_ncount = 0;
}
More information about the Freeswitch-svn
mailing list