From 0b6c14d75fd4155b6872534816f098c5d442d3e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Salla?= Date: Fri, 19 Apr 2024 09:45:16 -0300 Subject: [PATCH] Replaced missing var with currently used validation (#253) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: André Salla --- cpp/Cipher/MGLCipherHostObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/Cipher/MGLCipherHostObject.cpp b/cpp/Cipher/MGLCipherHostObject.cpp index 5153ac7d..bc3306b4 100644 --- a/cpp/Cipher/MGLCipherHostObject.cpp +++ b/cpp/Cipher/MGLCipherHostObject.cpp @@ -603,7 +603,7 @@ bool MGLCipherHostObject::InitAuthenticated(const char *cipher_type, int iv_len, #if OPENSSL_VERSION_MAJOR >= 3 // TODO: not sure where kind_ comes from in next line, but as we bump // OpenSSL version we will need to look at Node.js code and figure it out. - if (mode == EVP_CIPH_CCM_MODE && kind_ == kDecipher && + if (mode == EVP_CIPH_CCM_MODE && !isCipher_ && EVP_default_properties_is_fips_enabled(nullptr)) { #else if (mode == EVP_CIPH_CCM_MODE && !isCipher_ && FIPS_mode()) {