src/pEpEngine.c
branchENGINE-73
changeset 1029 5b6af5b14d3a
parent 1019 e38a6ec264bd
child 1030 4354451338cd
     1.1 --- a/src/pEpEngine.c	Tue Aug 16 16:41:23 2016 +0200
     1.2 +++ b/src/pEpEngine.c	Wed Aug 17 12:27:44 2016 +0200
     1.3 @@ -1235,7 +1235,7 @@
     1.4  }
     1.5  
     1.6  DYNAMIC_API PEP_STATUS list_keys(
     1.7 -        PEP_SESSION session, identity_list** id_list
     1.8 +        PEP_SESSION session, identity_list** id_list, bool db_only, bool show_revoked
     1.9      )
    1.10  {
    1.11      assert(session);
    1.12 @@ -1244,7 +1244,24 @@
    1.13      if (!(session && id_list))
    1.14          return PEP_ILLEGAL_VALUE;
    1.15  
    1.16 -    return session->cryptotech[PEP_crypt_OpenPGP].list_keys(session, id_list);
    1.17 +    identity_list* _id_list = new_identity_list(NULL);
    1.18 +    
    1.19 +    PEP_STATUS retval = PEP_KEY_NOT_FOUND;
    1.20 +    
    1.21 +    // FIXME: do management DB stuff here
    1.22 +    
    1.23 +    identity_list* _keyring_ids = NULL;
    1.24 +    if (!db_only) {
    1.25 +        PEP_STATUS extra_status = session->cryptotech[PEP_crypt_OpenPGP].list_keys(session, _keyring_ids);
    1.26 +    }
    1.27 +        
    1.28 +    // FIXME: Combine lists here
    1.29 +    if (_keyring_ids) {
    1.30 +    }
    1.31 +    
    1.32 +    if (retval == PEP_STATUS_OK)
    1.33 +        *id_list = _id_list;
    1.34 +    return retval;
    1.35  }
    1.36  
    1.37  DYNAMIC_API PEP_STATUS generate_keypair(