Browse Source

Added key_reset_trust, accepting identity instead of fpr

doc_update_sequoia
Edouard Tisserant 6 years ago
parent
commit
3ca28f148f
3 changed files with 36 additions and 3 deletions
  1. +21
    -0
      src/keymanagement.c
  2. +12
    -0
      src/keymanagement.h
  3. +3
    -3
      src/pEpEngine.c

+ 21
- 0
src/keymanagement.c View File

@ -335,6 +335,27 @@ DYNAMIC_API PEP_STATUS key_compromized(
return status;
}
DYNAMIC_API PEP_STATUS key_reset_trust(
PEP_SESSION session,
pEp_identity *ident
)
{
PEP_STATUS status = PEP_STATUS_OK;
assert(session);
assert(ident);
assert(!EMPTY(ident->fpr));
if (!(session && ident && ident->fpr))
return PEP_ILLEGAL_VALUE;
if (ident->me)
revoke_key(session, ident->fpr, NULL);
status = reset_trust(session, ident->fpr);
return status;
}
DYNAMIC_API PEP_STATUS trust_personal_key(
PEP_SESSION session,
pEp_identity *ident


+ 12
- 0
src/keymanagement.h View File

@ -140,6 +140,18 @@ DYNAMIC_API PEP_STATUS trust_personal_key(
);
// key_reset_trust() - undo key_compromized or trust_personal_key
//
// parameters:
// session (in) session to use
// ident (in) person and key which was compromized
DYNAMIC_API PEP_STATUS key_reset_trust(
PEP_SESSION session,
pEp_identity *ident
);
#ifdef __cplusplus
}
#endif


+ 3
- 3
src/pEpEngine.c View File

@ -735,9 +735,9 @@ DYNAMIC_API PEP_STATUS mark_as_compromized(
}
DYNAMIC_API PEP_STATUS reset_trust(
PEP_SESSION session,
const char *fpr
)
PEP_SESSION session,
const char *fpr
)
{
int result;


Loading…
Cancel
Save