ENGINE-847: Ok, down to the last two hard broken tests. Fixed a couple of weird tests which were I think put in when we started letting folks attach private keys to send them around, but because ratings change what kind of processing goes on internally, its meant that the messages themselves are evaluated differently. This breaking more-or-less shows that what we want to do works, but I think maybe someone should look into whether the tests are that meaningful now.

ENGINE-847
Krista Bennett 2 years ago
parent bcbee6d62d
commit 0bfcff3749

@ -141,7 +141,7 @@ TEST_F(DecryptAttachPrivateKeyTrustedTest, check_decrypt_attach_private_key_trus
ASSERT_TRUE(status == PEP_STATUS_OK || status == PEP_CANNOT_FIND_IDENTITY);
ASSERT_NE(same_addr_same_uid->comm_type & PEP_ct_confirmed, PEP_ct_confirmed);
status = key_reset_trust(session, same_addr_same_uid);
status = key_reset_trust(session, same_addr_same_uid); // KB: WHY were we doing this?? We remove the key's trust entry here, fine, but... it's still an own key?
output_stream << "Done!" << endl << endl;

@ -179,7 +179,8 @@ TEST_F(DecryptAttachPrivateKeyUntrustedTest, check_decrypt_attach_private_key_un
&keylist_used, &rating, &flags);
status = get_trust(session, same_addr_same_uid);
ASSERT_EQ(same_addr_same_uid->comm_type, PEP_ct_pEp_unconfirmed);
ASSERT_EQ(status, PEP_CANNOT_FIND_IDENTITY);
ASSERT_EQ(same_addr_same_uid->comm_type, PEP_ct_unknown);
output_stream << "Case 1 Status: " << tl_status_string(status) << endl;
output_stream << "Private key is not trusted for " << same_addr_same_uid->fpr << ", as desired, as the public key was not trusted." << endl;

Loading…
Cancel
Save