diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-05-25 23:04:20 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-05-25 23:04:20 +0000 |
commit | 752acedc0b120bd52ec07a09837147c135dbb986 (patch) | |
tree | 6a13bd1b1b2895255049a1722df1ebac899177cb /lib | |
parent | fb88723afcb4d19020e18dbe57f13c08e0a9982a (diff) |
Olaf Stüben fixed a bug that caused Digest authentication with md5-sess to
fail. When using the md5-sess, the result was not Md5 encoded and Base64
transformed.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/http_digest.c | 7 |
1 files changed, 4 insertions, 3 deletions
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, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, 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); } /* |