Browse Source

JSON-183: rename subject_info into partner_info, implement the correct condition, bump server version to 0.22.0 "(47b) Erfurt-Viesselbach"

JSON-183
roker 7 months ago
parent
commit
6090ec00c6
3 changed files with 18 additions and 17 deletions
  1. +8
    -6
      server/Makefile.conf-old
  2. +6
    -9
      server/ev_server.cc
  3. +4
    -2
      server/server_version.cc

+ 8
- 6
server/Makefile.conf-old View File

@ -103,12 +103,6 @@ endif
CXXFLAGS+= -Ijson_spirit $(BOOST_INC) $(ENGINE_INC) $(ETPAN_INC) $(GPGME_INC) $(UUID_INC)
LDFLAGS+= $(BOOST_LIB) $(ENGINE_LIB) $(ETPAN_LIB) $(GPGME_LIB) $(UUID_LIB)
ifeq ($(BUILD_FOR),Linux)
LDLIBS+= -lpEpEngine -lpEpAdapter -lboost_system -lboost_filesystem -lboost_program_options -lboost_thread -lboost_regex
GTEST_DIR=/usr/src/googletest/googletest/
else ifeq ($(BUILD_FOR),Darwin)
LDLIBS+= -lpEpEngine -lpEpAdapter -lboost_system-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt -lboost_regex-mt
endif
LDLIBS+=$(WEBSERVER_LIB)
@ -120,6 +114,14 @@ else
$(error "You must set MIME_LIB to 'etpan' or 'pEpMIME'!" )
endif
ifeq ($(BUILD_FOR),Linux)
LDLIBS+= -lpEpEngine -lpEpAdapter -lboost_system -lboost_filesystem -lboost_program_options -lboost_thread -lboost_regex
GTEST_DIR=/usr/src/googletest/googletest/
else ifeq ($(BUILD_FOR),Darwin)
LDLIBS+= -lpEpEngine -lpEpAdapter -lboost_system-mt -lboost_filesystem-mt -lboost_program_options-mt -lboost_thread-mt -lboost_regex-mt
endif
######### Google Test #########
#GTEST_DIR=


+ 6
- 9
server/ev_server.cc View File

@ -68,29 +68,26 @@ bool has_non_pEp_user(PEP_SESSION session, const identity_list* il)
{
for(; il!=nullptr; il = il->next)
{
update_identity(session, il->ident);
if(il->ident->comm_type != PEP_ct_pEp)
if(il->ident->comm_type < PEP_ct_pEp_unconfirmed)
return true;
}
return false;
}
PEP_STATUS outgoing_message_rating_with_subject_info(PEP_SESSION session, message* msg, PEP_rating* rating, bool* subject_info)
PEP_STATUS outgoing_message_rating_with_partner_info(PEP_SESSION session, message* msg, PEP_rating* rating, bool* partner_info)
{
PEP_STATUS status = outgoing_message_rating(session, msg, rating);
if(*rating == PEP_rating_unencrypted)
{
*subject_info = false;
*partner_info = false;
}else{
// pseudo code:
// if (at_least_one_PGP_address()) protect_subject = session->unprotected_subject; else true;
if( has_non_pEp_user(session, msg->to)
|| has_non_pEp_user(session, msg->cc))
{
*subject_info = false;
*partner_info = false;
}else{
*subject_info = true;
*partner_info = true;
}
}
return status;
@ -149,7 +146,7 @@ const FunctionMap functions = {
FP( "mark_as_comprimized", new FuncPC<PEP_STATUS, In_Pep_Session, In<c_string>> ( &mark_as_compromized) ),
FP( "identity_rating" , new FuncPC<PEP_STATUS, In_Pep_Session, In<pEp_identity*>, Out<PEP_rating>>( &identity_rating) ),
FP( "outgoing_message_rating", new FuncPC<PEP_STATUS, In_Pep_Session, In<message*>, Out<PEP_rating>>( &outgoing_message_rating) ),
FP( "outgoing_message_rating_with_subject_info", new FuncPC<PEP_STATUS, In_Pep_Session, In<message*>, Out<PEP_rating>, Out<bool>>( &outgoing_message_rating_with_subject_info) ),
FP( "outgoing_message_rating_with_partner_info", new FuncPC<PEP_STATUS, In_Pep_Session, In<message*>, Out<PEP_rating>, Out<bool>>( &outgoing_message_rating_with_partner_info) ),
FP( "outgoing_message_rating_preview", new FuncPC<PEP_STATUS, In_Pep_Session, In<message*>, Out<PEP_rating>>( &outgoing_message_rating_preview) ),
FP( "set_identity_flags" , new FuncPC<PEP_STATUS, In_Pep_Session, InOut<pEp_identity*>, In<identity_flags_t>>( &set_identity_flags) ),
FP( "unset_identity_flags" , new FuncPC<PEP_STATUS, In_Pep_Session, InOut<pEp_identity*>, In<identity_flags_t>>( &unset_identity_flags) ),


+ 4
- 2
server/server_version.cc View File

@ -78,7 +78,8 @@ static const std::string VersionName =
// "(44) Neudietendorf"; // replace my own sync thread code by libpEpAdapter's implementation.
// "(45) Kreuz Erfurt"; // fix of context-saved function parameters that would cause trouble when >1 request is processed in parallel.
// "(46) Erfurt-West"; // JSON-156: delete client cached values after timeout.
"(47a) Erfurt-Ost"; // JSON-160, JSON-172, JSON-179.
// "(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)"
} // end of anonymous namespace
////////////////////////////////////////////////////////////////////////////
@ -115,7 +116,8 @@ const ServerVersion& server_version()
//static const ServerVersion sv(0,20,1); // JSON-153: passphrase support
//static const ServerVersion sv(0,21,0); // import_key() expects binary data, so they are always base64-encoded!
//static const ServerVersion sv(0,21,1); // wrap _all_ Engine functions with passphrase_cache.api(), except config_*() functions.
static const ServerVersion sv(0,21,2); // JSON-165 the msg param of re_evaluate_message_rating() is now "inout" and not "in" any more
//static const ServerVersion sv(0,21,2); // JSON-165 the msg param of re_evaluate_message_rating() is now "inout" and not "in" any more
static const ServerVersion sv(0,22,0); // JSON-183 "Provide an API for pEp4Tb to communicate whether the message subject should be hidden (replaced with pEp)"
return sv;
}


Loading…
Cancel
Save