diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/test_aead.cpp | 4 | ||||
-rw-r--r-- | src/tests/test_modes.cpp | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/tests/test_aead.cpp b/src/tests/test_aead.cpp index efd59f6a8..13d6ee320 100644 --- a/src/tests/test_aead.cpp +++ b/src/tests/test_aead.cpp @@ -347,6 +347,10 @@ class AEAD_Tests final : public Text_Based_Test result.test_eq("same provider", enc_provider, dec_provider); + // FFI currently requires this, so assure it is true for all modes + result.test_gte("enc buffer sizes ok", enc->update_granularity(), enc->minimum_final_size()); + result.test_gte("dec buffer sizes ok", dec->update_granularity(), dec->minimum_final_size()); + // test enc result.merge(test_enc(key, nonce, input, expected, ad, algo)); diff --git a/src/tests/test_modes.cpp b/src/tests/test_modes.cpp index 9ee97caed..7498f1390 100644 --- a/src/tests/test_modes.cpp +++ b/src/tests/test_modes.cpp @@ -74,6 +74,10 @@ class Cipher_Mode_Tests final : public Text_Based_Test result.test_eq("output_length", dec->output_length(expected.size()), input.size()); } + // FFI currently requires this, so assure it is true for all modes + result.test_gte("enc buffer sizes ok", enc->update_granularity(), enc->minimum_final_size()); + result.test_gte("dec buffer sizes ok", dec->update_granularity(), dec->minimum_final_size()); + // Test that disallowed nonce sizes result in an exception const size_t large_nonce_size = 65000; result.test_eq("Large nonce not allowed", enc->valid_nonce_length(large_nonce_size), false); |