Commit graph

16 commits

Author SHA1 Message Date
459779bea6 Add more test cases 2023-05-08 22:17:02 +02:00
da0ffb4a51 Add a test message with Emoji 2023-05-08 22:17:02 +02:00
54ee9d9875 Add minor E2E test improvements 2023-05-08 22:17:02 +02:00
94e22caf8e When encryption fails, revert to cleartext delivery
When GnuPG refuses to encrypt a message (e.g. when key has expired), record
information about the failure and send to logs, then deliver cleartext.  This
way we won't bounce email that could be delivered without encryption.

Also: add more E2E tests.
2023-05-08 22:16:41 +02:00
b242edf098 Add a more sophisticated UTF-8 test case
Add a new test message to verify Lacre's behaviour when processing
UTF-8 messages with text in two different scripts (latin-based and cyrillic).

Also: log Content-Transfer-Encoding when logging headers is enabled.
2023-05-08 22:14:24 +02:00
0fac54a29a Add UTF-8 and ISO-8859-2 test cases, make tests more reliable 2023-05-08 22:14:24 +02:00
037a527c44 Add a test case with non-ASCII message content 2023-05-08 22:14:24 +02:00
b4f30d7e8f Add test clear text input message with PGP markers
It's possible to trick Lacre by sending PGP markers in message body, causing
it to classify that message being already encrypted.  This test case is used
to reproduce this scenario.
2022-10-22 20:54:08 +02:00
b91501d3dd Convert all test input messages to CRLF line endings 2022-10-22 20:52:14 +02:00
881a8d1756 Add GnuPG encryption support for addresses with delimiters
If a user registers their key for address alice@example.com but receives a
message sent to alice+something@example.com, this message should be encrypted
as well.

- Implement delimiter support for GnuPG encryption.

- Add E2E test case for a clear text message delivered to an address with
delimiter.

- Fix minor bug: wrong configuration parameter was retrieved when logging
information about enc_domain_keymap being active.
2022-06-08 21:20:58 +02:00
3bcc1151e5 Add E2E case: a user with a key and PGP/MIME configured
- Add a new test input message for a new test identity, test scenario
  configuration and a test key.

- While retrieving message payload, determine charset based on the
  Content-Type header.  When missing, default to UTF-8.

- Use more comprehensible variables names.

- Adjust logging levels.
2022-05-30 00:49:40 +02:00
5a8d2c0108 Add E2E cases: signed cleartext and multipart/encrypted 2022-01-10 19:48:44 +01:00
435528de43 Add an E2E test case with an already encrypted message 2022-01-10 19:32:46 +01:00
1002da78fa Clean up test messages
Remove unused msgout files, fix addresses in msgin files.
2022-01-09 22:00:06 +01:00
27d7481078 Set up ground for E2E tests
- Use an environment variable to point at the configuration file while
  strating gpg-mailgate.py.

- Unify paths: store temporary config, logs and anything else under 'test'
  directory.

- Configure more tests (RSA, Ed25519).

- Add test descriptions to be shown before they're started.
2022-01-06 16:33:21 +01:00
7a063a91b8 Polish E2E testing script and make it configurable 2021-11-09 21:25:41 +01:00