src/keymanagement.c
branchENGINE-183
changeset 1752 6991834e731a
parent 1738 a7c4c6241b93
child 1760 f691b9603e8b
     1.1 --- a/src/keymanagement.c	Thu May 04 16:57:23 2017 +0200
     1.2 +++ b/src/keymanagement.c	Sun May 07 13:45:04 2017 +0200
     1.3 @@ -339,19 +339,14 @@
     1.4          for (_keylist = keylist; _keylist && _keylist->value; _keylist = _keylist->next) {
     1.5              bool is_own = false;
     1.6              
     1.7 -            if (session->use_only_own_private_keys)
     1.8 -            {
     1.9 -                status = own_key_is_listed(session, _keylist->value, &is_own);
    1.10 -                assert(status == PEP_STATUS_OK);
    1.11 -                if (status != PEP_STATUS_OK) {
    1.12 -                    free_stringlist(keylist);
    1.13 -                    return status;
    1.14 -                }
    1.15 +            status = own_key_is_listed(session, _keylist->value, &is_own);
    1.16 +            assert(status == PEP_STATUS_OK);
    1.17 +            if (status != PEP_STATUS_OK) {
    1.18 +                free_stringlist(keylist);
    1.19 +                return status;
    1.20              }
    1.21 -
    1.22 -            // TODO : also accept synchronized device group keys ?
    1.23              
    1.24 -            if (!session->use_only_own_private_keys || is_own)
    1.25 +            if (is_own)
    1.26              {
    1.27                  PEP_comm_type _comm_type_key;
    1.28                  
    1.29 @@ -543,16 +538,7 @@
    1.30      {
    1.31          status = key_revoked(session, identity->fpr, &revoked);
    1.32  
    1.33 -        // Forces re-election if key is missing and own-key-only not forced
    1.34 -        if (!session->use_only_own_private_keys && status == PEP_KEY_NOT_FOUND) 
    1.35 -        {
    1.36 -            status = elect_ownkey(session, identity);
    1.37 -            assert(status == PEP_STATUS_OK);
    1.38 -            if (status != PEP_STATUS_OK) {
    1.39 -                return status;
    1.40 -            }
    1.41 -        } 
    1.42 -        else if (status != PEP_STATUS_OK) 
    1.43 +        if (status != PEP_STATUS_OK) 
    1.44          {
    1.45              return status;
    1.46          }