src/key_reset.c
branchENGINE-398
changeset 2948 3f66f366dc5f
parent 2947 4b525ec0f95c
child 2956 e82181973f21
     1.1 --- a/src/key_reset.c	Fri Sep 14 20:18:53 2018 +0200
     1.2 +++ b/src/key_reset.c	Mon Sep 17 15:31:48 2018 +0200
     1.3 @@ -456,15 +456,20 @@
     1.4                  
     1.5          }
     1.6          else { // not is_me
     1.7 +            // TODO: Decide what this means. We have a non-own identity, we don't
     1.8 +            //       have an fpr. Do we reset all keys for that identity?
     1.9 +            if (EMPTYSTR(fpr_copy)) {
    1.10 +                NOT_IMPLEMENTED
    1.11 +            }
    1.12 +                
    1.13              // remove fpr from all identities
    1.14              // remove fpr from all users
    1.15              if (status == PEP_STATUS_OK)
    1.16                  status = remove_fpr_as_default(session, fpr_copy);
    1.17              // delete key from DB
    1.18 -            if (status == PEP_STATUS_OK) {};
    1.19 -//                status = delete_keypair(session, fpr_copy);
    1.20 -            // N.B. If this key is being replaced by something else, it
    1.21 -            // is done outside of this function.    
    1.22 +            if (status == PEP_STATUS_OK) {
    1.23 +                status = remove_key(session, fpr_copy);
    1.24 +            };
    1.25          }
    1.26      }
    1.27