Browse Source

Put in private key check in set_own_key.

doc_update_sequoia
Krista Bennett 4 years ago
parent
commit
08f096189b
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      src/keymanagement.c

+ 9
- 0
src/keymanagement.c View File

@ -1704,6 +1704,15 @@ DYNAMIC_API PEP_STATUS set_own_key(
if (status != PEP_STATUS_OK && status != PEP_GET_KEY_FAILED && status != PEP_KEY_UNSUITABLE)
return status;
status = PEP_STATUS_OK;
bool private = false;
status = contains_priv_key(session, fpr, &private);
if (status != PEP_STATUS_OK)
return status;
if (!private)
return PEP_KEY_UNSUITABLE;
if (me->fpr)
free(me->fpr);


Loading…
Cancel
Save