Providers: for the digest_final operation, pass a output buffer size
authorRichard Levitte <levitte@openssl.org>
Mon, 15 Apr 2019 07:37:51 +0000 (09:37 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 15 Apr 2019 08:46:09 +0000 (10:46 +0200)
commit0ad50b4dee36d4b576473ccbf744284d66fbffd6
treebd36098c772345c31c023eef2e7b8399b773cd84
parent15972296af6b98ae495ada9d4695f2a0e71f891c
Providers: for the digest_final operation, pass a output buffer size

This allows the provider digest_final operation to check that it
doesn't over-run the output buffer.

The EVP_DigestFinal_ex function doesn't take that same parameter, so
it will have to assume that the user provided a properly sized buffer,
but this leaves better room for future enhancements of the public API.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/8747)
crypto/evp/digest.c
include/openssl/core_numbers.h
providers/common/digests/sha2.c