From 752acedc0b120bd52ec07a09837147c135dbb986 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 25 May 2006 23:04:20 +0000 Subject: =?UTF-8?q?Olaf=20St=FCben=20fixed=20a=20bug=20that=20caused=20Dig?= =?UTF-8?q?est=20authentication=20with=20md5-sess=20to=20fail.=20When=20us?= =?UTF-8?q?ing=20the=20md5-sess,=20the=20result=20was=20not=20Md5=20encode?= =?UTF-8?q?d=20and=20Base64=20transformed.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/http_digest.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/http_digest.c b/lib/http_digest.c index 5baccfe58..e1aec3919 100644 --- a/lib/http_digest.c +++ b/lib/http_digest.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -303,10 +303,11 @@ CURLcode Curl_output_digest(struct connectdata *conn, if(d->algo == CURLDIGESTALGO_MD5SESS) { /* nonce and cnonce are OUTSIDE the hash */ tmp = aprintf("%s:%s:%s", ha1, d->nonce, d->cnonce); - free(ha1); if(!tmp) return CURLE_OUT_OF_MEMORY; - ha1 = (unsigned char *)tmp; + Curl_md5it(md5buf, (unsigned char *)tmp); + free(tmp); /* free this again */ + md5_to_ascii(md5buf, ha1); } /* -- cgit v1.2.3