aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPauli <ppzgs1@gmail.com>2021-02-25 13:48:48 +1000
committerPauli <ppzgs1@gmail.com>2021-02-28 17:25:49 +1000
commitcc2314a9f630c47860afbddd29ef5b4223371a8a (patch)
tree7f90a35d55d67e1efab7e09be3d1a2bd17e30c41
parent1dc28e742d0a7e37f76353680afac547e88375ef (diff)
downloadopenssl-cc2314a9f630c47860afbddd29ef5b4223371a8a.tar.gz
evp: updates for the new additional MAC_init arguments
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/14310)
-rw-r--r--crypto/evp/mac_lib.c5
-rw-r--r--include/openssl/evp.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/crypto/evp/mac_lib.c b/crypto/evp/mac_lib.c
index de4d3623ff..91edb93afd 100644
--- a/crypto/evp/mac_lib.c
+++ b/crypto/evp/mac_lib.c
@@ -105,9 +105,10 @@ size_t EVP_MAC_CTX_get_mac_size(EVP_MAC_CTX *ctx)
return 0;
}
-int EVP_MAC_init(EVP_MAC_CTX *ctx)
+int EVP_MAC_init(EVP_MAC_CTX *ctx, const unsigned char *key, size_t keylen,
+ const OSSL_PARAM params[])
{
- return ctx->meth->init(ctx->data);
+ return ctx->meth->init(ctx->data, key, keylen, params);
}
int EVP_MAC_update(EVP_MAC_CTX *ctx, const unsigned char *data, size_t datalen)
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index 6a2202d954..a6a05b1ba6 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -1144,7 +1144,8 @@ int EVP_MAC_CTX_get_params(EVP_MAC_CTX *ctx, OSSL_PARAM params[]);
int EVP_MAC_CTX_set_params(EVP_MAC_CTX *ctx, const OSSL_PARAM params[]);
size_t EVP_MAC_CTX_get_mac_size(EVP_MAC_CTX *ctx);
-int EVP_MAC_init(EVP_MAC_CTX *ctx);
+int EVP_MAC_init(EVP_MAC_CTX *ctx, const unsigned char *key, size_t keylen,
+ const OSSL_PARAM params[]);
int EVP_MAC_update(EVP_MAC_CTX *ctx, const unsigned char *data, size_t datalen);
int EVP_MAC_final(EVP_MAC_CTX *ctx,
unsigned char *out, size_t *outl, size_t outsize);