From 77aac4fc9c56554128ded21d4d8744bf0ca072d2 Mon Sep 17 00:00:00 2001 From: Oldes Date: Mon, 31 Jan 2022 15:13:14 +0100 Subject: [PATCH] FIX: wrong context casting --- src/core/p-crypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/p-crypt.c b/src/core/p-crypt.c index 8353e719a3..c5464ff67b 100644 --- a/src/core/p-crypt.c +++ b/src/core/p-crypt.c @@ -599,10 +599,10 @@ static void free_crypt_cipher_context(CRYPT_CTX *ctx); case SYM_ARIA_256_CBC: mbedtls_aria_init((mbedtls_aria_context *)ctx->cipher_ctx); if (ctx->operation == MBEDTLS_ENCRYPT) { - err = mbedtls_aria_setkey_enc((mbedtls_camellia_context *)ctx->cipher_ctx, ctx->key, ctx->key_bitlen); + err = mbedtls_aria_setkey_enc((mbedtls_aria_context *)ctx->cipher_ctx, ctx->key, ctx->key_bitlen); } else { - err = mbedtls_aria_setkey_dec((mbedtls_camellia_context *)ctx->cipher_ctx, ctx->key, ctx->key_bitlen); + err = mbedtls_aria_setkey_dec((mbedtls_aria_context *)ctx->cipher_ctx, ctx->key, ctx->key_bitlen); } COPY_MEM(ctx->nonce, ctx->IV, MBEDTLS_MAX_IV_LENGTH); break;