ENGINE-27: ensure set_identity doesn't get called in update_identity if the fpr is null ENGINE-27
authorKrista Grothoff <krista@pep-project.org>
Thu, 29 Sep 2016 12:16:12 +0200
branchENGINE-27
changeset 122231d0844f3a18
parent 1221 b47c576b00dd
child 1223 7bc623f2b384
ENGINE-27: ensure set_identity doesn't get called in update_identity if the fpr is null
src/keymanagement.c
src/pEpEngine.c
     1.1 --- a/src/keymanagement.c	Thu Sep 29 11:10:41 2016 +0200
     1.2 +++ b/src/keymanagement.c	Thu Sep 29 12:16:12 2016 +0200
     1.3 @@ -279,7 +279,7 @@
     1.4  
     1.5          // Identity doesn't get stored if call was just about checking existing
     1.6          // user by address (i.e. no user id given but already stored)
     1.7 -        if (!(_no_user_id && stored_identity) || _did_elect_new_key)
     1.8 +        if (!(_no_user_id && stored_identity) || _did_elect_new_key || EMPTYSTR(temp_id->fpr))
     1.9          {
    1.10              status = set_identity(session, temp_id);
    1.11              assert(status == PEP_STATUS_OK);
     2.1 --- a/src/pEpEngine.c	Thu Sep 29 11:10:41 2016 +0200
     2.2 +++ b/src/pEpEngine.c	Thu Sep 29 12:16:12 2016 +0200
     2.3 @@ -931,6 +931,7 @@
     2.4          return PEP_ILLEGAL_VALUE;
     2.5  
     2.6      bool listed;
     2.7 +    
     2.8      PEP_STATUS status = blacklist_is_listed(session, identity->fpr, &listed);
     2.9      assert(status == PEP_STATUS_OK);
    2.10      if (status != PEP_STATUS_OK)