Adjust failing test to openssl3.0 77/312377/2
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Fri, 7 Jun 2024 15:19:00 +0000 (17:19 +0200)
committerKrzysztof Małysa <k.malysa@samsung.com>
Fri, 7 Jun 2024 16:07:50 +0000 (16:07 +0000)
Encryption/decryption fails on openssl3.0 if an empty key is used. Make the
failing test use a non-empty key.

Change-Id: I201ed3d74971a34e891cc9ee3f96ee1b96ffafeb

tests/crypto/encryptor_unittest.cpp

index 7c213cc6636122ccc3de5ae92c697df8b4fac51f..7a8f5e01bbf85cbe6f04eebfd9d10bd930842a19 100644 (file)
@@ -66,9 +66,9 @@ TEST(EncryptAes256ECB, NISTSP800_38ATestCase2)
     EXPECT_EQ(plaintext, input);
 }
 
-TEST(EncryptAes256ECB, EmptyKeyDataTestCase3)
+TEST(EncryptAes256ECB, EmptyPlaintextCiphertextTestCase3)
 {
-    const CryptoBuffer key;
+    auto key = Crypto::GenerateAESKey(256);
     const CryptoBuffer plaintext;
     const CryptoBuffer ciphertext;