RE: [reSIProcate] nonce delta incorrect when authenticating request
Why would this cause a problem? We use getSystemTime to make the
challenge nonce in the first place - so the expires delta calculations
are all relative to the local system. Are you forming your nonce's from
outside of resip for some reason?
Scott
> -----Original Message-----
> From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
> [mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of
> Justin Matthews
> Sent: Monday, July 24, 2006 3:41 PM
> To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [reSIProcate] nonce delta incorrect when authenticating
> request
>
> I believe the code, for windows only, in Timer.cxx::getSystemTime is
> causing helper.cxx::advancedAuthenticateRequest to fail due to the
> nonce time delta calculation. For this scenario nonce is expected to
> most likely be the unix epoch timestamp, getSystemTime can be
> normalized to return the unix-style time on windows as follows.
>
> UInt64
> Timer::getSystemTime()
> {
> assert( sizeof(UInt64) == 64/8 );
> UInt64 time=0;
> #if defined(WIN32)
> FILETIME ft;
> GetSystemTimeAsFileTime(&ft);
> ULARGE_INTEGER li;
> li.LowPart = ft.dwLowDateTime;
> li.HighPart = ft.dwHighDateTime;
>
> /** Micro-second difference between windows and unix epoch time:
> * 01.01.1970 - 01.01.1601 = 11644473600000000
> */
> time = (li.QuadPart/10) - 11644473600000000ULL; #else
> struct timeval now;
> gettimeofday( &now , NULL );
> //assert( now );
> time = now.tv_sec;
> time = time*1000000;
> time += now.tv_usec;
> #endif
> return time;
> }
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel