summaryrefslogtreecommitdiffstats
path: root/providers/implementations/macs/gmac_prov.c
diff options
context:
space:
mode:
Diffstat (limited to 'providers/implementations/macs/gmac_prov.c')
-rw-r--r--providers/implementations/macs/gmac_prov.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/providers/implementations/macs/gmac_prov.c b/providers/implementations/macs/gmac_prov.c
index ad189d9c14..3dd38ecd7c 100644
--- a/providers/implementations/macs/gmac_prov.c
+++ b/providers/implementations/macs/gmac_prov.c
@@ -235,8 +235,8 @@ static int gmac_set_ctx_params(void *vmacctx, const OSSL_PARAM params[])
if (p->data_type != OSSL_PARAM_OCTET_STRING)
return 0;
- if (!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN,
- p->data_size, NULL)
+ if (EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_AEAD_SET_IVLEN,
+ p->data_size, NULL) <= 0
|| !EVP_EncryptInit_ex(ctx, NULL, NULL, NULL, p->data))
return 0;
}