Browse Source

Added non-matching 2.2 claim case

IPS-2 Release_3.1.0
Krista Bennett 5 months ago
parent
commit
4841a14a5d
2 changed files with 169 additions and 0 deletions
  1. +43
    -0
      test/src/DefaultFromEmailTest.cc
  2. +126
    -0
      test/test_mails/CanonicalFrom3.1BobToAlice_2_2_claim_doesnt_match_signer.eml

+ 43
- 0
test/src/DefaultFromEmailTest.cc View File

@ -1287,5 +1287,48 @@ TEST_F(DefaultFromEmailTest, check_encrypted_key_import_trusted_bob_noclobber_1_
}
TEST_F(DefaultFromEmailTest, check_encrypted_key_import_bob_2_2_bad_sender_claim) {
const TestUtilsPreset::IdentityInfo& sender_info = TestUtilsPreset::presets[TestUtilsPreset::BOB];
set_up_and_check_initial_identities(TestUtilsPreset::BOB, sender_info);
// Ok, we now the desired state. Run the import mail fun.
read_decrypt_check_incoming_mail("test_mails/CanonicalFrom3.1BobToAlice_2_2_claim_doesnt_match_signer.eml",
PEP_rating_unreliable, PEP_DECRYPTED);
// Check that the default key matches the canonical default key for this sender,
// if expected to be present.
check_sender_default_key_status(sender_info, PEP_ct_key_not_found);
}
TEST_F(DefaultFromEmailTest, check_encrypted_key_import_reliable_bob_2_2_bad_sender_claim) {
const TestUtilsPreset::IdentityInfo& sender_info = TestUtilsPreset::presets[TestUtilsPreset::BOB];
set_up_and_check_initial_identities(TestUtilsPreset::BOB, sender_info);
force_sender_default_to_be_set(TestUtilsPreset::BOB, false);
// Ok, we now the desired state. Run the import mail fun.
read_decrypt_check_incoming_mail("test_mails/CanonicalFrom3.1BobToAlice_2_2_claim_doesnt_match_signer.eml",
PEP_rating_unreliable, PEP_DECRYPTED);
// Check that the default key matches the canonical default key for this sender,
// if expected to be present.
check_sender_default_key_status(sender_info, PEP_ct_pEp_unconfirmed);
}
TEST_F(DefaultFromEmailTest, check_encrypted_key_import_trusted_bob_2_2_bad_sender_claim) {
const TestUtilsPreset::IdentityInfo& sender_info = TestUtilsPreset::presets[TestUtilsPreset::BOB];
set_up_and_check_initial_identities(TestUtilsPreset::BOB, sender_info);
force_sender_default_to_be_set(TestUtilsPreset::BOB, true);
// Ok, we now the desired state. Run the import mail fun.
read_decrypt_check_incoming_mail("test_mails/CanonicalFrom3.1BobToAlice_2_2_claim_doesnt_match_signer.eml",
PEP_rating_unreliable, PEP_DECRYPTED);
// Check that the default key matches the canonical default key for this sender,
// if expected to be present.
check_sender_default_key_status(sender_info, PEP_ct_pEp);
}

+ 126
- 0
test/test_mails/CanonicalFrom3.1BobToAlice_2_2_claim_doesnt_match_signer.eml View File

@ -0,0 +1,126 @@
Message-ID: <pEp.QV28QW.1RXB78A9BSKGS.5892D134-5FCC-4707-A57C-D0A0A8487EFE@pep-project.org>
From: Bob Dog <pep.test.bob@pep-project.org>
To: Alice Spivak Hyatt <pep.test.alice@pep-project.org>
Subject: =?utf-8?Q?p=E2=89=A1p?=
X-pEp-Version: 3.1
MIME-Version: 1.0
Content-Type: multipart/encrypted; boundary="72320cd51d539bb97888cbf44277db42";
protocol="application/pgp-encrypted"
--72320cd51d539bb97888cbf44277db42
Content-Type: application/pgp-encrypted
Version: 1
--72320cd51d539bb97888cbf44277db42
Content-Type: application/octet-stream
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="msg.asc"
-----BEGIN PGP MESSAGE-----
wcBMA4rbkTfsG51OAQgAswOkSbPWY0ieBIPEG+xKZ9QumbY6I5DcEt7ilrJ1xA2/
CLLoGPHPkd1UJeliWghZTtpU07wht3f0en3yNA3G62UkfQkINXG5x7MPNaHsuag3
IyVWniCa8mf87nRAa403ADr4k4p0Ft3cT5lwliCYNSUNaeYIDL7xjmm5iFIU2WrW
1lI7SOmbUXfKFmYIk/QUJ70j8UPMj7sWiq0kcWULdTK7zL5vsoSxI/kSD8lPbrOH
aGTpBr0DGOnRS/XujSGmcvlNEPaGcN2Xqzo++2o8gpdxIaVRF8noH1S/W+cq45q3
lAGy+gqWWSjYPK++XhazRsF820+IE/gZBVnrXF2GGsHATANaAgXZcwg/TQEH/0jt
3c42wXN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