[reSIProcate] question about nc parameter value

김만수 kmansoo at gmail.com
Wed Jan 11 21:07:18 CST 2012


Hi, all,

In http://www.ietf.org/rfc/rfc2831.txt, nonce-count is described as follows.

nonce-count   = "nc" "=" nc-value
nc-value         = 8LHEX

LHEX
      32 hex digits, where the alphabetic characters MUST be lower case,
      because MD5 is not case insensitive.

However, the nc parameter values in resip is upper case.
What do you think?

Thank you!

--------------------------------------------------------
*Helper.cxx:*
void
Helper::updateNonceCount(unsigned int& nonceCount, Data& nonceCountString)
{
   if (!nonceCountString.empty())
   {
      return;
   }
   nonceCount++;
   {
      //DataStream s(nonceCountString);

      //s << std::setw(8) << std::setfill('0') << std::hex << nonceCount;
   char buf[128];
   *buf = 0;

#if (defined(_MSC_VER) && _MSC_VER >= 1400)
   sprintf_s(buf,128,"%08x",nonceCount);
#else
   sprintf(buf,"%08x",nonceCount);
#endif
   nonceCountString = buf;
   }
   DebugLog(<< "nonceCount is now: [" << nonceCountString << "]");
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20120112/1dd77a45/attachment.htm>


More information about the resiprocate-devel mailing list