test fixes, plus updating default version for update_identity and pEp users

ENGINE-641
parent b03add0e73
commit 95e7d34bc8

@ -454,7 +454,11 @@ static void adjust_pEp_trust_status(PEP_SESSION session, pEp_identity* identity)
if (pEp_user) {
PEP_comm_type confirmation_status = identity->comm_type & PEP_ct_confirmed;
identity->comm_type = PEP_ct_pEp_unconfirmed | confirmation_status;
identity->comm_type = PEP_ct_pEp_unconfirmed | confirmation_status;
if (identity->major_ver == 0) {
identity->major_ver = 2;
identity->minor_ver = 0;
}
}
}

@ -50,10 +50,12 @@ bool Message2_1Tests::verify_message_version_produced(message* enc_msg, unsigned
&ptext, &psize, &keylist,
NULL);
cout << ptext << endl;
// fixme, check status
if (strstr(ptext, "pEp-Wrapped-Message-Info: OUTER") != NULL && strstr(ptext, "pEp-Wrapped-Message-Info: OUTER") != NULL) {
if (strstr(ptext, "pEp-Wrapped-Message-Info: OUTER") != NULL && strstr(ptext, "pEp-Wrapped-Message-Info: INNER") != NULL) {
*maj_inout = 2;
*min_inout = 1;
*min_inout = 0;
}
else if (strstr(ptext, "X-pEp-Wrapped-Message-Info: INNER") != NULL && strstr(ptext, "forwarded=no") != NULL) {
*maj_inout = 2;
@ -132,7 +134,7 @@ void Message2_1Tests::check_message2_1_recip_2_0() {
unsigned int major = 2;
unsigned int minor = 0;
TEST_ASSERT_MSG(verify_message_version_produced(enc_msg, &major, &minor),
(to_string(major) + to_string(minor)).c_str());
(to_string(major) + "." + to_string(minor)).c_str());
free_identity(carol);
free_message(msg);

@ -711,7 +711,7 @@ PEP_STATUS set_up_preset(PEP_SESSION session,
const char* email = NULL;
const char* key_prefix = NULL;
string pubkey_dir = "test_keys/pub/";
string privkey_dir = "test_keys/priv";
string privkey_dir = "test_keys/priv/";
const char* fpr = NULL;
PEP_STATUS status = PEP_STATUS_OK;

Loading…
Cancel
Save