zonemd, harden result length for unsupported algo in nettle digest final.

This commit is contained in:
W.C.A. Wijngaards 2020-10-09 14:40:26 +02:00
parent 5e477e8a31
commit 1dc4d7a9f6

View file

@ -1636,6 +1636,7 @@ int secalgo_hash_final(struct secalgo_hash* hash, uint8_t* result,
sha512_digest(&hash->ctx512, SHA512_DIGEST_SIZE,
(unsigned char*)result);
} else {
*resultlen = 0;
return 0;
}
return 1;