diff --git a/src/tests/cli_tests.py b/src/tests/cli_tests.py index 634c88504e..c5be6d8c68 100755 --- a/src/tests/cli_tests.py +++ b/src/tests/cli_tests.py @@ -4654,6 +4654,22 @@ def test_encryption_no_wrap(self): self.assertEqual(file_text(dec), file_text(src)) clear_workfiles() + def test_aead_eax_botan35_decryption(self): + # Artifact which was obtained from tests used EAX + Twofish + if not RNP_AEAD_EAX or not RNP_TWOFISH: + self.skipTest('AEAD-EAX is not supported') + # See issue #2245 for the details + [dec] = reg_workfiles('cleartext', '.txt') + EAXSRC = data_path('test_messages/cleartext.rnp-aead-eax') + # Decrypt and verify AEAD-EAX encrypted message by RNP + ret, _, _ = run_proc(RNP, ['--keyfile', data_path('test_messages/seckey-aead-eax.gpg'), '--password', 'encsign1pass', '-d', EAXSRC, '--output', dec]) + self.assertEqual(ret, 0) + remove_files(dec) + # Decrypt it using the password + ret, _, _ = run_proc(RNP, ['--keyfile', data_path('test_messages/pubkey-aead-eax.gpg'), '--password', 'password1', '-d', EAXSRC, '--output', dec]) + self.assertEqual(ret, 0) + clear_workfiles() + class Compression(unittest.TestCase): @classmethod def setUpClass(cls): diff --git a/src/tests/data/test_messages/cleartext.rnp-aead-eax b/src/tests/data/test_messages/cleartext.rnp-aead-eax new file mode 100644 index 0000000000..c338d09136 Binary files /dev/null and b/src/tests/data/test_messages/cleartext.rnp-aead-eax differ diff --git a/src/tests/data/test_messages/pubkey-aead-eax.gpg b/src/tests/data/test_messages/pubkey-aead-eax.gpg new file mode 100644 index 0000000000..df5dfc4702 Binary files /dev/null and b/src/tests/data/test_messages/pubkey-aead-eax.gpg differ diff --git a/src/tests/data/test_messages/seckey-aead-eax.gpg b/src/tests/data/test_messages/seckey-aead-eax.gpg new file mode 100644 index 0000000000..5a89350575 Binary files /dev/null and b/src/tests/data/test_messages/seckey-aead-eax.gpg differ