sha256/md5: return errors when init fails

Closes #8133
This commit is contained in:
x2018 2021-12-10 21:33:39 +08:00 committed by Daniel Stenberg
parent da97316596
commit d6ff35b5a5
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 73 additions and 40 deletions

View file

@ -666,8 +666,8 @@ static CURLcode auth_create_digest_http_message(
struct digestdata *digest,
char **outptr, size_t *outlen,
void (*convert_to_ascii)(unsigned char *, unsigned char *),
void (*hash)(unsigned char *, const unsigned char *,
const size_t))
CURLcode (*hash)(unsigned char *, const unsigned char *,
const size_t))
{
CURLcode result;
unsigned char hashbuf[32]; /* 32 bytes/256 bits */