Browse Source

Added trust_personal_key

PYADPT-55
Edouard Tisserant 9 years ago
parent
commit
b7b7f9f3dd
  1. 11
      src/basic_api.cc
  2. 1
      src/basic_api.hh
  3. 5
      src/pEpmodule.cc

11
src/basic_api.cc

@ -63,6 +63,17 @@ namespace pEp {
else else
return my_words + partner_words; return my_words + partner_words;
} }
void trust_personal_key(Identity ident)
{
if (ident.fpr() == "")
throw invalid_argument("fingerprint needed in Identities");
if (ident.user_id() == "")
throw invalid_argument("user_id must be provided");
PEP_STATUS status = trust_personal_key(session, ident);
_throw_status(status);
}
} }
} }

1
src/basic_api.hh

@ -7,6 +7,7 @@ namespace pEp {
void update_identity(Identity& ident); void update_identity(Identity& ident);
void myself(Identity& ident); void myself(Identity& ident);
string _trustwords(Identity me, Identity partner, string lang); string _trustwords(Identity me, Identity partner, string lang);
void trust_personal_key(Identity ident);
} }
} }

5
src/pEpmodule.cc

@ -280,6 +280,11 @@ BOOST_PYTHON_MODULE(pEp)
"ensures that the own identity is being complete\n" "ensures that the own identity is being complete\n"
"supply ident.address and ident.username\n" "supply ident.address and ident.username\n"
); );
def("trust_personal_key", &trust_personal_key,
"trust_personal_key(ident)\n"
"\n"
"mark a key as trusted with a person\n"
);
// message API // message API

Loading…
Cancel
Save