diff options
Diffstat (limited to 'providers/implementations/macs/gmac_prov.c')
-rw-r--r-- | providers/implementations/macs/gmac_prov.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/providers/implementations/macs/gmac_prov.c b/providers/implementations/macs/gmac_prov.c index 1f4047ccd3..29fb9f87df 100644 --- a/providers/implementations/macs/gmac_prov.c +++ b/providers/implementations/macs/gmac_prov.c @@ -103,7 +103,7 @@ static int gmac_setkey(struct gmac_data_st *macctx, { EVP_CIPHER_CTX *ctx = macctx->ctx; - if (keylen != (size_t)EVP_CIPHER_CTX_key_length(ctx)) { + if (keylen != (size_t)EVP_CIPHER_CTX_get_key_length(ctx)) { ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_KEY_LENGTH); return 0; } @@ -214,7 +214,7 @@ static int gmac_set_ctx_params(void *vmacctx, const OSSL_PARAM params[]) || !ossl_prov_cipher_load_from_params(&macctx->cipher, params, provctx)) return 0; - if (EVP_CIPHER_mode(ossl_prov_cipher_cipher(&macctx->cipher)) + if (EVP_CIPHER_get_mode(ossl_prov_cipher_cipher(&macctx->cipher)) != EVP_CIPH_GCM_MODE) { ERR_raise(ERR_LIB_PROV, PROV_R_INVALID_MODE); return 0; |