Permalink
Browse files

Replace EVP_DigestFinal_ex with EVP_DigestFinal function for OpenSSL …

…backend

The naming is confusing: actually EVP_DigestFinal does more than
EVP_DigestFinal_ex: it calls EVP_DigestFinal_ex internally, but also does some
additional cleanups and zeroing memory for security. This also brings this in
line with the BoringSSL backend.
  • Loading branch information...
secumod committed Dec 26, 2018
1 parent c865d19 commit 94f0ca53b2eec156cf6689e17fd6cd8d69db065b
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/soter/openssl/soter_hash.c
@@ -92,7 +92,7 @@ soter_status_t soter_hash_final(soter_hash_ctx_t *hash_ctx, uint8_t* hash_value,
return SOTER_BUFFER_TOO_SMALL;
}

if (EVP_DigestFinal_ex(hash_ctx->evp_md_ctx, hash_value, (unsigned int *)&md_length))
if (EVP_DigestFinal(hash_ctx->evp_md_ctx, hash_value, (unsigned int *)&md_length))
{
*hash_length = md_length;
return SOTER_SUCCESS;

0 comments on commit 94f0ca5

Please sign in to comment.