Compare commits

...

1 Commits

@ -112,8 +112,8 @@ const FunctionMap functions = {
FP( "cache_encrypt_message_for_self", new FuncPC<PEP_STATUS, In_Pep_Session,
In<pEp_identity*>, In<message*>, In<stringlist_t*>, Out<message*>, In<PEP_enc_format>, In<PEP_encrypt_flags_t>>( &pEp::MessageCache::cache_encrypt_message_for_self) ),
FP( "decrypt_message", new FuncPC<PEP_STATUS, In_Pep_Session, InOut<message*>, Out<message*>, InOutP<stringlist_t*>, Out<PEP_rating>, InOutP<PEP_decrypt_flags_t>>( &decrypt_message ) ),
FP( "cache_decrypt_message", new FuncPC<PEP_STATUS, In_Pep_Session, InOut<message*>, Out<message*>, InOutP<stringlist_t*>, Out<PEP_rating>, InOutP<PEP_decrypt_flags_t>>( &pEp::MessageCache::cache_decrypt_message) ),
FP( "decrypt_message", new FuncPC<PEP_STATUS, In_Pep_Session, InOut<message*>, Out<message*>, InOutP<stringlist_t*>, InOutP<PEP_decrypt_flags_t>>( &decrypt_message ) ),
FP( "cache_decrypt_message", new FuncPC<PEP_STATUS, In_Pep_Session, InOut<message*>, Out<message*>, InOutP<stringlist_t*>, InOutP<PEP_decrypt_flags_t>>( &pEp::MessageCache::cache_decrypt_message) ),
FP( "get_key_rating_for_user", new FuncPC<PEP_STATUS, In_Pep_Session, In<c_string>, In<c_string>, Out<PEP_rating>>( &get_key_rating_for_user) ),
// from mime.h

@ -252,7 +252,9 @@ message* from_json<message*>(const js::Value& v)
msg->comments = from_json_object<char*, js::str_type>(o, "comments");
msg->opt_fields = from_json_object<stringpair_list_t*, js::array_type>(o, "opt_fields");
msg->enc_format = from_json_object<PEP_enc_format, js::int_type>(o, "enc_format");
msg->rating = from_json_object<PEP_rating, js::int_type>(o, "rating");
std::cerr << "FOO_from_json: rating " << msg->rating << "\n";
return msg.release();
}
@ -345,6 +347,8 @@ js::Value to_json<message const*>(message const* const& msg)
to_json_object(o, "comments", msg->comments);
to_json_object(o, "opt_fields", msg->opt_fields);
to_json_object(o, "enc_format", msg->enc_format);
to_json_object(o, "rating", msg->rating);
std::cerr << "FOO_to_json: rating " << msg->rating << "\n";
return js::Value( std::move(o) );
}

@ -80,7 +80,8 @@ static const std::string VersionName =
// "(46) Erfurt-West"; // JSON-156: delete client cached values after timeout.
// "(47a) Erfurt-Ost"; // JSON-160, JSON-172, JSON-179.
// "(47b) Erfurt-Vieselbach"; // JSON-183: "Provide an API for pEp4Tb to communicate whether the message subject should be hidden (replaced with pEp)"
"(48) Nohra"; // FPMAIL-412, P4TB-400: add import_key_with_fpr_return()
// "(48) Nohra"; // FPMAIL-412, P4TB-400: add import_key_with_fpr_return()
"(49) Weimar"; // ENGINE-959: remove rating out parameter from message_decrypt()
} // end of anonymous namespace
////////////////////////////////////////////////////////////////////////////

@ -131,7 +131,7 @@ TEST_F( EncodeDecodeTest, Msg )
PEP_rating rating{};
PEP_decrypt_flags_t flags{}; // FIXME: which flags do you use on input?
PEP_STATUS status_dec = decrypt_message(session, msg2.get(), &msg3_raw, &keylist, &rating, &flags);
PEP_STATUS status_dec = decrypt_message(session, msg2.get(), &msg3_raw, &keylist, &flags);
EXPECT_EQ( status_dec, PEP_STATUS_OK);
ASSERT_NE( msg3_raw , nullptr);
auto msg3 = pEp::utility::make_c_ptr( msg3_raw, &free_message);

Loading…
Cancel
Save