Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/14383)
struct blake2_mac_data_st *macctx = vmacctx;
const OSSL_PARAM *p;
+ if (params == NULL)
+ return 1;
+
if ((p = OSSL_PARAM_locate_const(params, OSSL_MAC_PARAM_SIZE)) != NULL) {
size_t size;
OSSL_LIB_CTX *ctx = PROV_LIBCTX_OF(macctx->provctx);
const OSSL_PARAM *p;
+ if (params == NULL)
+ return 1;
+
if (!ossl_prov_cipher_load_from_params(&macctx->cipher, params, ctx))
return 0;
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;
struct kmac_data_st *kctx = vmacctx;
const OSSL_PARAM *p;
+ if (params == NULL)
+ return 1;
+
if ((p = OSSL_PARAM_locate_const(params, OSSL_MAC_PARAM_XOF)) != NULL
&& !OSSL_PARAM_get_int(p, &kctx->xof_mode))
return 0;
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))