1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 16:18:48 -05:00

hush the compiler

This commit is contained in:
Daniel Stenberg 2003-05-22 16:12:30 +00:00
parent 334d78cd18
commit 87f8c0d471

View File

@ -133,7 +133,7 @@ CURLcode Curl_output_digest(struct connectdata *conn,
unsigned char ha1[33]; /* 32 digits and 1 zero byte */ unsigned char ha1[33]; /* 32 digits and 1 zero byte */
unsigned char ha2[33]; unsigned char ha2[33];
unsigned char request_digest[33]; unsigned char request_digest[33];
char *md5this; unsigned char *md5this;
struct SessionHandle *data = conn->data; struct SessionHandle *data = conn->data;
@ -148,18 +148,20 @@ CURLcode Curl_output_digest(struct connectdata *conn,
":" unq(nonce-value) ":" unq(cnonce-value) ":" unq(nonce-value) ":" unq(cnonce-value)
*/ */
if(data->state.digest.algo == CURLDIGESTALGO_MD5SESS) { if(data->state.digest.algo == CURLDIGESTALGO_MD5SESS) {
md5this = aprintf("%s:%s:%s:%s:%s", md5this = (unsigned char *)
data->state.user, aprintf("%s:%s:%s:%s:%s",
data->state.digest.realm, data->state.user,
data->state.passwd, data->state.digest.realm,
data->state.digest.nonce, data->state.passwd,
data->state.digest.cnonce); data->state.digest.nonce,
data->state.digest.cnonce);
} }
else { else {
md5this = aprintf("%s:%s:%s", md5this = (unsigned char *)
data->state.user, aprintf("%s:%s:%s",
data->state.digest.realm, data->state.user,
data->state.passwd); data->state.digest.realm,
data->state.passwd);
} }
Curl_md5it(md5buf, md5this); Curl_md5it(md5buf, md5this);
free(md5this); /* free this again */ free(md5this); /* free this again */
@ -172,15 +174,13 @@ CURLcode Curl_output_digest(struct connectdata *conn,
5.1.1 of RFC 2616) 5.1.1 of RFC 2616)
*/ */
md5this = aprintf("%s:%s", request, uripath); md5this = (unsigned char *)aprintf("%s:%s", request, uripath);
Curl_md5it(md5buf, md5this); Curl_md5it(md5buf, md5this);
free(md5this); /* free this again */ free(md5this); /* free this again */
md5_to_ascii(md5buf, ha2); md5_to_ascii(md5buf, ha2);
md5this = aprintf("%s:%s:%s", md5this = (unsigned char *)aprintf("%s:%s:%s", ha1, data->state.digest.nonce,
ha1, ha2);
data->state.digest.nonce,
ha2);
Curl_md5it(md5buf, md5this); Curl_md5it(md5buf, md5this);
free(md5this); /* free this again */ free(md5this); /* free this again */
md5_to_ascii(md5buf, request_digest); md5_to_ascii(md5buf, request_digest);