X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=providers%2Fimplementations%2Fciphers%2Fcipher_aria_ccm.c;h=7f89b223f1205f6149ed38b92193cc753236f35e;hp=ffc8166d68dad12667a6a216802be028820bfc6f;hb=f99d3eedf7c3e1e2b10aad911f469f1fc783a395;hpb=422cbcee6167faa20f439726a8b7bff0af51edc9 diff --git a/providers/implementations/ciphers/cipher_aria_ccm.c b/providers/implementations/ciphers/cipher_aria_ccm.c index ffc8166d68..7f89b223f1 100644 --- a/providers/implementations/ciphers/cipher_aria_ccm.c +++ b/providers/implementations/ciphers/cipher_aria_ccm.c @@ -11,13 +11,18 @@ #include "cipher_aria_ccm.h" #include "prov/implementations.h" +#include "prov/providercommon.h" static OSSL_FUNC_cipher_freectx_fn aria_ccm_freectx; static void *aria_ccm_newctx(void *provctx, size_t keybits) { - PROV_ARIA_CCM_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); + PROV_ARIA_CCM_CTX *ctx; + if (!ossl_prov_is_running()) + return NULL; + + ctx = OPENSSL_zalloc(sizeof(*ctx)); if (ctx != NULL) ccm_initctx(&ctx->base, keybits, PROV_ARIA_HW_ccm(keybits)); return ctx;