From: hno <> Date: Sat, 12 Jul 2003 06:34:01 +0000 (+0000) Subject: Correct md5-sess calculation X-Git-Tag: SQUID_3_0_PRE1~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b4305159b2c69324ccb301cc37e90aa0d7abecd1;p=thirdparty%2Fsquid.git Correct md5-sess calculation --- diff --git a/lib/rfc2617.c b/lib/rfc2617.c index 752d50e714..344ed2305b 100644 --- a/lib/rfc2617.c +++ b/lib/rfc2617.c @@ -13,7 +13,7 @@ /* - * $Id: rfc2617.c,v 1.7 2003/01/23 00:37:01 robertc Exp $ + * $Id: rfc2617.c,v 1.8 2003/07/12 00:34:01 hno Exp $ * * DEBUG: * AUTHOR: RFC 2617 & Robert Collins @@ -114,8 +114,10 @@ DigestCalcHA1( MD5Final((unsigned char *) HA1, &Md5Ctx); } if (strcasecmp(pszAlg, "md5-sess") == 0) { + HASHHEX HA1Hex; + CvtHex(HA1, HA1Hex); /* RFC2617 errata */ MD5Init(&Md5Ctx); - MD5Update(&Md5Ctx, HA1, HASHLEN); + MD5Update(&Md5Ctx, HA1Hex, HASHHEXLEN); MD5Update(&Md5Ctx, ":", 1); MD5Update(&Md5Ctx, pszNonce, strlen(pszNonce)); MD5Update(&Md5Ctx, ":", 1);