ENGINE-27: set_identity can be called with a null/empty fpr now per Volker. ensured it does not call blacklist_is_listed on null/empty fprs ENGINE-27
authorKrista Grothoff <krista@pep-project.org>
Thu, 29 Sep 2016 13:07:41 +0200
branchENGINE-27
changeset 12245572d700de5d
parent 1223 7bc623f2b384
child 1228 f123284ae55f
child 2736 0ee4503bc936
ENGINE-27: set_identity can be called with a null/empty fpr now per Volker. ensured it does not call blacklist_is_listed on null/empty fprs
src/keymanagement.c
     1.1 --- a/src/keymanagement.c	Thu Sep 29 13:03:56 2016 +0200
     1.2 +++ b/src/keymanagement.c	Thu Sep 29 13:07:41 2016 +0200
     1.3 @@ -111,6 +111,7 @@
     1.4      )
     1.5  {
     1.6      pEp_identity *stored_identity;
     1.7 +    pEp_identity* temp_id = NULL;
     1.8      PEP_STATUS status;
     1.9  
    1.10      assert(session);
    1.11 @@ -146,7 +147,7 @@
    1.12          goto exit_free;
    1.13  
    1.14      /* We elect a pubkey first in case there's no acceptable stored fpr */
    1.15 -    pEp_identity* temp_id = identity_dup(identity);
    1.16 +    temp_id = identity_dup(identity);
    1.17      
    1.18      status = elect_pubkey(session, temp_id);
    1.19      if (status != PEP_STATUS_OK)