fix test for AES_128_GCM
Change-Id: Iddaca4d30c6564f02864fd05adf051a04da39031
diff --git a/tests/unit-tests/crypto-helper.t.cpp b/tests/unit-tests/crypto-helper.t.cpp
index 3312c3d..e157711 100644
--- a/tests/unit-tests/crypto-helper.t.cpp
+++ b/tests/unit-tests/crypto-helper.t.cpp
@@ -206,7 +206,8 @@
uint8_t ciphertext[256] = {0};
uint8_t tag[16] = {0};
- int size = aes_gcm_128_encrypt(nullptr, 0, nullptr, 0, key, iv, ciphertext, tag);
+ const uint8_t empty_buffer[1] = {0};
+ int size = aes_gcm_128_encrypt(empty_buffer, 0, empty_buffer, 0, key, iv, ciphertext, tag);
BOOST_CHECK(size == 0);
BOOST_CHECK_EQUAL_COLLECTIONS(tag, tag + 16, expected_tag, expected_tag + sizeof(expected_tag));
@@ -238,7 +239,8 @@
uint8_t ciphertext[256] = {0};
uint8_t tag[16] = {0};
- int size = aes_gcm_128_encrypt(nullptr, 0, aad, sizeof(aad), key, iv, ciphertext, tag);
+ const uint8_t empty_buffer[1] = {0};
+ int size = aes_gcm_128_encrypt(empty_buffer, 0, aad, sizeof(aad), key, iv, ciphertext, tag);
BOOST_CHECK(size == 0);
BOOST_CHECK_EQUAL_COLLECTIONS(tag, tag + 16, expected_tag, expected_tag + sizeof(expected_tag));