adding trust_personal_key()

doc_update_sequoia
Volker Birk 8 years ago
parent 58a58a22b4
commit 8497834daa

@ -332,3 +332,31 @@ DYNAMIC_API PEP_STATUS key_compromized(PEP_SESSION session, const char *fpr)
return status;
}
DYNAMIC_API PEP_STATUS trust_personal_key(
PEP_SESSION session,
pEp_identity *ident
)
{
PEP_STATUS status = PEP_STATUS_OK;
assert(session);
assert(ident);
assert(!EMPTY(ident->address));
assert(!EMPTY(ident->user_id));
assert(!EMPTY(ident->fpr));
assert(!ident->me);
if (!ident || EMPTY(ident->address) || EMPTY(ident->user_id) ||
EMPTY(ident->fpr) || ident->me)
return PEP_ILLEGAL_VALUE;
status = update_identity(session, ident);
if (status != PEP_STATUS_OK)
return status;
ident->comm_type |= PEP_ct_confirmed;
status = update_identity(session, ident);
return status;
}

@ -122,6 +122,21 @@ DYNAMIC_API PEP_STATUS do_keymanagement(
DYNAMIC_API PEP_STATUS key_compromized(PEP_SESSION session, const char *fpr);
// trust_personal_key() - mark a key as trusted with a person
//
// parameters:
// session (in) session to use
// ident (in) person and key to trust in
//
// caveat:
// the fields user_id, address and fpr must be supplied
DYNAMIC_API PEP_STATUS trust_personal_key(
PEP_SESSION session,
pEp_identity *ident
);
#ifdef __cplusplus
}
#endif

Loading…
Cancel
Save