From 013889849d0f4ecadf336b6870413bac6889d8d9 Mon Sep 17 00:00:00 2001 From: Maxim Sharabayko Date: Tue, 22 Nov 2022 11:59:37 +0100 Subject: [PATCH] [core] Fixed cloning the RX crypto context (AEAD) --- haicrypt/hcrypt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/haicrypt/hcrypt.c b/haicrypt/hcrypt.c index 8fa681bee..d5178ccdd 100644 --- a/haicrypt/hcrypt.c +++ b/haicrypt/hcrypt.c @@ -196,6 +196,9 @@ int HaiCrypt_ExtractConfig(HaiCrypt_Handle hhcSrc, HaiCrypt_Cfg* pcfg) pcfg->flags = HAICRYPT_CFG_F_CRYPTO; if ((ctx->flags & HCRYPT_CTX_F_ENCRYPT) == HCRYPT_CTX_F_ENCRYPT) pcfg->flags |= HAICRYPT_CFG_F_TX; + + if (ctx->mode == HCRYPT_CTX_MODE_AESGCM) + pcfg->flags |= HAICRYPT_CFG_F_GCM; /* Set this explicitly - this use of this library is SRT only. */ pcfg->xport = HAICRYPT_XPT_SRT;