This is an automated email from the ASF dual-hosted git repository.

prozsa pushed a commit to branch branch-4.5.0
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 79626e2b9c1da854ec6e641e6714f0ec14676c4a
Author: pranav.lodha <pranav.lo...@cloudera.com>
AuthorDate: Wed Feb 12 10:54:54 2025 +0530

    IMPALA-13728: OpenSSLUtilTest.ValidateInitialize failed by AES_128_GCM not 
supported
    
    The test failed because AES_128_GCM is not supported
    in all OpenSSL versions. Replacing it with
    AES_256_CFB fixes the test as it is supported in all
    OpenSSL versions.
    
    Change-Id: If5b3a000e302d2705a02820c560b474f0c311560
    Reviewed-on: http://gerrit.cloudera.org:8080/22477
    Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
    Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
---
 be/src/util/openssl-util-test.cc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/be/src/util/openssl-util-test.cc b/be/src/util/openssl-util-test.cc
index bfc302c02..66925e10e 100644
--- a/be/src/util/openssl-util-test.cc
+++ b/be/src/util/openssl-util-test.cc
@@ -144,12 +144,14 @@ TEST_F(OpenSSLUtilTest, Encryption) {
 TEST_F(OpenSSLUtilTest, ValidateInitialize) {
   EncryptionKey key;
   uint8_t IV[AES_BLOCK_SIZE] = {};
-  uint8_t key16bits[16] = {};
+  uint8_t key32bits[32] = {};
+  // Using AES_256_CFB mode to test since it's supported in all Impala
+  // supported OpenSSL versions.
   Status status_initialize_fields = key.InitializeFields
-      (key16bits,16, IV, AES_BLOCK_SIZE, AES_CIPHER_MODE::AES_256_GCM);
+      (key32bits, 16, IV, AES_BLOCK_SIZE, AES_CIPHER_MODE::AES_256_CFB);
   ASSERT_FALSE(status_initialize_fields.ok());
-  ASSERT_OK(key.InitializeFields(key16bits,
-      16, IV, AES_BLOCK_SIZE, AES_CIPHER_MODE::AES_128_GCM));
+  ASSERT_OK(key.InitializeFields(key32bits,
+      32, IV, AES_BLOCK_SIZE, AES_CIPHER_MODE::AES_256_CFB));
 }
 
 /// Test that encryption and decryption work in-place.

Reply via email to