aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_ffi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/test_ffi.cpp')
-rw-r--r--src/tests/test_ffi.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp
index 9739d725c..10a1f8b2d 100644
--- a/src/tests/test_ffi.cpp
+++ b/src/tests/test_ffi.cpp
@@ -2023,12 +2023,14 @@ class FFI_Unit_Tests final : public Test
if(TEST_FFI_OK(botan_mceies_encrypt, (pub, rng, "AES-256/OCB", plaintext.data(), plaintext.size(), ad, ad_len,
ciphertext.data(), &ciphertext_len)))
{
- std::vector<uint8_t> decrypted(plaintext.size());
+ std::vector<uint8_t> decrypted(ciphertext.size());
size_t decrypted_len = plaintext_len;
TEST_FFI_OK(botan_mceies_decrypt, (priv, "AES-256/OCB", ciphertext.data(), ciphertext.size(), ad, ad_len,
decrypted.data(), &decrypted_len));
+ decrypted.resize(decrypted_len);
+
result.test_eq("MCIES plaintext", decrypted, plaintext);
}
#endif