Merged in default sync
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Wed, 06 Feb 2019 19:25:40 +0100
branchsync
changeset 3281676ee202da9b
parent 3280 33ba8a4e6bfe
parent 3279 011d5b2f231f
child 3282 92ec8ba7bc3c
child 3285 d5f06cdeddb7
child 3291 a55b3189d84b
child 3292 673b8c6da681
Merged in default
src/message_api.c
test/Makefile
test/src/EngineTestSuite.cc
test/src/engine_tests/BlacklistTests.cc
test/src/engine_tests/CheckRenewedExpiredKeyTrustStatusTests.cc
test/src/engine_tests/LeastCommonDenomColorTests.cc
test/src/engine_tests/MessageTwoPointOhTests.cc
test/src/engine_tests/SequenceTests.cc
test/src/engine_tests/TrustManipulationTests.cc
test/src/engine_tests/UserIdCollisionTests.cc
test/src/util/test_util.cc
     1.1 --- a/src/message_api.c	Wed Feb 06 19:12:47 2019 +0100
     1.2 +++ b/src/message_api.c	Wed Feb 06 19:25:40 2019 +0100
     1.3 @@ -10,6 +10,7 @@
     1.4  #include "baseprotocol.h"
     1.5  #include "KeySync_fsm.h"
     1.6  #include "base64.h"
     1.7 +#include "resource_id.h"
     1.8  
     1.9  #include <assert.h>
    1.10  #include <string.h>
    1.11 @@ -267,14 +268,6 @@
    1.12          return uri + 3;
    1.13  }
    1.14  
    1.15 -// static bool is_file_uri(char* str) {
    1.16 -//     return(strncmp(str, "file://", 7) == 0);
    1.17 -// }
    1.18 -
    1.19 -static bool is_cid_uri(const char* str) {
    1.20 -    return(strncmp(str, "cid://", 6) == 0);
    1.21 -}
    1.22 -
    1.23  static bool string_equality(const char *s1, const char *s2)
    1.24  {
    1.25      if (s1 == NULL || s2 == NULL)
    1.26 @@ -2846,6 +2839,15 @@
    1.27                                          
    1.28              free_stringlist(_keylist);
    1.29  
    1.30 +            char* filename_uri = NULL;
    1.31 +
    1.32 +            bool has_uri_prefix = (pgp_filename ? (is_file_uri(pgp_filename) || is_cid_uri(pgp_filename)) :
    1.33 +                                                  (_s->filename ? (is_file_uri(_s->filename) || is_cid_uri(_s->filename)) :
    1.34 +                                                                  false
    1.35 +                                                  )
    1.36 +                                  );
    1.37 +            
    1.38 +
    1.39              if (ptext) {
    1.40                  if (is_encrypted_html_attachment(_s)) {
    1.41                      msg->longmsg_formatted = ptext;
    1.42 @@ -2854,9 +2856,14 @@
    1.43                  else {
    1.44                      static const char * const mime_type = "application/octet-stream";                    
    1.45                      if (pgp_filename) {
    1.46 +                        if (!has_uri_prefix)
    1.47 +                            filename_uri = build_uri("file", pgp_filename);
    1.48 +
    1.49                          _m = bloblist_add(_m, ptext, psize, mime_type,
    1.50 -                             pgp_filename);
    1.51 -                        free(pgp_filename);                        
    1.52 +                             (filename_uri ? filename_uri : pgp_filename));
    1.53 +
    1.54 +                        free(pgp_filename);
    1.55 +                        free(filename_uri);
    1.56                          if (_m == NULL)
    1.57                              return PEP_OUT_OF_MEMORY;
    1.58                      }
    1.59 @@ -2866,9 +2873,13 @@
    1.60                          if (filename == NULL)
    1.61                              return PEP_OUT_OF_MEMORY;
    1.62  
    1.63 +                        if (!has_uri_prefix)
    1.64 +                            filename_uri = build_uri("file", filename);
    1.65 +
    1.66                          _m = bloblist_add(_m, ptext, psize, mime_type,
    1.67 -                            filename);
    1.68 +                             (filename_uri ? filename_uri : filename));
    1.69                          free(filename);
    1.70 +                        free(filename_uri);
    1.71                          if (_m == NULL)
    1.72                              return PEP_OUT_OF_MEMORY;
    1.73                      }
    1.74 @@ -2884,7 +2895,12 @@
    1.75                  if (copy == NULL)
    1.76                      return PEP_OUT_OF_MEMORY;
    1.77                  memcpy(copy, _s->value, _s->size);
    1.78 -                _m = bloblist_add(_m, copy, _s->size, _s->mime_type, _s->filename);
    1.79 +
    1.80 +                if (!has_uri_prefix && _s->filename)
    1.81 +                    filename_uri = build_uri("file", _s->filename);
    1.82 +
    1.83 +                _m = bloblist_add(_m, copy, _s->size, _s->mime_type, 
    1.84 +                        (filename_uri ? filename_uri : _s->filename));
    1.85                  if (_m == NULL)
    1.86                      return PEP_OUT_OF_MEMORY;
    1.87              }
    1.88 @@ -2895,7 +2911,13 @@
    1.89              if (copy == NULL)
    1.90                  return PEP_OUT_OF_MEMORY;
    1.91              memcpy(copy, _s->value, _s->size);
    1.92 -            _m = bloblist_add(_m, copy, _s->size, _s->mime_type, _s->filename);
    1.93 +
    1.94 +            char* filename_uri = NULL;
    1.95 +
    1.96 +            _m = bloblist_add(_m, copy, _s->size, _s->mime_type, 
    1.97 +                    ((_s->filename && !(is_file_uri(_s->filename) || is_cid_uri(_s->filename))) ?
    1.98 +                         (filename_uri = build_uri("file", _s->filename)) : _s->filename));
    1.99 +            free(filename_uri);
   1.100              if (_m == NULL)
   1.101                  return PEP_OUT_OF_MEMORY;
   1.102          }
     2.1 --- a/test/Makefile	Wed Feb 06 19:12:47 2019 +0100
     2.2 +++ b/test/Makefile	Wed Feb 06 19:25:40 2019 +0100
     2.3 @@ -21,7 +21,6 @@
     2.4  INC_FLAGS := $(addprefix -I,$(INC_DIRS)) $(GPGME_INC) $(CPPUNIT_INC)
     2.5  
     2.6  LDFLAGS += -L/usr/local/lib
     2.7 -
     2.8  CFLAGS += -Wno-deprecated
     2.9  CXXFLAGS += -Wno-deprecated
    2.10  CFLAGS:=$(filter-out -Wall,$(CFLAGS))
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/test/include/TestConstants.h	Wed Feb 06 19:25:40 2019 +0100
     3.3 @@ -0,0 +1,12 @@
     3.4 +#ifndef TEST_CONSTANTS_H
     3.5 +#define TEST_CONSTANTS_H
     3.6 +
     3.7 +#ifndef USE_NETPGP
     3.8 +#define PEP_TEST_KEY_IMPORT_SUCCESS PEP_KEY_IMPORTED
     3.9 +#define PEP_TEST_NO_KEY_IMPORT PEP_NO_KEY_IMPORTED
    3.10 +#else
    3.11 +#define PEP_TEST_KEY_IMPORT_SUCCESS PEP_KEY_IMPORT_STATUS_UNKNOWN
    3.12 +#define PEP_TEST_NO_KEY_IMPORT PEP_KEY_IMPORT_STATUS_UNKNOWN
    3.13 +#endif
    3.14 +
    3.15 +#endif
     4.1 --- a/test/src/EngineTestIndividualSuite.cc	Wed Feb 06 19:12:47 2019 +0100
     4.2 +++ b/test/src/EngineTestIndividualSuite.cc	Wed Feb 06 19:25:40 2019 +0100
     4.3 @@ -1,3 +1,4 @@
     4.4 +#include "TestConstants.h"
     4.5  #include <cpptest.h>
     4.6  #include <cpptest-suite.h>
     4.7  #include <cpptest-textoutput.h>
     4.8 @@ -27,4 +28,4 @@
     4.9  void EngineTestIndividualSuite::tear_down() {
    4.10      restore_full_env();
    4.11      EngineTestSuite::tear_down();
    4.12 -}
    4.13 \ No newline at end of file
    4.14 +}
     5.1 --- a/test/src/EngineTestSessionSuite.cc	Wed Feb 06 19:12:47 2019 +0100
     5.2 +++ b/test/src/EngineTestSessionSuite.cc	Wed Feb 06 19:25:40 2019 +0100
     5.3 @@ -1,4 +1,5 @@
     5.4  #include <cpptest.h>
     5.5 +#include "TestConstants.h"
     5.6  #include <cpptest-suite.h>
     5.7  #include <cpptest-textoutput.h>
     5.8  #include <stdlib.h>
     6.1 --- a/test/src/EngineTestSuite.cc	Wed Feb 06 19:12:47 2019 +0100
     6.2 +++ b/test/src/EngineTestSuite.cc	Wed Feb 06 19:25:40 2019 +0100
     6.3 @@ -20,6 +20,7 @@
     6.4  #include "EngineTestSuite.h"
     6.5  #include "pEpTestStatic.h"
     6.6  #include <algorithm>
     6.7 +#include "TestConstants.h"
     6.8  
     6.9  using namespace std;
    6.10  
     7.1 --- a/test/src/TestDriver.cc	Wed Feb 06 19:12:47 2019 +0100
     7.2 +++ b/test/src/TestDriver.cc	Wed Feb 06 19:25:40 2019 +0100
     7.3 @@ -3,6 +3,7 @@
     7.4  #include <cpptest-suite.h>
     7.5  #include <cpptest-output.h>
     7.6  #include "pEpTestOutput.h"
     7.7 +#include "TestConstants.h"
     7.8  
     7.9  #include <string>
    7.10  #include <vector>
     8.1 --- a/test/src/engine_tests/AppleMailTests.cc	Wed Feb 06 19:12:47 2019 +0100
     8.2 +++ b/test/src/engine_tests/AppleMailTests.cc	Wed Feb 06 19:25:40 2019 +0100
     8.3 @@ -18,6 +18,7 @@
     8.4  #include "message_api.h"
     8.5  #include "mime.h"
     8.6  #include "test_util.h" // for slurp()
     8.7 +#include "TestConstants.h"
     8.8  
     8.9  #include "EngineTestSuite.h"
    8.10  #include "EngineTestIndividualSuite.h"
     9.1 --- a/test/src/engine_tests/BCCTests.cc	Wed Feb 06 19:12:47 2019 +0100
     9.2 +++ b/test/src/engine_tests/BCCTests.cc	Wed Feb 06 19:25:40 2019 +0100
     9.3 @@ -8,6 +8,7 @@
     9.4  
     9.5  #include "pEpEngine.h"
     9.6  #include "message_api.h"
     9.7 +#include "TestConstants.h"
     9.8  
     9.9  #include <cpptest.h>
    9.10  #include "test_util.h"
    9.11 @@ -26,18 +27,18 @@
    9.12      EngineTestIndividualSuite::setup();
    9.13      string keystr = slurp("test_keys/priv/bcc_test_dude_0-0x1CCCFC41_priv.asc");
    9.14      PEP_STATUS status = import_key(session, keystr.c_str(), keystr.size(), NULL);
    9.15 -    assert(status == PEP_KEY_IMPORTED);    
    9.16 +    assert(status == PEP_TEST_KEY_IMPORT_SUCCESS);    
    9.17      pEp_identity * me = new_identity("bcc_test_dude_0@darthmama.cool", "0AE9AA3E320595CF93296BDFA155AC491CCCFC41", PEP_OWN_USERID, "BCC Test Sender");    
    9.18      status = set_own_key(session, me, "0AE9AA3E320595CF93296BDFA155AC491CCCFC41");
    9.19      keystr = slurp("test_keys/pub/bcc_test_dude_0-0x1CCCFC41_pub.asc");
    9.20      status = import_key(session, keystr.c_str(), keystr.size(), NULL);
    9.21 -    assert(status == PEP_KEY_IMPORTED);
    9.22 +    assert(status == PEP_TEST_KEY_IMPORT_SUCCESS);
    9.23      keystr = slurp("test_keys/pub/bcc_test_dude_1-0xDAC746BE_pub.asc");
    9.24      status = import_key(session, keystr.c_str(), keystr.size(), NULL);
    9.25 -    assert(status == PEP_KEY_IMPORTED);
    9.26 +    assert(status == PEP_TEST_KEY_IMPORT_SUCCESS);
    9.27      keystr = slurp("test_keys/pub/bcc_test_dude_2-0x53CECCF7_pub.asc");
    9.28      status = import_key(session, keystr.c_str(), keystr.size(), NULL);
    9.29 -    assert(status == PEP_KEY_IMPORTED);    
    9.30 +    assert(status == PEP_TEST_KEY_IMPORT_SUCCESS);    
    9.31  }
    9.32  
    9.33  void BCCTests::check_single_BCC() {
    10.1 --- a/test/src/engine_tests/BlacklistAcceptNewKeyTests.cc	Wed Feb 06 19:12:47 2019 +0100
    10.2 +++ b/test/src/engine_tests/BlacklistAcceptNewKeyTests.cc	Wed Feb 06 19:25:40 2019 +0100
    10.3 @@ -7,6 +7,7 @@
    10.4  #include <cpptest.h>
    10.5  
    10.6  #include "test_util.h"
    10.7 +#include "TestConstants.h"
    10.8  
    10.9  #include "pEpEngine.h"
   10.10  #include "blacklist.h"
    11.1 --- a/test/src/engine_tests/BlacklistTests.cc	Wed Feb 06 19:12:47 2019 +0100
    11.2 +++ b/test/src/engine_tests/BlacklistTests.cc	Wed Feb 06 19:25:40 2019 +0100
    11.3 @@ -27,6 +27,7 @@
    11.4  #include "blacklist.h"
    11.5  #include "keymanagement.h"
    11.6  #include "test_util.h"
    11.7 +#include "TestConstants.h"
    11.8  
    11.9  #include "EngineTestSessionSuite.h"
   11.10  #include "BlacklistTests.h"
    12.1 --- a/test/src/engine_tests/BloblistTests.cc	Wed Feb 06 19:12:47 2019 +0100
    12.2 +++ b/test/src/engine_tests/BloblistTests.cc	Wed Feb 06 19:25:40 2019 +0100
    12.3 @@ -9,6 +9,7 @@
    12.4  #include <assert.h>
    12.5  
    12.6  #include "bloblist.h"
    12.7 +#include "TestConstants.h"
    12.8  
    12.9  #include "EngineTestSuite.h"
   12.10  #include "BloblistTests.h"
    13.1 --- a/test/src/engine_tests/CaseAndDotAddressTests.cc	Wed Feb 06 19:12:47 2019 +0100
    13.2 +++ b/test/src/engine_tests/CaseAndDotAddressTests.cc	Wed Feb 06 19:25:40 2019 +0100
    13.3 @@ -10,6 +10,7 @@
    13.4  #include "mime.h"
    13.5  #include "message_api.h"
    13.6  #include "test_util.h"
    13.7 +#include "TestConstants.h"
    13.8  
    13.9  #include "EngineTestSuite.h"
   13.10  #include "EngineTestSessionSuite.h"
   13.11 @@ -36,7 +37,7 @@
   13.12      const char* alice_email_case_and_dot = "PE.p.teS.t.ALICE@pep-project.OrG";
   13.13  
   13.14      PEP_STATUS statuspub = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL);
   13.15 -    TEST_ASSERT_MSG((statuspub == PEP_KEY_IMPORTED), "statuspub == PEP_STATUS_OK");
   13.16 +    TEST_ASSERT_MSG((statuspub == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspub == PEP_STATUS_OK");
   13.17  
   13.18      pEp_identity * alice_id = new_identity("pep.test.alice@pep-project.org", "4ABE3AAF59AC32CFE4F86500A9411D176FF00E97", user_id, "Alice Test");
   13.19  
    14.1 --- a/test/src/engine_tests/CheckRenewedExpiredKeyTrustStatusTests.cc	Wed Feb 06 19:12:47 2019 +0100
    14.2 +++ b/test/src/engine_tests/CheckRenewedExpiredKeyTrustStatusTests.cc	Wed Feb 06 19:25:40 2019 +0100
    14.3 @@ -1,6 +1,7 @@
    14.4  // This file is under GNU General Public License 3.0
    14.5  // see LICENSE.txt
    14.6  
    14.7 +#include "TestConstants.h"
    14.8  #include <stdlib.h>
    14.9  #include <string>
   14.10  #include <cstring>
    15.1 --- a/test/src/engine_tests/CrashdumpTests.cc	Wed Feb 06 19:12:47 2019 +0100
    15.2 +++ b/test/src/engine_tests/CrashdumpTests.cc	Wed Feb 06 19:25:40 2019 +0100
    15.3 @@ -1,6 +1,7 @@
    15.4  // This file is under GNU General Public License 3.0
    15.5  // see LICENSE.txt
    15.6  
    15.7 +#include "TestConstants.h"
    15.8  #include <stdlib.h>
    15.9  #include <string>
   15.10  
    16.1 --- a/test/src/engine_tests/DecorateTests.cc	Wed Feb 06 19:12:47 2019 +0100
    16.2 +++ b/test/src/engine_tests/DecorateTests.cc	Wed Feb 06 19:25:40 2019 +0100
    16.3 @@ -1,6 +1,7 @@
    16.4  // This file is under GNU General Public License 3.0
    16.5  // see LICENSE.txt
    16.6  
    16.7 +#include "TestConstants.h"
    16.8  #include <cpptest.h>
    16.9  #include <cpptest-suite.h>
   16.10  #include <cpptest-textoutput.h>
   16.11 @@ -35,9 +36,9 @@
   16.12      PEP_STATUS statuspub = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL);
   16.13      PEP_STATUS statuspriv = import_key(session, alice_priv_key.c_str(), alice_priv_key.length(), NULL);
   16.14      PEP_STATUS statusbob = import_key(session, bob_pub_key.c_str(), bob_pub_key.length(), NULL);
   16.15 -    TEST_ASSERT_MSG((statuspub == PEP_KEY_IMPORTED), "statuspub == PEP_STATUS_OK");
   16.16 -    TEST_ASSERT_MSG((statuspriv == PEP_KEY_IMPORTED), "statuspriv == PEP_STATUS_OK");
   16.17 -    TEST_ASSERT_MSG((statusbob == PEP_KEY_IMPORTED), "statusbob == PEP_STATUS_OK");
   16.18 +    TEST_ASSERT_MSG((statuspub == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspub == PEP_STATUS_OK");
   16.19 +    TEST_ASSERT_MSG((statuspriv == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspriv == PEP_STATUS_OK");
   16.20 +    TEST_ASSERT_MSG((statusbob == PEP_TEST_KEY_IMPORT_SUCCESS), "statusbob == PEP_STATUS_OK");
   16.21  
   16.22      cout << "creating message…\n";
   16.23      pEp_identity* alice = new_identity("pep.test.alice@pep-project.org", NULL, PEP_OWN_USERID, "Alice Test");
    17.1 --- a/test/src/engine_tests/DecryptAttachPrivateKeyTrustedTests.cc	Wed Feb 06 19:12:47 2019 +0100
    17.2 +++ b/test/src/engine_tests/DecryptAttachPrivateKeyTrustedTests.cc	Wed Feb 06 19:25:40 2019 +0100
    17.3 @@ -3,6 +3,7 @@
    17.4  
    17.5  // FIXME: the private key tests should be combined
    17.6  
    17.7 +#include "TestConstants.h"
    17.8  #include <stdlib.h>
    17.9  #include <string>
   17.10  #include <cstring>
   17.11 @@ -45,11 +46,11 @@
   17.12      // 13A9F97964A2B52520CAA40E51BCA783C065A213    
   17.13      input_key = slurp("test_keys/pub/priv-key-import-test-main_0-0xC065A213_pub.asc");
   17.14      status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   17.15 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), tl_status_string(status));
   17.16 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), tl_status_string(status));
   17.17  
   17.18      input_key = slurp("test_keys/priv/priv-key-import-test-main_0-0xC065A213_priv.asc");
   17.19      status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   17.20 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), tl_status_string(status));
   17.21 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), tl_status_string(status));
   17.22  
   17.23      // ensure there's no private key - doesn't work in automated tests, sadly. Uncommon when running script manually.
   17.24      bool has_priv = false;
   17.25 @@ -58,7 +59,7 @@
   17.26      // 8AB616A3BD51DEF714B5E688EFFB540C3276D2E5
   17.27      input_key = slurp("test_keys/pub/priv-key-import-test-main_0-0x3276D2E5_pub.asc");
   17.28      status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   17.29 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), tl_status_string(status));
   17.30 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), tl_status_string(status));
   17.31  
   17.32      
   17.33      cout << "Setting up own identity with default key " << fpr_main_me << endl;
    18.1 --- a/test/src/engine_tests/DecryptAttachPrivateKeyUntrustedTests.cc	Wed Feb 06 19:12:47 2019 +0100
    18.2 +++ b/test/src/engine_tests/DecryptAttachPrivateKeyUntrustedTests.cc	Wed Feb 06 19:25:40 2019 +0100
    18.3 @@ -2,6 +2,7 @@
    18.4  // see LICENSE.txt
    18.5  
    18.6  #include <stdlib.h>
    18.7 +#include "TestConstants.h"
    18.8  #include <string>
    18.9  #include <cstring>
   18.10  #include <cpptest.h>
   18.11 @@ -44,11 +45,11 @@
   18.12      // 13A9F97964A2B52520CAA40E51BCA783C065A213    
   18.13      input_key = slurp("test_keys/pub/priv-key-import-test-main_0-0xC065A213_pub.asc");
   18.14      status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   18.15 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), "status == PEP_STATUS_OK");
   18.16 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), "status == PEP_STATUS_OK");
   18.17  
   18.18      input_key = slurp("test_keys/priv/priv-key-import-test-main_0-0xC065A213_priv.asc");
   18.19      status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   18.20 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), "status == PEP_STATUS_OK");
   18.21 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), "status == PEP_STATUS_OK");
   18.22  
   18.23      // ensure there's no private key - doesn't work in automated tests, sadly. Uncommon when running script manually.
   18.24      bool has_priv = false;
   18.25 @@ -64,7 +65,7 @@
   18.26      // 8AB616A3BD51DEF714B5E688EFFB540C3276D2E5
   18.27      input_key = slurp("test_keys/pub/priv-key-import-test-main_0-0x3276D2E5_pub.asc");
   18.28      status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   18.29 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), "status == PEP_STATUS_OK");
   18.30 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), "status == PEP_STATUS_OK");
   18.31  
   18.32      
   18.33      cout << "Setting up own identity with default key " << fpr_main_me << endl;
    19.1 --- a/test/src/engine_tests/EncryptAttachPrivateKeyTests.cc	Wed Feb 06 19:12:47 2019 +0100
    19.2 +++ b/test/src/engine_tests/EncryptAttachPrivateKeyTests.cc	Wed Feb 06 19:25:40 2019 +0100
    19.3 @@ -2,6 +2,7 @@
    19.4  // see LICENSE.txt
    19.5  
    19.6  #include <stdlib.h>
    19.7 +#include "TestConstants.h"
    19.8  #include <string>
    19.9  #include <cstring>
   19.10  #include <cpptest.h>
   19.11 @@ -56,35 +57,35 @@
   19.12      // 8AB616A3BD51DEF714B5E688EFFB540C3276D2E5
   19.13      input_key = slurp("test_keys/pub/priv-key-import-test-main_0-0x3276D2E5_pub.asc");
   19.14      status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   19.15 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), tl_status_string(status));
   19.16 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), tl_status_string(status));
   19.17  
   19.18      input_key = slurp("test_keys/priv/priv-key-import-test-main_0-0x3276D2E5_priv.asc");
   19.19      status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   19.20 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), tl_status_string(status));
   19.21 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), tl_status_string(status));
   19.22          
   19.23      // key with same address and user_id (initially untrusted, then trusted)
   19.24      // 359DD8AC87D1F5E4304D08338D7185F180C8CD87
   19.25      input_key = slurp("test_keys/pub/priv-key-import-test-main_1-0x80C8CD87_pub.asc");
   19.26      status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   19.27 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), tl_status_string(status));
   19.28 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), tl_status_string(status));
   19.29  
   19.30      // key with same address and to have different (non-aliased) user_id (initially untrusted, then trusted)
   19.31      // B044B83639E292283A3F6E14C2E64B520B74809C
   19.32      input_key = slurp("test_keys/pub/priv-key-import-test-main_2-0x0B74809C_pub.asc");
   19.33      status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   19.34 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), tl_status_string(status));
   19.35 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), tl_status_string(status));
   19.36  
   19.37      // key with different address to have same user_id (initially untrusted, then trusted)
   19.38      // C52911EBA0D34B0F549594A15A7A363BD11252C9
   19.39      input_key = slurp("test_keys/pub/priv-key-import-test-other_0-0xD11252C9_pub.asc");
   19.40      status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   19.41 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), tl_status_string(status));
   19.42 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), tl_status_string(status));
   19.43          
   19.44      // key with different address to have different user_id (initially untrusted, then trusted)
   19.45      // 567212EFB8A3A76B1D32B9565F45BEA9C785F20A
   19.46      input_key = slurp("test_keys/pub/priv-key-import-test-other_1-0xC785F20A_pub.asc");
   19.47      status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   19.48 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), tl_status_string(status));
   19.49 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), tl_status_string(status));
   19.50      cout << "Done!" << endl << endl;
   19.51      
   19.52      cout << "Setting up own identity with default key " << fpr_main_me << endl;
    20.1 --- a/test/src/engine_tests/EncryptForIdentityTests.cc	Wed Feb 06 19:12:47 2019 +0100
    20.2 +++ b/test/src/engine_tests/EncryptForIdentityTests.cc	Wed Feb 06 19:25:40 2019 +0100
    20.3 @@ -2,6 +2,7 @@
    20.4  // see LICENSE.txt
    20.5  
    20.6  #include <stdlib.h>
    20.7 +#include "TestConstants.h"
    20.8  #include <unistd.h>
    20.9  #include <string>
   20.10  #include <cstring>
   20.11 @@ -37,13 +38,13 @@
   20.12  
   20.13      PEP_STATUS statuspub = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL);
   20.14      PEP_STATUS statuspriv = import_key(session, alice_priv_key.c_str(), alice_priv_key.length(), NULL);
   20.15 -    TEST_ASSERT_MSG((statuspub == PEP_KEY_IMPORTED), "statuspub == PEP_STATUS_OK");
   20.16 -    TEST_ASSERT_MSG((statuspriv == PEP_KEY_IMPORTED), "statuspriv == PEP_STATUS_OK");
   20.17 +    TEST_ASSERT_MSG((statuspub == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspub == PEP_STATUS_OK");
   20.18 +    TEST_ASSERT_MSG((statuspriv == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspriv == PEP_STATUS_OK");
   20.19      
   20.20      statuspub = import_key(session, gabrielle_pub_key.c_str(), gabrielle_pub_key.length(), NULL);
   20.21 -    TEST_ASSERT_MSG((statuspub == PEP_KEY_IMPORTED), "statuspub == PEP_STATUS_OK");
   20.22 +    TEST_ASSERT_MSG((statuspub == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspub == PEP_STATUS_OK");
   20.23      statuspub = import_key(session, bella_pub_key.c_str(), bella_pub_key.length(), NULL);
   20.24 -    TEST_ASSERT_MSG((statuspub == PEP_KEY_IMPORTED), "statuspub == PEP_STATUS_OK");
   20.25 +    TEST_ASSERT_MSG((statuspub == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspub == PEP_STATUS_OK");
   20.26  
   20.27      const char* alice_fpr = "4ABE3AAF59AC32CFE4F86500A9411D176FF00E97";
   20.28      const char* gabrielle_fpr = "906C9B8349954E82C5623C3C8C541BD4E203586C";
    21.1 --- a/test/src/engine_tests/EncryptMissingPrivateKeyTests.cc	Wed Feb 06 19:12:47 2019 +0100
    21.2 +++ b/test/src/engine_tests/EncryptMissingPrivateKeyTests.cc	Wed Feb 06 19:25:40 2019 +0100
    21.3 @@ -1,6 +1,7 @@
    21.4  // This file is under GNU General Public License 3.0
    21.5  // see LICENSE.txt
    21.6  
    21.7 +#include "TestConstants.h"
    21.8  #include <stdlib.h>
    21.9  #include <iostream>
   21.10  #include <fstream>
   21.11 @@ -34,7 +35,7 @@
   21.12      EngineTestSessionSuite::setup();
   21.13      string recip_key = slurp("test_keys/pub/pep-test-bob-0xC9C2EE39_pub.asc");
   21.14      PEP_STATUS status = import_key(session, recip_key.c_str(), recip_key.size(), NULL);
   21.15 -    assert(status == PEP_KEY_IMPORTED);
   21.16 +    assert(status == PEP_TEST_KEY_IMPORT_SUCCESS);
   21.17  }
   21.18  
   21.19  void EncryptMissingPrivateKeyTests::check_encrypt_missing_private_key() {
    22.1 --- a/test/src/engine_tests/Engine358Tests.cc	Wed Feb 06 19:12:47 2019 +0100
    22.2 +++ b/test/src/engine_tests/Engine358Tests.cc	Wed Feb 06 19:25:40 2019 +0100
    22.3 @@ -1,6 +1,7 @@
    22.4  // This file is under GNU General Public License 3.0
    22.5  // see LICENSE.txt
    22.6  
    22.7 +#include "TestConstants.h"
    22.8  #include <stdlib.h>
    22.9  #include <string>
   22.10  #include <cstring>
    23.1 --- a/test/src/engine_tests/Engine463Tests.cc	Wed Feb 06 19:12:47 2019 +0100
    23.2 +++ b/test/src/engine_tests/Engine463Tests.cc	Wed Feb 06 19:25:40 2019 +0100
    23.3 @@ -1,6 +1,7 @@
    23.4  // This file is under GNU General Public License 3.0
    23.5  // see LICENSE.txt
    23.6  
    23.7 +#include "TestConstants.h"
    23.8  #include <stdlib.h>
    23.9  #include <string>
   23.10  
   23.11 @@ -31,9 +32,9 @@
   23.12      const string fake_schleuder_key = slurp("test_keys/pub/fake-schleuder.asc");
   23.13      
   23.14      PEP_STATUS status = import_key(session, claudio_keys.c_str(), claudio_keys.length(), NULL);
   23.15 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), tl_status_string(status));    
   23.16 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), tl_status_string(status));    
   23.17      status = import_key(session, fake_schleuder_key.c_str(), fake_schleuder_key.length(), NULL);
   23.18 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), tl_status_string(status));    
   23.19 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), tl_status_string(status));    
   23.20  
   23.21      // Ok, bring in message, decrypt, and see what happens.
   23.22      const string msg = slurp("test_mails/notfound-alt.msg");
   23.23 @@ -54,9 +55,9 @@
   23.24      const string fake_schleuder_key = slurp("test_keys/pub/fake-schleuder.asc");
   23.25      
   23.26      PEP_STATUS status = import_key(session, claudio_keys.c_str(), claudio_keys.length(), NULL);
   23.27 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), tl_status_string(status));    
   23.28 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), tl_status_string(status));    
   23.29      status = import_key(session, fake_schleuder_key.c_str(), fake_schleuder_key.length(), NULL);
   23.30 -    TEST_ASSERT_MSG((status == PEP_KEY_IMPORTED), tl_status_string(status));    
   23.31 +    TEST_ASSERT_MSG((status == PEP_TEST_KEY_IMPORT_SUCCESS), tl_status_string(status));    
   23.32  
   23.33      pEp_identity* own_ident = new_identity("claudio+engine-463@pep.foundation", "A039BC60E43E0DFDDC9DE8663B48C38325210C88", PEP_OWN_USERID, "Not Actually Claudio");
   23.34      status = set_own_key(session, own_ident, "A039BC60E43E0DFDDC9DE8663B48C38325210C88");
    24.1 --- a/test/src/engine_tests/ExpiredSubkeyTests.cc	Wed Feb 06 19:12:47 2019 +0100
    24.2 +++ b/test/src/engine_tests/ExpiredSubkeyTests.cc	Wed Feb 06 19:25:40 2019 +0100
    24.3 @@ -1,6 +1,7 @@
    24.4  // This file is under GNU General Public License 3.0
    24.5  // see LICENSE.txt
    24.6  
    24.7 +#include "TestConstants.h"
    24.8  #include <stdlib.h>
    24.9  #include <string>
   24.10  #include <cpptest.h>
    25.1 --- a/test/src/engine_tests/ExternalRevokeTests.cc	Wed Feb 06 19:12:47 2019 +0100
    25.2 +++ b/test/src/engine_tests/ExternalRevokeTests.cc	Wed Feb 06 19:25:40 2019 +0100
    25.3 @@ -1,6 +1,7 @@
    25.4  // This file is under GNU General Public License 3.0
    25.5  // see LICENSE.txt
    25.6  
    25.7 +#include "TestConstants.h"
    25.8  #include <stdlib.h>
    25.9  #include <string>
   25.10  #include <cstring>
   25.11 @@ -41,8 +42,8 @@
   25.12      
   25.13      PEP_STATUS statuspub = import_key(session, fenris_pub_key.c_str(), fenris_pub_key.length(), NULL);
   25.14      PEP_STATUS statuspriv = import_key(session, fenris_priv_key.c_str(), fenris_priv_key.length(), NULL);
   25.15 -    TEST_ASSERT_MSG((statuspub == PEP_KEY_IMPORTED), "statuspub == PEP_STATUS_OK");
   25.16 -    TEST_ASSERT_MSG((statuspriv == PEP_KEY_IMPORTED), "statuspriv == PEP_STATUS_OK");
   25.17 +    TEST_ASSERT_MSG((statuspub == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspub == PEP_STATUS_OK");
   25.18 +    TEST_ASSERT_MSG((statuspriv == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspriv == PEP_STATUS_OK");
   25.19  
   25.20      // Create sender ID
   25.21      
    26.1 --- a/test/src/engine_tests/HeaderKeyImportTests.cc	Wed Feb 06 19:12:47 2019 +0100
    26.2 +++ b/test/src/engine_tests/HeaderKeyImportTests.cc	Wed Feb 06 19:25:40 2019 +0100
    26.3 @@ -1,6 +1,7 @@
    26.4  // This file is under GNU General Public License 3.0
    26.5  // see LICENSE.txt
    26.6  
    26.7 +#include "TestConstants.h"
    26.8  #include <stdlib.h>
    26.9  #include <string>
   26.10  #include <cstring>
    27.1 --- a/test/src/engine_tests/I18nTests.cc	Wed Feb 06 19:12:47 2019 +0100
    27.2 +++ b/test/src/engine_tests/I18nTests.cc	Wed Feb 06 19:25:40 2019 +0100
    27.3 @@ -1,6 +1,7 @@
    27.4  // This file is under GNU General Public License 3.0
    27.5  // see LICENSE.txt
    27.6  
    27.7 +#include "TestConstants.h"
    27.8  #include <stdlib.h>
    27.9  #include <string>
   27.10  #include <iostream>
    28.1 --- a/test/src/engine_tests/IdentityListTests.cc	Wed Feb 06 19:12:47 2019 +0100
    28.2 +++ b/test/src/engine_tests/IdentityListTests.cc	Wed Feb 06 19:25:40 2019 +0100
    28.3 @@ -1,6 +1,7 @@
    28.4  // This file is under GNU General Public License 3.0
    28.5  // see LICENSE.txt
    28.6  
    28.7 +#include "TestConstants.h"
    28.8  #include <stdlib.h>
    28.9  #include <string>
   28.10  #include <cstring>
    29.1 --- a/test/src/engine_tests/KeyAttachmentTests.cc	Wed Feb 06 19:12:47 2019 +0100
    29.2 +++ b/test/src/engine_tests/KeyAttachmentTests.cc	Wed Feb 06 19:25:40 2019 +0100
    29.3 @@ -1,6 +1,7 @@
    29.4  // This file is under GNU General Public License 3.0
    29.5  // see LICENSE.txt
    29.6  
    29.7 +#include "TestConstants.h"
    29.8  #include <stdlib.h>
    29.9  #include <string>
   29.10  #include <cstring>
   29.11 @@ -105,7 +106,7 @@
   29.12      TEST_ASSERT_MSG(dec_msg->attachments->next == NULL, "Decryption left attachments it should have deleted.");    
   29.13      TEST_ASSERT_MSG(dec_msg->attachments->filename, "Attachment doesn't have a filename");
   29.14      // TODO: is there a missing update to resource IDs in decrypt in parts?
   29.15 -    TEST_ASSERT_MSG(strcmp(dec_msg->attachments->filename, "cheese.txt.gpg") == 0, dec_msg->attachments->filename);    
   29.16 +    TEST_ASSERT_MSG(strcmp(dec_msg->attachments->filename, "file://cheese.txt.gpg") == 0, dec_msg->attachments->filename);    
   29.17      TEST_ASSERT_MSG(dec_msg->attachments->mime_type, "Attachment doesn't have a mime type");
   29.18      TEST_ASSERT_MSG(strcmp(dec_msg->attachments->mime_type, "application/octet-stream") == 0, dec_msg->attachments->mime_type);    
   29.19      free_message(enc_msg);
   29.20 @@ -131,7 +132,7 @@
   29.21      TEST_ASSERT_MSG(dec_msg->attachments->next == NULL, "Decryption left attachments it should have deleted.");    
   29.22      TEST_ASSERT_MSG(dec_msg->attachments->filename, "Attachment doesn't have a filename");
   29.23      // TODO: is there a missing update to resource IDs in decrypt in parts?
   29.24 -    TEST_ASSERT_MSG(strcmp(dec_msg->attachments->filename, "cheese.txt.gpg") == 0, dec_msg->attachments->filename);    
   29.25 +    TEST_ASSERT_MSG(strcmp(dec_msg->attachments->filename, "file://cheese.txt.gpg") == 0, dec_msg->attachments->filename);    
   29.26      TEST_ASSERT_MSG(dec_msg->attachments->mime_type, "Attachment doesn't have a mime type");
   29.27      TEST_ASSERT_MSG(strcmp(dec_msg->attachments->mime_type, "application/octet-stream") == 0, dec_msg->attachments->mime_type);    
   29.28      free_message(enc_msg);
   29.29 @@ -157,7 +158,7 @@
   29.30      TEST_ASSERT_MSG(dec_msg->attachments->next == NULL, "Decryption left attachments it should have deleted.");    
   29.31      TEST_ASSERT_MSG(dec_msg->attachments->filename, "Attachment doesn't have a filename");
   29.32      // TODO: is there a missing update to resource IDs in decrypt in parts?
   29.33 -    TEST_ASSERT_MSG(strcmp(dec_msg->attachments->filename, "cheese.txt") == 0, dec_msg->attachments->filename);    
   29.34 +    TEST_ASSERT_MSG(strcmp(dec_msg->attachments->filename, "file://cheese.txt") == 0, dec_msg->attachments->filename);    
   29.35      TEST_ASSERT_MSG(dec_msg->attachments->mime_type, "Attachment doesn't have a mime type");
   29.36      TEST_ASSERT_MSG(strcmp(dec_msg->attachments->mime_type, "application/octet-stream") == 0, dec_msg->attachments->mime_type);    
   29.37      free_message(enc_msg);
   29.38 @@ -183,7 +184,7 @@
   29.39      TEST_ASSERT_MSG(dec_msg->attachments->next == NULL, "Decryption left attachments it should have deleted.");    
   29.40      TEST_ASSERT_MSG(dec_msg->attachments->filename, "Attachment doesn't have a filename");
   29.41      // TODO: is there a missing update to resource IDs in decrypt in parts?
   29.42 -    TEST_ASSERT_MSG(strcmp(dec_msg->attachments->filename, "cheese.txt") == 0, dec_msg->attachments->filename);    
   29.43 +    TEST_ASSERT_MSG(strcmp(dec_msg->attachments->filename, "file://cheese.txt") == 0, dec_msg->attachments->filename);    
   29.44      TEST_ASSERT_MSG(dec_msg->attachments->mime_type, "Attachment doesn't have a mime type");
   29.45      TEST_ASSERT_MSG(strcmp(dec_msg->attachments->mime_type, "application/octet-stream") == 0, dec_msg->attachments->mime_type);    
   29.46      free_message(enc_msg);
   29.47 @@ -233,7 +234,7 @@
   29.48      TEST_ASSERT_MSG(dec_msg->attachments->next == NULL, "Decryption left attachments it should have deleted.");    
   29.49      TEST_ASSERT_MSG(dec_msg->attachments->filename, "Attachment doesn't have a filename");
   29.50      // TODO: is there a missing update to resource IDs in decrypt in parts?
   29.51 -    TEST_ASSERT_MSG(strcmp(dec_msg->attachments->filename, "cheese.txt.gpg") == 0, dec_msg->attachments->filename);    
   29.52 +    TEST_ASSERT_MSG(strcmp(dec_msg->attachments->filename, "file://cheese.txt.gpg") == 0, dec_msg->attachments->filename);    
   29.53      TEST_ASSERT_MSG(dec_msg->attachments->mime_type, "Attachment doesn't have a mime type");
   29.54      TEST_ASSERT_MSG(strcmp(dec_msg->attachments->mime_type, "application/octet-stream") == 0, dec_msg->attachments->mime_type);    
   29.55      free_message(enc_msg);
   29.56 @@ -259,7 +260,7 @@
   29.57      TEST_ASSERT_MSG(dec_msg->attachments->next == NULL, "Decryption left attachments it should have deleted.");    
   29.58      TEST_ASSERT_MSG(dec_msg->attachments->filename, "Attachment doesn't have a filename");
   29.59      // TODO: is there a missing update to resource IDs in decrypt in parts?
   29.60 -    TEST_ASSERT_MSG(strcmp(dec_msg->attachments->filename, "barky.txt") == 0, dec_msg->attachments->filename);    
   29.61 +    TEST_ASSERT_MSG(strcmp(dec_msg->attachments->filename, "file://barky.txt") == 0, dec_msg->attachments->filename);    
   29.62      TEST_ASSERT_MSG(dec_msg->attachments->mime_type, "Attachment doesn't have a mime type");
   29.63      TEST_ASSERT_MSG(strcmp(dec_msg->attachments->mime_type, "application/octet-stream") == 0, dec_msg->attachments->mime_type);    
   29.64      free_message(enc_msg);
   29.65 @@ -290,13 +291,13 @@
   29.66      // pair is filename, mime_type 
   29.67      vector<pair<string,string>> v =
   29.68          {
   29.69 -            {"barky.txt","application/octet-stream"}, 
   29.70 -            {"this_is_not_a_key_or_encrypted.asc","application/octet-stream"},
   29.71 -            {"this_is_not_a_key_or_encrypted.gpg","application/octet-stream"},
   29.72 -            {"CC_BY-SA.txt","application/octet-stream"}, 
   29.73 -            {"Makefile","application/octet-stream"}, 
   29.74 -            {"LICENSE.txt","application/octet-stream"}, 
   29.75 -            {"README.md","application/octet-stream"}, 
   29.76 +            {"file://barky.txt","application/octet-stream"}, 
   29.77 +            {"file://this_is_not_a_key_or_encrypted.asc","application/octet-stream"},
   29.78 +            {"file://this_is_not_a_key_or_encrypted.gpg","application/octet-stream"},
   29.79 +            {"file://CC_BY-SA.txt","application/octet-stream"}, 
   29.80 +            {"file://Makefile","application/octet-stream"}, 
   29.81 +            {"file://LICENSE.txt","application/octet-stream"}, 
   29.82 +            {"file://README.md","application/octet-stream"}, 
   29.83          };
   29.84                               
   29.85      bloblist_t* curr_att = dec_msg->attachments;
    30.1 --- a/test/src/engine_tests/KeyeditTests.cc	Wed Feb 06 19:12:47 2019 +0100
    30.2 +++ b/test/src/engine_tests/KeyeditTests.cc	Wed Feb 06 19:25:40 2019 +0100
    30.3 @@ -1,6 +1,7 @@
    30.4  // This file is under GNU General Public License 3.0
    30.5  // see LICENSE.txt
    30.6  
    30.7 +#include "TestConstants.h"
    30.8  #include <stdlib.h>
    30.9  #include <string>
   30.10  #include <iostream>
    31.1 --- a/test/src/engine_tests/LeastColorGroupTests.cc	Wed Feb 06 19:12:47 2019 +0100
    31.2 +++ b/test/src/engine_tests/LeastColorGroupTests.cc	Wed Feb 06 19:25:40 2019 +0100
    31.3 @@ -2,6 +2,7 @@
    31.4  // see LICENSE.txt
    31.5  
    31.6  #include <stdlib.h>
    31.7 +#include "TestConstants.h"
    31.8  #include <string>
    31.9  #include <iostream>
   31.10  #include <vector>
   31.11 @@ -41,7 +42,7 @@
   31.12          cout << "\t read keyfile \"" << name << "\"..." << std::endl;
   31.13          const string keytextkey = slurp(name);
   31.14          PEP_STATUS statuskey = import_key(session, keytextkey.c_str(), keytextkey.length(), NULL);
   31.15 -        TEST_ASSERT_MSG((statuskey == PEP_KEY_IMPORTED), "statuskey == PEP_STATUS_OK");
   31.16 +        TEST_ASSERT_MSG((statuskey == PEP_TEST_KEY_IMPORT_SUCCESS), "statuskey == PEP_STATUS_OK");
   31.17      }
   31.18      
   31.19      cout << "\t read keyfile mailfile \"" << mailfile << "\"..." << std::endl;
    32.1 --- a/test/src/engine_tests/LeastCommonDenomColorTests.cc	Wed Feb 06 19:12:47 2019 +0100
    32.2 +++ b/test/src/engine_tests/LeastCommonDenomColorTests.cc	Wed Feb 06 19:25:40 2019 +0100
    32.3 @@ -2,6 +2,7 @@
    32.4  // see LICENSE.txt
    32.5  
    32.6  #include <stdlib.h>
    32.7 +#include "TestConstants.h"
    32.8  #include <iostream>
    32.9  #include <fstream>
   32.10  #include <string>
    33.1 --- a/test/src/engine_tests/MapAsn1Tests.cc	Wed Feb 06 19:12:47 2019 +0100
    33.2 +++ b/test/src/engine_tests/MapAsn1Tests.cc	Wed Feb 06 19:25:40 2019 +0100
    33.3 @@ -2,6 +2,7 @@
    33.4  // see LICENSE.txt
    33.5  
    33.6  #include <stdlib.h>
    33.7 +#include "TestConstants.h"
    33.8  #include <iostream>
    33.9  #include <string>
   33.10  #include <cstring>
    34.1 --- a/test/src/engine_tests/MessageApiTests.cc	Wed Feb 06 19:12:47 2019 +0100
    34.2 +++ b/test/src/engine_tests/MessageApiTests.cc	Wed Feb 06 19:25:40 2019 +0100
    34.3 @@ -2,6 +2,7 @@
    34.4  // see LICENSE.txt
    34.5  
    34.6  #include <stdlib.h>
    34.7 +#include "TestConstants.h"
    34.8  #include <string>
    34.9  #include <cstring>
   34.10  #include <iostream>
   34.11 @@ -32,11 +33,11 @@
   34.12      const string bob_pub_key = slurp("test_keys/pub/pep-test-bob-0xC9C2EE39_pub.asc");
   34.13  
   34.14      PEP_STATUS status0 = import_key(session, alice_pub_key.c_str(), alice_pub_key.size(), NULL);
   34.15 -    TEST_ASSERT_MSG((status0 == PEP_KEY_IMPORTED), "status0 == PEP_STATUS_OK");
   34.16 +    TEST_ASSERT_MSG((status0 == PEP_TEST_KEY_IMPORT_SUCCESS), "status0 == PEP_STATUS_OK");
   34.17      status0 = import_key(session, alice_priv_key.c_str(), alice_priv_key.size(), NULL);
   34.18 -    TEST_ASSERT_MSG((status0 == PEP_KEY_IMPORTED), "status0 == PEP_STATUS_OK");
   34.19 +    TEST_ASSERT_MSG((status0 == PEP_TEST_KEY_IMPORT_SUCCESS), "status0 == PEP_STATUS_OK");
   34.20      status0 = import_key(session, bob_pub_key.c_str(), bob_pub_key.size(), NULL);
   34.21 -    TEST_ASSERT_MSG((status0 == PEP_KEY_IMPORTED), "status0 == PEP_STATUS_OK");
   34.22 +    TEST_ASSERT_MSG((status0 == PEP_TEST_KEY_IMPORT_SUCCESS), "status0 == PEP_STATUS_OK");
   34.23      // message_api test code
   34.24  
   34.25      cout << "creating message…\n";
    35.1 --- a/test/src/engine_tests/MessageNullFromTests.cc	Wed Feb 06 19:12:47 2019 +0100
    35.2 +++ b/test/src/engine_tests/MessageNullFromTests.cc	Wed Feb 06 19:25:40 2019 +0100
    35.3 @@ -2,6 +2,7 @@
    35.4  // see LICENSE.txt
    35.5  
    35.6  #include <stdlib.h>
    35.7 +#include "TestConstants.h"
    35.8  #include <string>
    35.9  
   35.10  #include <assert.h>
   35.11 @@ -29,16 +30,16 @@
   35.12  void MessageNullFromTests::import_alice_pub() {
   35.13      const string alice_pub_key = slurp("test_keys/pub/pep-test-alice-0x6FF00E97_pub.asc");
   35.14      PEP_STATUS status = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL);
   35.15 -    assert(status == PEP_KEY_IMPORTED);
   35.16 +    assert(status == PEP_TEST_KEY_IMPORT_SUCCESS);
   35.17  }
   35.18  
   35.19  void MessageNullFromTests::import_bob_pair_and_set_own() {
   35.20      const string bob_pub_key = slurp("test_keys/pub/pep-test-bob-0xC9C2EE39_pub.asc");
   35.21      const string bob_priv_key = slurp("test_keys/priv/pep-test-bob-0xC9C2EE39_priv.asc");
   35.22      PEP_STATUS status = import_key(session, bob_pub_key.c_str(), bob_pub_key.length(), NULL);
   35.23 -    assert(status == PEP_KEY_IMPORTED);
   35.24 +    assert(status == PEP_TEST_KEY_IMPORT_SUCCESS);
   35.25      status = import_key(session, bob_priv_key.c_str(), bob_priv_key.length(), NULL);
   35.26 -    assert(status == PEP_KEY_IMPORTED);
   35.27 +    assert(status == PEP_TEST_KEY_IMPORT_SUCCESS);
   35.28  }
   35.29  
   35.30  void MessageNullFromTests::setup() {
    36.1 --- a/test/src/engine_tests/MessageTwoPointOhTests.cc	Wed Feb 06 19:12:47 2019 +0100
    36.2 +++ b/test/src/engine_tests/MessageTwoPointOhTests.cc	Wed Feb 06 19:25:40 2019 +0100
    36.3 @@ -2,6 +2,7 @@
    36.4  // see LICENSE.txt
    36.5  
    36.6  #include <stdlib.h>
    36.7 +#include "TestConstants.h"
    36.8  #include <string>
    36.9  #include <cstring>
   36.10  #include <iostream>
   36.11 @@ -39,12 +40,12 @@
   36.12  
   36.13      PEP_STATUS statuspub = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL);
   36.14      PEP_STATUS statuspriv = import_key(session, alice_priv_key.c_str(), alice_priv_key.length(), NULL);
   36.15 -    TEST_ASSERT_MSG((statuspub == PEP_KEY_IMPORTED), "statuspub == PEP_STATUS_OK");
   36.16 -    TEST_ASSERT_MSG((statuspriv == PEP_KEY_IMPORTED), "statuspriv == PEP_STATUS_OK");
   36.17 +    TEST_ASSERT_MSG((statuspub == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspub == PEP_STATUS_OK");
   36.18 +    TEST_ASSERT_MSG((statuspriv == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspriv == PEP_STATUS_OK");
   36.19      statuspub = import_key(session, carol_pub_key.c_str(), carol_pub_key.length(), NULL);
   36.20      statuspriv = import_key(session, carol_priv_key.c_str(), carol_priv_key.length(), NULL);
   36.21 -    TEST_ASSERT_MSG((statuspub == PEP_KEY_IMPORTED), "statuspub == PEP_STATUS_OK");
   36.22 -    TEST_ASSERT_MSG((statuspriv == PEP_KEY_IMPORTED), "statuspriv == PEP_STATUS_OK");
   36.23 +    TEST_ASSERT_MSG((statuspub == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspub == PEP_STATUS_OK");
   36.24 +    TEST_ASSERT_MSG((statuspriv == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspriv == PEP_STATUS_OK");
   36.25  
   36.26      cout << "creating message…\n";
   36.27      pEp_identity* alice = new_identity("pep.test.alice@pep-project.org", "4ABE3AAF59AC32CFE4F86500A9411D176FF00E97", PEP_OWN_USERID, "Alice Test");
    37.1 --- a/test/src/engine_tests/MimeTests.cc	Wed Feb 06 19:12:47 2019 +0100
    37.2 +++ b/test/src/engine_tests/MimeTests.cc	Wed Feb 06 19:25:40 2019 +0100
    37.3 @@ -2,6 +2,7 @@
    37.4  // see LICENSE.txt
    37.5  
    37.6  #include <stdlib.h>
    37.7 +#include "TestConstants.h"
    37.8  #include <string>
    37.9  #include <cstring>
   37.10  #include <iostream>
    38.1 --- a/test/src/engine_tests/NewUpdateIdAndMyselfTests.cc	Wed Feb 06 19:12:47 2019 +0100
    38.2 +++ b/test/src/engine_tests/NewUpdateIdAndMyselfTests.cc	Wed Feb 06 19:25:40 2019 +0100
    38.3 @@ -6,6 +6,7 @@
    38.4  #include <iostream>
    38.5  #include <fstream>
    38.6  #include <cstring> // for strcmp()
    38.7 +#include "TestConstants.h"
    38.8  
    38.9  #include "pEpEngine.h"
   38.10  #include "message_api.h"
   38.11 @@ -195,7 +196,7 @@
   38.12      const string alex_pub_key = slurp("test_keys/pub/pep.test.alexander-0x26B54E4E_pub.asc");
   38.13      
   38.14      PEP_STATUS statuspub = import_key(session, alex_pub_key.c_str(), alex_pub_key.length(), NULL);
   38.15 -    TEST_ASSERT_MSG((statuspub == PEP_KEY_IMPORTED), "statuspub == PEP_STATUS_OK");
   38.16 +    TEST_ASSERT_MSG((statuspub == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspub == PEP_STATUS_OK");
   38.17  
   38.18      pEp_identity* alex = new_identity(alex_address, alex_fpr, alex_userid, alex_username);
   38.19  
   38.20 @@ -353,7 +354,7 @@
   38.21      const string bella_pub_key = slurp("test_keys/pub/pep.test.bella-0xAF516AAE_pub.asc");
   38.22      
   38.23      statuspub = import_key(session, bella_pub_key.c_str(), bella_pub_key.length(), NULL);
   38.24 -    TEST_ASSERT_MSG((statuspub == PEP_KEY_IMPORTED), "statuspub == PEP_STATUS_OK");
   38.25 +    TEST_ASSERT_MSG((statuspub == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspub == PEP_STATUS_OK");
   38.26  
   38.27      pEp_identity* bella = new_identity(bella_address, bella_fpr, bella_userid, bella_username);
   38.28      
   38.29 @@ -460,7 +461,7 @@
   38.30      const string bernd_pub_key = slurp("test_keys/pub/bernd.das.brot-0xCAFAA422_pub.asc");
   38.31      
   38.32      statuspub = import_key(session, bernd_pub_key.c_str(), bernd_pub_key.length(), NULL);
   38.33 -    TEST_ASSERT_MSG((statuspub == PEP_KEY_IMPORTED), "statuspub == PEP_STATUS_OK");
   38.34 +    TEST_ASSERT_MSG((statuspub == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspub == PEP_STATUS_OK");
   38.35  
   38.36      pEp_identity* bernd = new_identity(bernd_address, bernd_fpr, bernd_userid, bernd_username);
   38.37      
    39.1 --- a/test/src/engine_tests/PepSubjectReceivedTests.cc	Wed Feb 06 19:12:47 2019 +0100
    39.2 +++ b/test/src/engine_tests/PepSubjectReceivedTests.cc	Wed Feb 06 19:25:40 2019 +0100
    39.3 @@ -1,6 +1,7 @@
    39.4  // This file is under GNU General Public License 3.0
    39.5  // see LICENSE.txt
    39.6  
    39.7 +#include "TestConstants.h"
    39.8  #include <stdlib.h>
    39.9  #include <string>
   39.10  #include <iostream>
    40.1 --- a/test/src/engine_tests/PgpBinaryTests.cc	Wed Feb 06 19:12:47 2019 +0100
    40.2 +++ b/test/src/engine_tests/PgpBinaryTests.cc	Wed Feb 06 19:25:40 2019 +0100
    40.3 @@ -2,6 +2,7 @@
    40.4  // see LICENSE.txt
    40.5  
    40.6  #include <stdlib.h>
    40.7 +#include "TestConstants.h"
    40.8  #include <string>
    40.9  #include <iostream>
   40.10  
    41.1 --- a/test/src/engine_tests/PgpListKeysTests.cc	Wed Feb 06 19:12:47 2019 +0100
    41.2 +++ b/test/src/engine_tests/PgpListKeysTests.cc	Wed Feb 06 19:25:40 2019 +0100
    41.3 @@ -2,6 +2,7 @@
    41.4  // see LICENSE.txt
    41.5  
    41.6  #include <stdlib.h>
    41.7 +#include "TestConstants.h"
    41.8  #include <string>
    41.9  #include <iostream>
   41.10  
    42.1 --- a/test/src/engine_tests/ReencryptPlusExtraKeysTests.cc	Wed Feb 06 19:12:47 2019 +0100
    42.2 +++ b/test/src/engine_tests/ReencryptPlusExtraKeysTests.cc	Wed Feb 06 19:25:40 2019 +0100
    42.3 @@ -2,6 +2,7 @@
    42.4  // see LICENSE.txt
    42.5  
    42.6  #include <stdlib.h>
    42.7 +#include "TestConstants.h"
    42.8  #include <cstring>
    42.9  #include <iostream>
   42.10  #include <fstream>
   42.11 @@ -52,24 +53,24 @@
   42.12      const string pub_extra_key_1 = slurp("test_keys/pub/reencrypt_extra_keys_1-0x8B026AEC_pub.asc");
   42.13  
   42.14      status = import_key(session, own_recip_pub_key.c_str(), own_recip_pub_key.length(), NULL);
   42.15 -    TEST_ASSERT_MSG(status == PEP_KEY_IMPORTED, "Failed to import own recipient public key.");
   42.16 +    TEST_ASSERT_MSG(status == PEP_TEST_KEY_IMPORT_SUCCESS, "Failed to import own recipient public key.");
   42.17      status = import_key(session, own_recip_priv_key.c_str(), own_recip_priv_key.length(), NULL);
   42.18 -    TEST_ASSERT_MSG(status == PEP_KEY_IMPORTED, "Failed to import own recipient private key.");    
   42.19 +    TEST_ASSERT_MSG(status == PEP_TEST_KEY_IMPORT_SUCCESS, "Failed to import own recipient private key.");    
   42.20      status = import_key(session, own_recip_2_pub_key.c_str(), own_recip_2_pub_key.length(), NULL);
   42.21 -    TEST_ASSERT_MSG(status == PEP_KEY_IMPORTED, "Failed to import own second recipient public key.");
   42.22 +    TEST_ASSERT_MSG(status == PEP_TEST_KEY_IMPORT_SUCCESS, "Failed to import own second recipient public key.");
   42.23      status = import_key(session, own_recip_2_priv_key.c_str(), own_recip_2_priv_key.length(), NULL);
   42.24 -    TEST_ASSERT_MSG(status == PEP_KEY_IMPORTED, "Failed to import own second recipient public key.");
   42.25 +    TEST_ASSERT_MSG(status == PEP_TEST_KEY_IMPORT_SUCCESS, "Failed to import own second recipient public key.");
   42.26      
   42.27      status = import_key(session, sender_pub_key.c_str(), sender_pub_key.length(), NULL);
   42.28 -    TEST_ASSERT_MSG(status == PEP_KEY_IMPORTED, "Failed to import own sender public key.");
   42.29 +    TEST_ASSERT_MSG(status == PEP_TEST_KEY_IMPORT_SUCCESS, "Failed to import own sender public key.");
   42.30      status = import_key(session, recip_2_pub_key.c_str(), recip_2_pub_key.length(), NULL);
   42.31 -    TEST_ASSERT_MSG(status == PEP_KEY_IMPORTED, "Failed to second recipient public key.");
   42.32 +    TEST_ASSERT_MSG(status == PEP_TEST_KEY_IMPORT_SUCCESS, "Failed to second recipient public key.");
   42.33      status = import_key(session, recip_0_pub_key.c_str(), recip_0_pub_key.length(), NULL);
   42.34 -    TEST_ASSERT_MSG(status == PEP_KEY_IMPORTED, "Failed to import zeroth recipient public key.");
   42.35 +    TEST_ASSERT_MSG(status == PEP_TEST_KEY_IMPORT_SUCCESS, "Failed to import zeroth recipient public key.");
   42.36      status = import_key(session, pub_extra_key_0.c_str(), pub_extra_key_0.length(), NULL);
   42.37 -    TEST_ASSERT_MSG(status == PEP_KEY_IMPORTED, "Failed to import first extra public key.");
   42.38 +    TEST_ASSERT_MSG(status == PEP_TEST_KEY_IMPORT_SUCCESS, "Failed to import first extra public key.");
   42.39      status = import_key(session, pub_extra_key_1.c_str(), pub_extra_key_1.length(), NULL);
   42.40 -    TEST_ASSERT_MSG(status == PEP_KEY_IMPORTED, "Failed to import second extra public key.");
   42.41 +    TEST_ASSERT_MSG(status == PEP_TEST_KEY_IMPORT_SUCCESS, "Failed to import second extra public key.");
   42.42  
   42.43      cout << "Keys imported." << endl;
   42.44  
    43.1 --- a/test/src/engine_tests/RevokeRegenAttachTests.cc	Wed Feb 06 19:12:47 2019 +0100
    43.2 +++ b/test/src/engine_tests/RevokeRegenAttachTests.cc	Wed Feb 06 19:25:40 2019 +0100
    43.3 @@ -1,6 +1,7 @@
    43.4  // This file is under GNU General Public License 3.0
    43.5  // see LICENSE.txt
    43.6  
    43.7 +#include "TestConstants.h"
    43.8  #include <stdlib.h>
    43.9  #include <string>
   43.10  #include <cstring>
   43.11 @@ -32,7 +33,7 @@
   43.12      EngineTestSessionSuite::setup();
   43.13      string recip_key = slurp("test_keys/pub/pep-test-alice-0x6FF00E97_pub.asc");
   43.14      PEP_STATUS status = import_key(session, recip_key.c_str(), recip_key.size(), NULL);
   43.15 -    assert(status == PEP_KEY_IMPORTED);
   43.16 +    assert(status == PEP_TEST_KEY_IMPORT_SUCCESS);
   43.17  }
   43.18  
   43.19  
    44.1 --- a/test/src/engine_tests/SequenceTests.cc	Wed Feb 06 19:12:47 2019 +0100
    44.2 +++ b/test/src/engine_tests/SequenceTests.cc	Wed Feb 06 19:25:40 2019 +0100
    44.3 @@ -1,6 +1,7 @@
    44.4  // This file is under GNU General Public License 3.0
    44.5  // see LICENSE.txt
    44.6  
    44.7 +#include "TestConstants.h"
    44.8  #include <iostream>
    44.9  #include <string>
   44.10  #include <cstring> // for std::strdup()
    45.1 --- a/test/src/engine_tests/SimpleBodyNotAltTests.cc	Wed Feb 06 19:12:47 2019 +0100
    45.2 +++ b/test/src/engine_tests/SimpleBodyNotAltTests.cc	Wed Feb 06 19:25:40 2019 +0100
    45.3 @@ -1,6 +1,7 @@
    45.4  // This file is under GNU General Public License 3.0
    45.5  // see LICENSE.txt
    45.6  
    45.7 +#include "TestConstants.h"
    45.8  #include <stdlib.h>
    45.9  #include <string>
   45.10  #include <cstring>
    46.1 --- a/test/src/engine_tests/StringlistTests.cc	Wed Feb 06 19:12:47 2019 +0100
    46.2 +++ b/test/src/engine_tests/StringlistTests.cc	Wed Feb 06 19:25:40 2019 +0100
    46.3 @@ -1,6 +1,7 @@
    46.4  // This file is under GNU General Public License 3.0
    46.5  // see LICENSE.txt
    46.6  
    46.7 +#include "TestConstants.h"
    46.8  #include <stdlib.h>
    46.9  #include <string.h>
   46.10  #include "platform.h"
    47.1 --- a/test/src/engine_tests/StringpairListTests.cc	Wed Feb 06 19:12:47 2019 +0100
    47.2 +++ b/test/src/engine_tests/StringpairListTests.cc	Wed Feb 06 19:25:40 2019 +0100
    47.3 @@ -1,6 +1,7 @@
    47.4  // This file is under GNU General Public License 3.0
    47.5  // see LICENSE.txt
    47.6  
    47.7 +#include "TestConstants.h"
    47.8  #include <stdlib.h>
    47.9  #include <string.h>
   47.10  #include "platform.h"
    48.1 --- a/test/src/engine_tests/SubkeyRatingEvalTests.cc	Wed Feb 06 19:12:47 2019 +0100
    48.2 +++ b/test/src/engine_tests/SubkeyRatingEvalTests.cc	Wed Feb 06 19:25:40 2019 +0100
    48.3 @@ -1,6 +1,7 @@
    48.4  // This file is under GNU General Public License 3.0
    48.5  // see LICENSE.txt
    48.6  
    48.7 +#include "TestConstants.h"
    48.8  #include <stdlib.h>
    48.9  #include <string>
   48.10  
    49.1 --- a/test/src/engine_tests/TrustManipulationTests.cc	Wed Feb 06 19:12:47 2019 +0100
    49.2 +++ b/test/src/engine_tests/TrustManipulationTests.cc	Wed Feb 06 19:25:40 2019 +0100
    49.3 @@ -1,6 +1,7 @@
    49.4  // This file is under GNU General Public License 3.0
    49.5  // see LICENSE.txt
    49.6  
    49.7 +#include "TestConstants.h"
    49.8  #include <stdlib.h>
    49.9  #include <string.h>
   49.10  #include <time.h>
    50.1 --- a/test/src/engine_tests/TrustwordsTests.cc	Wed Feb 06 19:12:47 2019 +0100
    50.2 +++ b/test/src/engine_tests/TrustwordsTests.cc	Wed Feb 06 19:25:40 2019 +0100
    50.3 @@ -1,6 +1,7 @@
    50.4  // This file is under GNU General Public License 3.0
    50.5  // see LICENSE.txt
    50.6  
    50.7 +#include "TestConstants.h"
    50.8  #include <iostream>
    50.9  #include <string>
   50.10  #include "pEpEngine.h"
    51.1 --- a/test/src/engine_tests/UserIDAliasTests.cc	Wed Feb 06 19:12:47 2019 +0100
    51.2 +++ b/test/src/engine_tests/UserIDAliasTests.cc	Wed Feb 06 19:25:40 2019 +0100
    51.3 @@ -1,6 +1,7 @@
    51.4  // This file is under GNU General Public License 3.0
    51.5  // see LICENSE.txt
    51.6  
    51.7 +#include "TestConstants.h"
    51.8  #include <iostream>
    51.9  #include <iostream>
   51.10  #include <fstream>
   51.11 @@ -33,8 +34,8 @@
   51.12      
   51.13      PEP_STATUS statuspub = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL);
   51.14      PEP_STATUS statuspriv = import_key(session, alice_priv_key.c_str(), alice_priv_key.length(), NULL);
   51.15 -    TEST_ASSERT_MSG((statuspub == PEP_KEY_IMPORTED), "statuspub == PEP_STATUS_OK");
   51.16 -    TEST_ASSERT_MSG((statuspriv == PEP_KEY_IMPORTED), "statuspriv == PEP_STATUS_OK");
   51.17 +    TEST_ASSERT_MSG((statuspub == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspub == PEP_STATUS_OK");
   51.18 +    TEST_ASSERT_MSG((statuspriv == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspriv == PEP_STATUS_OK");
   51.19  
   51.20      pEp_identity* alice = new_identity("pep.test.alice@pep-project.org", "4ABE3AAF59AC32CFE4F86500A9411D176FF00E97", PEP_OWN_USERID, "Alice Test");
   51.21  
    52.1 --- a/test/src/engine_tests/UserIdCollisionTests.cc	Wed Feb 06 19:12:47 2019 +0100
    52.2 +++ b/test/src/engine_tests/UserIdCollisionTests.cc	Wed Feb 06 19:25:40 2019 +0100
    52.3 @@ -1,6 +1,7 @@
    52.4  // This file is under GNU General Public License 3.0
    52.5  // see LICENSE.txt
    52.6  
    52.7 +#include "TestConstants.h"
    52.8  #include <stdlib.h>
    52.9  #include <string>
   52.10  #include <cstring>
    53.1 --- a/test/src/pEpTestOutput.cc	Wed Feb 06 19:12:47 2019 +0100
    53.2 +++ b/test/src/pEpTestOutput.cc	Wed Feb 06 19:25:40 2019 +0100
    53.3 @@ -6,6 +6,7 @@
    53.4  #include <cstring>
    53.5  #include <utility>
    53.6  
    53.7 +#include "TestConstants.h"
    53.8  #include "pEpTestOutput.h"
    53.9  using namespace std;
   53.10  
    54.1 --- a/test/src/pEpTestStatic.cc	Wed Feb 06 19:12:47 2019 +0100
    54.2 +++ b/test/src/pEpTestStatic.cc	Wed Feb 06 19:25:40 2019 +0100
    54.3 @@ -4,6 +4,7 @@
    54.4  #include "pEpTestStatic.h"
    54.5  #include <math.h>
    54.6  #include <string>
    54.7 +#include "TestConstants.h"
    54.8  
    54.9  using namespace std;
   54.10  
    55.1 --- a/test/src/util/test_util.cc	Wed Feb 06 19:12:47 2019 +0100
    55.2 +++ b/test/src/util/test_util.cc	Wed Feb 06 19:25:40 2019 +0100
    55.3 @@ -3,6 +3,7 @@
    55.4  #include "pEp_internal.h"
    55.5  #include "message_api.h"
    55.6  #include "test_util.h"
    55.7 +#include "TestConstants.h"
    55.8  
    55.9  #include <fstream>
   55.10  #include <sstream>
   55.11 @@ -382,7 +383,7 @@
   55.12  
   55.13  bool slurp_and_import_key(PEP_SESSION session, const char* key_filename) {
   55.14      std::string keyfile = slurp(key_filename);
   55.15 -    if (import_key(session, keyfile.c_str(), keyfile.size(), NULL) != PEP_KEY_IMPORTED)
   55.16 +    if (import_key(session, keyfile.c_str(), keyfile.size(), NULL) != PEP_TEST_KEY_IMPORT_SUCCESS)
   55.17          return false;
   55.18      return true;
   55.19  }