openssl: Use proper EVP macro to determine size of a hash

This commit is contained in:
Tobias Brunner
2016-04-15 10:32:52 +02:00
parent 9b85a6853b
commit 77df573a95
2 changed files with 2 additions and 2 deletions
@@ -51,7 +51,7 @@ bool openssl_hash_chunk(int hash_type, chunk_t data, chunk_t *hash)
goto error;
}
*hash = chunk_alloc(hasher->md_size);
*hash = chunk_alloc(EVP_MD_size(hasher));
if (!EVP_DigestFinal_ex(ctx, hash->ptr, NULL))
{
chunk_free(hash);