if(!hashthis)
return CURLE_OUT_OF_MEMORY;
- hash(hashbuf, (unsigned char *) hashthis, strlen(hashthis));
+ result = hash(hashbuf, (unsigned char *) hashthis, strlen(hashthis));
free(hashthis);
+ if(result)
+ return result;
convert_to_ascii(hashbuf, (unsigned char *)userh);
}
if(!hashthis)
return CURLE_OUT_OF_MEMORY;
- hash(hashbuf, (unsigned char *) hashthis, strlen(hashthis));
+ result = hash(hashbuf, (unsigned char *) hashthis, strlen(hashthis));
free(hashthis);
+ if(result)
+ return result;
convert_to_ascii(hashbuf, ha1);
if(digest->algo & SESSION_ALGO) {
if(!tmp)
return CURLE_OUT_OF_MEMORY;
- hash(hashbuf, (unsigned char *) tmp, strlen(tmp));
+ result = hash(hashbuf, (unsigned char *) tmp, strlen(tmp));
free(tmp);
+ if(result)
+ return result;
convert_to_ascii(hashbuf, ha1);
}
char hashed[65];
char *hashthis2;
- hash(hashbuf, (const unsigned char *)"", 0);
+ result = hash(hashbuf, (const unsigned char *)"", 0);
+ if(result) {
+ free(hashthis);
+ return result;
+ }
convert_to_ascii(hashbuf, (unsigned char *)hashed);
hashthis2 = aprintf("%s:%s", hashthis, hashed);
if(!hashthis)
return CURLE_OUT_OF_MEMORY;
- hash(hashbuf, (unsigned char *) hashthis, strlen(hashthis));
+ result = hash(hashbuf, (unsigned char *) hashthis, strlen(hashthis));
free(hashthis);
+ if(result)
+ return result;
convert_to_ascii(hashbuf, ha2);
if(digest->qop) {
if(!hashthis)
return CURLE_OUT_OF_MEMORY;
- hash(hashbuf, (unsigned char *) hashthis, strlen(hashthis));
+ result = hash(hashbuf, (unsigned char *) hashthis, strlen(hashthis));
free(hashthis);
+ if(result)
+ return result;
convert_to_ascii(hashbuf, request_digest);
/* For test case 64 (snooped from a Mozilla 1.3a request)