diff options
author | Pauli <ppzgs1@gmail.com> | 2021-03-10 18:37:07 +1000 |
---|---|---|
committer | Pauli <ppzgs1@gmail.com> | 2021-03-12 08:27:30 +1000 |
commit | 5a6b62bb427e828edecf52c2280f9958d97142b6 (patch) | |
tree | 121039d5162dc7217cba2be80b79589b70d10ea5 /providers/implementations/macs/siphash_prov.c | |
parent | c983a0e5214db7f0a668f5e9ddda9362ca0d6ac9 (diff) |
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/siphash_prov.c')
-rw-r--r-- | providers/implementations/macs/siphash_prov.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/providers/implementations/macs/siphash_prov.c b/providers/implementations/macs/siphash_prov.c index 3f2e3267e0..0181d68ed1 100644 --- a/providers/implementations/macs/siphash_prov.c +++ b/providers/implementations/macs/siphash_prov.c @@ -195,6 +195,9 @@ static int siphash_set_params(void *vmacctx, const OSSL_PARAM *params) const OSSL_PARAM *p = NULL; size_t size; + if (params == NULL) + return 1; + if ((p = OSSL_PARAM_locate_const(params, OSSL_MAC_PARAM_SIZE)) != NULL) { if (!OSSL_PARAM_get_size_t(p, &size) || !SipHash_set_hash_size(&ctx->siphash, size)) |