diff options
author | Matt Caswell <matt@openssl.org> | 2020-08-31 14:44:17 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-09-03 09:40:52 +0100 |
commit | 0bc193dd05fa0f5580706f34994beb74baf3d531 (patch) | |
tree | 170c605323a9388c1a45dd2cb81896155cf89282 /crypto/evp | |
parent | 13c9843cff061304275a1723bcba137280e2e97d (diff) |
Ensure EVP_MAC_update() passes the length even if it is 0
We leave it up to the EVP_MAC implemenations what to do with an update
where the data length is 0. In the TLS HMAC implemenation this is still
signficant.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12732)
Diffstat (limited to 'crypto/evp')
-rw-r--r-- | crypto/evp/mac_lib.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/crypto/evp/mac_lib.c b/crypto/evp/mac_lib.c index 2198c46680..79dd49ae20 100644 --- a/crypto/evp/mac_lib.c +++ b/crypto/evp/mac_lib.c @@ -112,8 +112,6 @@ int EVP_MAC_init(EVP_MAC_CTX *ctx) int EVP_MAC_update(EVP_MAC_CTX *ctx, const unsigned char *data, size_t datalen) { - if (datalen == 0) - return 1; return ctx->meth->update(ctx->data, data, datalen); } |