aboutsummaryrefslogtreecommitdiff
path: root/providers/implementations/macs/hmac_prov.c
diff options
context:
space:
mode:
authorPauli <ppzgs1@gmail.com>2021-03-10 18:37:07 +1000
committerPauli <ppzgs1@gmail.com>2021-03-12 08:27:30 +1000
commit5a6b62bb427e828edecf52c2280f9958d97142b6 (patch)
tree121039d5162dc7217cba2be80b79589b70d10ea5 /providers/implementations/macs/hmac_prov.c
parentc983a0e5214db7f0a668f5e9ddda9362ca0d6ac9 (diff)
downloadopenssl-5a6b62bb427e828edecf52c2280f9958d97142b6.zip
openssl-5a6b62bb427e828edecf52c2280f9958d97142b6.tar.gz
openssl-5a6b62bb427e828edecf52c2280f9958d97142b6.tar.bz2
update set_ctx_param MAC calls to return 1 for a NULL params
Reviewed-by: Shane Lontis <shane.lontis@oracle.com> (Merged from https://github.com/openssl/openssl/pull/14383)
Diffstat (limited to 'providers/implementations/macs/hmac_prov.c')
-rw-r--r--providers/implementations/macs/hmac_prov.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/providers/implementations/macs/hmac_prov.c b/providers/implementations/macs/hmac_prov.c
index 7188232..f291e57 100644
--- a/providers/implementations/macs/hmac_prov.c
+++ b/providers/implementations/macs/hmac_prov.c
@@ -294,6 +294,9 @@ static int hmac_set_ctx_params(void *vmacctx, const OSSL_PARAM params[])
const OSSL_PARAM *p;
int flags = 0;
+ if (params == NULL)
+ return 1;
+
if (!ossl_prov_digest_load_from_params(&macctx->digest, params, ctx))
return 0;