This is an automated email from the ASF dual-hosted git repository.
prozsa pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git
The following commit(s) were added to refs/heads/master by this push:
new b8f403475 IMPALA-13728: OpenSSLUtilTest.ValidateInitialize failed by
AES_128_GCM not supported
b8f403475 is described below
commit b8f4034754b691a4790e502af214935486aa3ced
Author: pranav.lodha <[email protected]>
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 <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
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.