ENGINE-633: copy-paste failure

doxygen_doc
parent 9ada278ffd
commit 2588ddf638

@ -657,7 +657,7 @@ DYNAMIC_API PEP_STATUS update_identity(
// evaluating it
bool is_own_user = identity->me;
bool input_has_user_id = !EMPTYSTR(identity->user_id);
bool input_has_username = !EMPTYSTR(identity->user_id);
bool input_has_username = !EMPTYSTR(identity->username);
bool input_has_real_id = input_has_user_id ? (strstr(identity->user_id, "TOFU_") != identity->user_id) : false;
char* default_own_id = NULL;

@ -274,6 +274,9 @@ TEST_F(URIAddressTest, check_uri_address_encrypt) {
// We don't check for anything here??? FIXME! WTF!
}
// FIXME:
// KB: I'm not really sure what we're now testing here, since key election is now gone.
//
TEST_F(URIAddressTest, check_uri_address_tofu_1) {
const char* sys_a_addr = "payto://BIC/SYSTEMA";
const char* sys_b_addr = "payto://BIC/SYSTEMB";
@ -292,7 +295,13 @@ TEST_F(URIAddressTest, check_uri_address_tofu_1) {
ASSERT_EQ(status , PEP_STATUS_OK);
ASSERT_TRUE(me->fpr && me->fpr[0] != '\0');
// No more key election.
pEp_identity* you = new_identity(sys_b_addr, NULL, "SYSTEM_B", NULL);
status = update_identity(session, you);
you->fpr = strdup(sys_b_fpr);
status = set_identity(session, you);
ASSERT_OK;
/*
stringlist_t* keylist = NULL;
@ -309,7 +318,7 @@ TEST_F(URIAddressTest, check_uri_address_tofu_1) {
message* enc_msg = NULL;
// We are doing key election here on purpose.
// We were doing key election here on purpose. Too bad now...
status = encrypt_message(session, msg, NULL, &enc_msg, PEP_enc_PGP_MIME, 0);
ASSERT_EQ(status, PEP_STATUS_OK);
@ -348,6 +357,10 @@ TEST_F(URIAddressTest, check_uri_address_tofu_2) {
pEp_identity* you = new_identity(sys_b_addr, NULL, "SYSTEM_B", NULL);
status = update_identity(session, you);
// No more key election.
you->fpr = strdup(sys_b_fpr);
status = set_identity(session, you);
ASSERT_OK;
string msg_txt = slurp("test_mails/system_a_to_b_755_part_1.eml");
message* msg = NULL;

@ -987,8 +987,10 @@ PEP_STATUS set_up_preset(PEP_SESSION session,
return PEP_OUT_OF_MEMORY;
// honestly probably happens anyway
if (set_ident && status == PEP_STATUS_OK)
if (set_ident && status == PEP_STATUS_OK) {
retval->fpr = strdup(fpr);
status = set_identity(session, retval);
}
if (set_own) {
retval->me = true;

Loading…
Cancel
Save