test/src/util/test_util.cc
branchsync
changeset 3270 d8aea79654c3
parent 3001 8c1aafb3ad57
parent 3254 6e7f6bc9460a
child 3276 c0b3430f1f1d
child 3281 676ee202da9b
     1.1 --- a/test/src/util/test_util.cc	Tue Jan 29 09:02:12 2019 +0100
     1.2 +++ b/test/src/util/test_util.cc	Wed Feb 06 07:17:26 2019 +0100
     1.3 @@ -31,8 +31,10 @@
     1.4                                       pEp_identity** ret_ident,
     1.5                                       bool is_priv) {
     1.6      PEP_STATUS status = read_file_and_import_key(session,key_fname);
     1.7 -    if (status != PEP_STATUS_OK)
     1.8 +    if (status != PEP_KEY_IMPORTED)
     1.9          return status;
    1.10 +    else
    1.11 +        status = PEP_STATUS_OK;
    1.12      
    1.13      pEp_identity* ident = new_identity(address, fpr, user_id, username);
    1.14      if (is_priv && fpr) {
    1.15 @@ -380,7 +382,7 @@
    1.16  
    1.17  bool slurp_and_import_key(PEP_SESSION session, const char* key_filename) {
    1.18      std::string keyfile = slurp(key_filename);
    1.19 -    if (import_key(session, keyfile.c_str(), keyfile.size(), NULL) != PEP_STATUS_OK)
    1.20 +    if (import_key(session, keyfile.c_str(), keyfile.size(), NULL) != PEP_KEY_IMPORTED)
    1.21          return false;
    1.22      return true;
    1.23  }
    1.24 @@ -414,4 +416,3 @@
    1.25      
    1.26      return retval;
    1.27  }
    1.28 -