src/keymanagement.c
branchsync
changeset 3017 34a733193f47
parent 3001 8c1aafb3ad57
parent 3011 a64991e4c87c
child 3054 446b47c16304
child 3056 924a5dfb5367
     1.1 --- a/src/keymanagement.c	Fri Oct 05 11:31:55 2018 +0200
     1.2 +++ b/src/keymanagement.c	Fri Oct 05 15:03:04 2018 +0200
     1.3 @@ -1171,6 +1171,12 @@
     1.4      if (!(session && ident && ident->fpr))
     1.5          return PEP_ILLEGAL_VALUE;
     1.6              
     1.7 +        // See if key is revoked already
     1.8 +        bool revoked = false;
     1.9 +        status = key_revoked(session, ident->fpr, &revoked);
    1.10 +        if (!revoked)
    1.11 +            revoke_key(session, ident->fpr, NULL);
    1.12 +            
    1.13      // double-check to be sure key is even in the DB
    1.14      if (ident->fpr)
    1.15          status = set_pgp_keypair(session, ident->fpr);