diff options
Diffstat (limited to 'src/tests/test_pk_pad.cpp')
-rw-r--r-- | src/tests/test_pk_pad.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/tests/test_pk_pad.cpp b/src/tests/test_pk_pad.cpp index 33277da2b..f802bf048 100644 --- a/src/tests/test_pk_pad.cpp +++ b/src/tests/test_pk_pad.cpp @@ -7,8 +7,8 @@ #include "tests.h" #if defined(BOTAN_HAS_PK_PADDING) - #include <botan/emsa.h> - #include <botan/eme.h> + #include <botan/emsa.h> + #include <botan/eme.h> #endif namespace Botan_Tests { @@ -18,10 +18,11 @@ namespace Botan_Tests { class EME_Decoding_Tests : public Text_Based_Test { public: - EME_Decoding_Tests() : - Text_Based_Test("pk_pad_eme", - "RawCiphertext,ValidInput", - "Plaintext") {} + EME_Decoding_Tests() + : Text_Based_Test( + "pk_pad_eme", + "RawCiphertext,ValidInput", + "Plaintext") {} Test::Result run_one_test(const std::string& algo, const VarMap& vars) override { @@ -44,7 +45,9 @@ class EME_Decoding_Tests : public Text_Based_Test const bool is_valid = get_req_bool(vars, "ValidInput"); if(is_valid == false) + { result.test_eq("Plaintext value is empty for invalid EME inputs", plaintext.size(), 0); + } uint8_t valid_mask = 0; Botan::secure_vector<uint8_t> decoded = @@ -69,5 +72,3 @@ BOTAN_REGISTER_TEST("pk_pad_eme", EME_Decoding_Tests); #endif } - - |