ENGINE-781: infrastructure to test w/ callback runs on empty pass list ENGINE-781
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Fri, 31 Jul 2020 17:59:21 +0200
branchENGINE-781
changeset 4921437276bbda01
parent 4920 0b584b77b1f6
child 4922 32a5d2ca9691
ENGINE-781: infrastructure to test w/ callback runs on empty pass list
test/src/AppleMailTest.cc
test/src/BCCTest.cc
test/src/BlacklistAcceptNewKeyTest.cc
test/src/BlacklistTest.cc
test/src/CaseAndDotAddressTest.cc
test/src/CheckRenewedExpiredKeyTrustStatusTest.cc
test/src/CleanInvalidOwnKeysTest.cc
test/src/CrashdumpTest.cc
test/src/DecorateTest.cc
test/src/DecryptAttachPrivateKeyTrustedTest.cc
test/src/DecryptAttachPrivateKeyUntrustedTest.cc
test/src/DeleteKeyTest.cc
test/src/ElevatedAttachmentsTest.cc
test/src/EmptyLongmsgFullHtmlTest.cc
test/src/EncryptAttachPrivateKeyTest.cc
test/src/EncryptForIdentityTest.cc
test/src/EncryptMissingPrivateKeyTest.cc
test/src/Engine.cc
test/src/Engine.h
test/src/Engine358Test.cc
test/src/Engine463Test.cc
test/src/Engine514Test.cc
test/src/Engine655Test.cc
test/src/Engine703Test.cc
test/src/Engine704Test.cc
test/src/Engine715Test.cc
test/src/Engine736Test.cc
test/src/ExpiredSubkeyTest.cc
test/src/ExportKeyTest.cc
test/src/ExternalRevokeTest.cc
test/src/GetKeyRatingForUserTest.cc
test/src/HeaderKeyImportTest.cc
test/src/I18nTest.cc
test/src/IdentEncFormatTest.cc
test/src/ImportKeyTest.cc
test/src/KeyAttachmentTest.cc
test/src/KeyManipulationTest.cc
test/src/KeyResetMessageTest.cc
test/src/KeyeditTest.cc
test/src/KeyringImportTest.cc
test/src/LeastColorGroupTest.cc
test/src/LeastCommonDenomColorTest.cc
test/src/LiteralFilenameTest.cc
test/src/LookupTest.cc
test/src/LotsOfKeysTest.cc
test/src/MapAsn1Test.cc
test/src/Message2_1Test.cc
test/src/MessageApiTest.cc
test/src/MessageNullFromTest.cc
test/src/MessageTwoPointOhTest.cc
test/src/MimeTest.cc
test/src/NoOwnIdentWritesOnDecryptTest.cc
test/src/OwnIdentitiesRetrieveTest.cc
test/src/OwnKeysRetrieveTest.cc
test/src/PassphraseTest.cc
test/src/PepSubjectReceivedTest.cc
test/src/PgpBinaryTest.cc
test/src/PgpListKeysTest.cc
test/src/Quick11to12Test.cc
test/src/ReencryptPlusExtraKeysTest.cc
test/src/RevocationTest.cc
test/src/RevokeRegenAttachTest.cc
test/src/SenderFPRTest.cc
test/src/SequenceTest.cc
test/src/SignOnlyTest.cc
test/src/SimpleBodyNotAltTest.cc
test/src/SubkeyRatingEvalTest.cc
test/src/SyncTest.cc
test/src/TrustManipulationTest.cc
test/src/TrustwordsTest.cc
test/src/URIAddressTest.cc
test/src/UnencryptedPepMailTest.cc
test/src/UpdateIdAndMyselfTest.cc
test/src/UserIDAliasTest.cc
test/src/UserIdCollisionTest.cc
test/src/VerifyTest.cc
test/src/test_util.cc
test/src/test_util.h
     1.1 --- a/test/src/AppleMailTest.cc	Fri Jul 31 15:11:36 2020 +0200
     1.2 +++ b/test/src/AppleMailTest.cc	Fri Jul 31 17:59:21 2020 +0200
     1.3 @@ -61,7 +61,7 @@
     1.4                  ASSERT_NE(engine, nullptr);
     1.5  
     1.6                  // Ok, let's initialize test directories etc.
     1.7 -                engine->prep(NULL, NULL, init_files);
     1.8 +                engine->prep(NULL, NULL, NULL, init_files);
     1.9  
    1.10                  // Ok, try to start this bugger.
    1.11                  engine->start();
     2.1 --- a/test/src/BCCTest.cc	Fri Jul 31 15:11:36 2020 +0200
     2.2 +++ b/test/src/BCCTest.cc	Fri Jul 31 17:59:21 2020 +0200
     2.3 @@ -55,7 +55,7 @@
     2.4                  ASSERT_NE(engine, nullptr);
     2.5  
     2.6                  // Ok, let's initialize test directories etc.
     2.7 -                engine->prep(NULL, NULL, init_files);
     2.8 +                engine->prep(NULL, NULL, NULL, init_files);
     2.9  
    2.10                  // Ok, try to start this bugger.
    2.11                  engine->start();
     3.1 --- a/test/src/BlacklistAcceptNewKeyTest.cc	Fri Jul 31 15:11:36 2020 +0200
     3.2 +++ b/test/src/BlacklistAcceptNewKeyTest.cc	Fri Jul 31 17:59:21 2020 +0200
     3.3 @@ -58,7 +58,7 @@
     3.4                  ASSERT_NE(engine, nullptr);
     3.5  
     3.6                  // Ok, let's initialize test directories etc.
     3.7 -                engine->prep(NULL, NULL, init_files);
     3.8 +                engine->prep(NULL, NULL, NULL, init_files);
     3.9  
    3.10                  // Ok, try to start this bugger.
    3.11                  engine->start();
     4.1 --- a/test/src/BlacklistTest.cc	Fri Jul 31 15:11:36 2020 +0200
     4.2 +++ b/test/src/BlacklistTest.cc	Fri Jul 31 17:59:21 2020 +0200
     4.3 @@ -72,7 +72,7 @@
     4.4                  ASSERT_NE(engine, nullptr);
     4.5  
     4.6                  // Ok, let's initialize test directories etc.
     4.7 -                engine->prep(NULL, NULL, init_files);
     4.8 +                engine->prep(NULL, NULL, NULL, init_files);
     4.9  
    4.10                  // Ok, try to start this bugger.
    4.11                  engine->start();
     5.1 --- a/test/src/CaseAndDotAddressTest.cc	Fri Jul 31 15:11:36 2020 +0200
     5.2 +++ b/test/src/CaseAndDotAddressTest.cc	Fri Jul 31 17:59:21 2020 +0200
     5.3 @@ -56,7 +56,7 @@
     5.4                  ASSERT_NE(engine, nullptr);
     5.5  
     5.6                  // Ok, let's initialize test directories etc.
     5.7 -                engine->prep(NULL, NULL, init_files);
     5.8 +                engine->prep(NULL, NULL, NULL, init_files);
     5.9  
    5.10                  // Ok, try to start this bugger.
    5.11                  engine->start();
     6.1 --- a/test/src/CheckRenewedExpiredKeyTrustStatusTest.cc	Fri Jul 31 15:11:36 2020 +0200
     6.2 +++ b/test/src/CheckRenewedExpiredKeyTrustStatusTest.cc	Fri Jul 31 17:59:21 2020 +0200
     6.3 @@ -53,7 +53,7 @@
     6.4                  ASSERT_NE(engine, nullptr);
     6.5  
     6.6                  // Ok, let's initialize test directories etc.
     6.7 -                engine->prep(NULL, NULL, init_files);
     6.8 +                engine->prep(NULL, NULL, NULL, init_files);
     6.9  
    6.10                  // Ok, try to start this bugger.
    6.11                  engine->start();
     7.1 --- a/test/src/CleanInvalidOwnKeysTest.cc	Fri Jul 31 15:11:36 2020 +0200
     7.2 +++ b/test/src/CleanInvalidOwnKeysTest.cc	Fri Jul 31 17:59:21 2020 +0200
     7.3 @@ -51,7 +51,7 @@
     7.4                  ASSERT_NE(engine, nullptr);
     7.5  
     7.6                  // Ok, let's initialize test directories etc.
     7.7 -                engine->prep(NULL, NULL, init_files);
     7.8 +                engine->prep(NULL, NULL, NULL, init_files);
     7.9  
    7.10                  // Ok, try to start this bugger.
    7.11                  engine->start();
     8.1 --- a/test/src/CrashdumpTest.cc	Fri Jul 31 15:11:36 2020 +0200
     8.2 +++ b/test/src/CrashdumpTest.cc	Fri Jul 31 17:59:21 2020 +0200
     8.3 @@ -51,7 +51,7 @@
     8.4                  ASSERT_NE(engine, nullptr);
     8.5  
     8.6                  // Ok, let's initialize test directories etc.
     8.7 -                engine->prep(NULL, NULL, init_files);
     8.8 +                engine->prep(NULL, NULL, NULL, init_files);
     8.9  
    8.10                  // Ok, try to start this bugger.
    8.11                  engine->start();
     9.1 --- a/test/src/DecorateTest.cc	Fri Jul 31 15:11:36 2020 +0200
     9.2 +++ b/test/src/DecorateTest.cc	Fri Jul 31 17:59:21 2020 +0200
     9.3 @@ -57,7 +57,7 @@
     9.4                  ASSERT_NE(engine, nullptr);
     9.5  
     9.6                  // Ok, let's initialize test directories etc.
     9.7 -                engine->prep(NULL, NULL, init_files);
     9.8 +                engine->prep(NULL, NULL, NULL, init_files);
     9.9  
    9.10                  // Ok, try to start this bugger.
    9.11                  engine->start();
    10.1 --- a/test/src/DecryptAttachPrivateKeyTrustedTest.cc	Fri Jul 31 15:11:36 2020 +0200
    10.2 +++ b/test/src/DecryptAttachPrivateKeyTrustedTest.cc	Fri Jul 31 17:59:21 2020 +0200
    10.3 @@ -59,7 +59,7 @@
    10.4                  ASSERT_NE(engine, nullptr);
    10.5  
    10.6                  // Ok, let's initialize test directories etc.
    10.7 -                engine->prep(NULL, NULL, init_files);
    10.8 +                engine->prep(NULL, NULL, NULL, init_files);
    10.9  
   10.10                  // Ok, try to start this bugger.
   10.11                  engine->start();
    11.1 --- a/test/src/DecryptAttachPrivateKeyUntrustedTest.cc	Fri Jul 31 15:11:36 2020 +0200
    11.2 +++ b/test/src/DecryptAttachPrivateKeyUntrustedTest.cc	Fri Jul 31 17:59:21 2020 +0200
    11.3 @@ -57,7 +57,7 @@
    11.4                  ASSERT_NE(engine, nullptr);
    11.5  
    11.6                  // Ok, let's initialize test directories etc.
    11.7 -                engine->prep(NULL, NULL, init_files);
    11.8 +                engine->prep(NULL, NULL, NULL, init_files);
    11.9  
   11.10                  // Ok, try to start this bugger.
   11.11                  engine->start();
    12.1 --- a/test/src/DeleteKeyTest.cc	Fri Jul 31 15:11:36 2020 +0200
    12.2 +++ b/test/src/DeleteKeyTest.cc	Fri Jul 31 17:59:21 2020 +0200
    12.3 @@ -67,7 +67,7 @@
    12.4                  ASSERT_NE(engine, nullptr);
    12.5  
    12.6                  // Ok, let's initialize test directories etc.
    12.7 -                engine->prep(NULL, NULL, init_files);
    12.8 +                engine->prep(NULL, NULL, NULL, init_files);
    12.9  
   12.10                  // Ok, try to start this bugger.
   12.11                  engine->start();
    13.1 --- a/test/src/ElevatedAttachmentsTest.cc	Fri Jul 31 15:11:36 2020 +0200
    13.2 +++ b/test/src/ElevatedAttachmentsTest.cc	Fri Jul 31 17:59:21 2020 +0200
    13.3 @@ -48,7 +48,7 @@
    13.4                  ASSERT_NE(engine, nullptr);
    13.5  
    13.6                  // Ok, let's initialize test directories etc.
    13.7 -                engine->prep(NULL, NULL, init_files);
    13.8 +                engine->prep(NULL, NULL, NULL, init_files);
    13.9  
   13.10                  // Ok, try to start this bugger.
   13.11                  engine->start();
    14.1 --- a/test/src/EmptyLongmsgFullHtmlTest.cc	Fri Jul 31 15:11:36 2020 +0200
    14.2 +++ b/test/src/EmptyLongmsgFullHtmlTest.cc	Fri Jul 31 17:59:21 2020 +0200
    14.3 @@ -52,7 +52,7 @@
    14.4                  ASSERT_NE(engine, nullptr);
    14.5  
    14.6                  // Ok, let's initialize test directories etc.
    14.7 -                engine->prep(NULL, NULL, init_files);
    14.8 +                engine->prep(NULL, NULL, NULL, init_files);
    14.9  
   14.10                  // Ok, try to start this bugger.
   14.11                  engine->start();
    15.1 --- a/test/src/EncryptAttachPrivateKeyTest.cc	Fri Jul 31 15:11:36 2020 +0200
    15.2 +++ b/test/src/EncryptAttachPrivateKeyTest.cc	Fri Jul 31 17:59:21 2020 +0200
    15.3 @@ -57,7 +57,7 @@
    15.4                  ASSERT_NE(engine, nullptr);
    15.5  
    15.6                  // Ok, let's initialize test directories etc.
    15.7 -                engine->prep(NULL, NULL, init_files);
    15.8 +                engine->prep(NULL, NULL, NULL, init_files);
    15.9  
   15.10                  // Ok, try to start this bugger.
   15.11                  engine->start();
    16.1 --- a/test/src/EncryptForIdentityTest.cc	Fri Jul 31 15:11:36 2020 +0200
    16.2 +++ b/test/src/EncryptForIdentityTest.cc	Fri Jul 31 17:59:21 2020 +0200
    16.3 @@ -57,7 +57,7 @@
    16.4                  ASSERT_NE(engine, nullptr);
    16.5  
    16.6                  // Ok, let's initialize test directories etc.
    16.7 -                engine->prep(NULL, NULL, init_files);
    16.8 +                engine->prep(NULL, NULL, NULL, init_files);
    16.9  
   16.10                  // Ok, try to start this bugger.
   16.11                  engine->start();
    17.1 --- a/test/src/EncryptMissingPrivateKeyTest.cc	Fri Jul 31 15:11:36 2020 +0200
    17.2 +++ b/test/src/EncryptMissingPrivateKeyTest.cc	Fri Jul 31 17:59:21 2020 +0200
    17.3 @@ -62,7 +62,7 @@
    17.4                  ASSERT_NE(engine, nullptr);
    17.5  
    17.6                  // Ok, let's initialize test directories etc.
    17.7 -                engine->prep(NULL, NULL, init_files);
    17.8 +                engine->prep(NULL, NULL, NULL, init_files);
    17.9  
   17.10                  // Ok, try to start this bugger.
   17.11                  engine->start();
    18.1 --- a/test/src/Engine.cc	Fri Jul 31 15:11:36 2020 +0200
    18.2 +++ b/test/src/Engine.cc	Fri Jul 31 17:59:21 2020 +0200
    18.3 @@ -32,17 +32,19 @@
    18.4      real_home = getenv("HOME");
    18.5      cached_messageToSend = NULL;
    18.6      cached_inject_sync_event = NULL;
    18.7 +    cached_ensure_passphrase = NULL;
    18.8  }
    18.9  
   18.10  Engine::~Engine() {}
   18.11  
   18.12 -void Engine::prep(messageToSend_t mts, inject_sync_event_t ise, 
   18.13 +void Engine::prep(messageToSend_t mts, inject_sync_event_t ise, ensure_passphrase_t ep,
   18.14                    std::vector<std::pair<std::string, std::string>> init_files) {
   18.15      if (engine_home.empty())
   18.16          throw std::runtime_error("Engine setup: BAD INITIALISATION. No test home.");
   18.17      
   18.18      cached_messageToSend = mts;
   18.19      cached_inject_sync_event = ise;
   18.20 +    cached_ensure_passphrase = ep;
   18.21  
   18.22      int success = 0;
   18.23      struct stat dirchk;
   18.24 @@ -90,7 +92,7 @@
   18.25              
   18.26      unix_local_db(true);
   18.27              
   18.28 -    PEP_STATUS status = init(&session, cached_messageToSend, cached_inject_sync_event, NULL);
   18.29 +    PEP_STATUS status = init(&session, cached_messageToSend, cached_inject_sync_event, cached_ensure_passphrase);
   18.30      assert(status == PEP_STATUS_OK);
   18.31      assert(session);
   18.32  
    19.1 --- a/test/src/Engine.h	Fri Jul 31 15:11:36 2020 +0200
    19.2 +++ b/test/src/Engine.h	Fri Jul 31 17:59:21 2020 +0200
    19.3 @@ -14,7 +14,7 @@
    19.4          Engine(string engine_home_dir);
    19.5          virtual ~Engine();
    19.6          
    19.7 -        void prep(const messageToSend_t mts, const inject_sync_event_t ise, std::vector<std::pair<std::string, std::string>> init_files);
    19.8 +        void prep(const messageToSend_t mts, const inject_sync_event_t ise, const ensure_passphrase_t ep, std::vector<std::pair<std::string, std::string>> init_files);
    19.9          void start();
   19.10          void shut_down();
   19.11  
   19.12 @@ -27,6 +27,7 @@
   19.13          
   19.14          messageToSend_t cached_messageToSend;
   19.15          inject_sync_event_t cached_inject_sync_event;
   19.16 +        ensure_passphrase_t cached_ensure_passphrase;
   19.17          	
   19.18          void copy_conf_file_to_test_dir(const char* dest_path, const char* conf_orig_path, const char* conf_dest_name);        
   19.19          void process_file_queue(std::string dirname, std::vector<std::pair<std::string, std::string>> file_queue);
    20.1 --- a/test/src/Engine358Test.cc	Fri Jul 31 15:11:36 2020 +0200
    20.2 +++ b/test/src/Engine358Test.cc	Fri Jul 31 17:59:21 2020 +0200
    20.3 @@ -53,7 +53,7 @@
    20.4                  ASSERT_NE(engine, nullptr);
    20.5  
    20.6                  // Ok, let's initialize test directories etc.
    20.7 -                engine->prep(NULL, NULL, init_files);
    20.8 +                engine->prep(NULL, NULL, NULL, init_files);
    20.9  
   20.10                  // Ok, try to start this bugger.
   20.11                  engine->start();
    21.1 --- a/test/src/Engine463Test.cc	Fri Jul 31 15:11:36 2020 +0200
    21.2 +++ b/test/src/Engine463Test.cc	Fri Jul 31 17:59:21 2020 +0200
    21.3 @@ -54,7 +54,7 @@
    21.4                  ASSERT_NE(engine, nullptr);
    21.5  
    21.6                  // Ok, let's initialize test directories etc.
    21.7 -                engine->prep(NULL, NULL, init_files);
    21.8 +                engine->prep(NULL, NULL, NULL, init_files);
    21.9  
   21.10                  // Ok, try to start this bugger.
   21.11                  engine->start();
    22.1 --- a/test/src/Engine514Test.cc	Fri Jul 31 15:11:36 2020 +0200
    22.2 +++ b/test/src/Engine514Test.cc	Fri Jul 31 17:59:21 2020 +0200
    22.3 @@ -47,7 +47,7 @@
    22.4                  ASSERT_NE(engine, nullptr);
    22.5  
    22.6                  // Ok, let's initialize test directories etc.
    22.7 -                engine->prep(NULL, NULL, init_files);
    22.8 +                engine->prep(NULL, NULL, NULL, init_files);
    22.9  
   22.10                  // Ok, try to start this bugger.
   22.11                  engine->start();
    23.1 --- a/test/src/Engine655Test.cc	Fri Jul 31 15:11:36 2020 +0200
    23.2 +++ b/test/src/Engine655Test.cc	Fri Jul 31 17:59:21 2020 +0200
    23.3 @@ -51,7 +51,7 @@
    23.4                  ASSERT_NE(engine, nullptr);
    23.5  
    23.6                  // Ok, let's initialize test directories etc.
    23.7 -                engine->prep(NULL, NULL, init_files);
    23.8 +                engine->prep(NULL, NULL, NULL, init_files);
    23.9  
   23.10                  // Ok, try to start this bugger.
   23.11                  engine->start();
    24.1 --- a/test/src/Engine703Test.cc	Fri Jul 31 15:11:36 2020 +0200
    24.2 +++ b/test/src/Engine703Test.cc	Fri Jul 31 17:59:21 2020 +0200
    24.3 @@ -53,7 +53,7 @@
    24.4                  ASSERT_NE(engine, nullptr);
    24.5  
    24.6                  // Ok, let's initialize test directories etc.
    24.7 -                engine->prep(NULL, NULL, init_files);
    24.8 +                engine->prep(NULL, NULL, NULL, init_files);
    24.9  
   24.10                  // Ok, try to start this bugger.
   24.11                  engine->start();
    25.1 --- a/test/src/Engine704Test.cc	Fri Jul 31 15:11:36 2020 +0200
    25.2 +++ b/test/src/Engine704Test.cc	Fri Jul 31 17:59:21 2020 +0200
    25.3 @@ -47,7 +47,7 @@
    25.4                  ASSERT_NE(engine, nullptr);
    25.5  
    25.6                  // Ok, let's initialize test directories etc.
    25.7 -                engine->prep(NULL, NULL, init_files);
    25.8 +                engine->prep(NULL, NULL, NULL, init_files);
    25.9  
   25.10                  // Ok, try to start this bugger.
   25.11                  engine->start();
    26.1 --- a/test/src/Engine715Test.cc	Fri Jul 31 15:11:36 2020 +0200
    26.2 +++ b/test/src/Engine715Test.cc	Fri Jul 31 17:59:21 2020 +0200
    26.3 @@ -47,7 +47,7 @@
    26.4                  ASSERT_NE(engine, nullptr);
    26.5  
    26.6                  // Ok, let's initialize test directories etc.
    26.7 -                engine->prep(NULL, NULL, init_files);
    26.8 +                engine->prep(NULL, NULL, NULL, init_files);
    26.9  
   26.10                  // Ok, try to start this bugger.
   26.11                  engine->start();
    27.1 --- a/test/src/Engine736Test.cc	Fri Jul 31 15:11:36 2020 +0200
    27.2 +++ b/test/src/Engine736Test.cc	Fri Jul 31 17:59:21 2020 +0200
    27.3 @@ -49,7 +49,7 @@
    27.4                  ASSERT_NE(engine, nullptr);
    27.5  
    27.6                  // Ok, let's initialize test directories etc.
    27.7 -                engine->prep(NULL, NULL, init_files);
    27.8 +                engine->prep(NULL, NULL, NULL, init_files);
    27.9  
   27.10                  // Ok, try to start this bugger.
   27.11                  engine->start();
    28.1 --- a/test/src/ExpiredSubkeyTest.cc	Fri Jul 31 15:11:36 2020 +0200
    28.2 +++ b/test/src/ExpiredSubkeyTest.cc	Fri Jul 31 17:59:21 2020 +0200
    28.3 @@ -52,7 +52,7 @@
    28.4                  ASSERT_NE(engine, nullptr);
    28.5  
    28.6                  // Ok, let's initialize test directories etc.
    28.7 -                engine->prep(NULL, NULL, init_files);
    28.8 +                engine->prep(NULL, NULL, NULL, init_files);
    28.9  
   28.10                  // Ok, try to start this bugger.
   28.11                  engine->start();
    29.1 --- a/test/src/ExportKeyTest.cc	Fri Jul 31 15:11:36 2020 +0200
    29.2 +++ b/test/src/ExportKeyTest.cc	Fri Jul 31 17:59:21 2020 +0200
    29.3 @@ -54,7 +54,7 @@
    29.4                  ASSERT_NE(engine, nullptr);
    29.5  
    29.6                  // Ok, let's initialize test directories etc.
    29.7 -                engine->prep(NULL, NULL, init_files);
    29.8 +                engine->prep(NULL, NULL, NULL, init_files);
    29.9  
   29.10                  // Ok, try to start this bugger.
   29.11                  engine->start();
    30.1 --- a/test/src/ExternalRevokeTest.cc	Fri Jul 31 15:11:36 2020 +0200
    30.2 +++ b/test/src/ExternalRevokeTest.cc	Fri Jul 31 17:59:21 2020 +0200
    30.3 @@ -59,7 +59,7 @@
    30.4                  ASSERT_NE(engine, nullptr);
    30.5  
    30.6                  // Ok, let's initialize test directories etc.
    30.7 -                engine->prep(NULL, NULL, init_files);
    30.8 +                engine->prep(NULL, NULL, NULL, init_files);
    30.9  
   30.10                  // Ok, try to start this bugger.
   30.11                  engine->start();
    31.1 --- a/test/src/GetKeyRatingForUserTest.cc	Fri Jul 31 15:11:36 2020 +0200
    31.2 +++ b/test/src/GetKeyRatingForUserTest.cc	Fri Jul 31 17:59:21 2020 +0200
    31.3 @@ -54,7 +54,7 @@
    31.4                  ASSERT_NE(engine, nullptr);
    31.5  
    31.6                  // Ok, let's initialize test directories etc.
    31.7 -                engine->prep(NULL, NULL, init_files);
    31.8 +                engine->prep(NULL, NULL, NULL, init_files);
    31.9  
   31.10                  // Ok, try to start this bugger.
   31.11                  engine->start();
    32.1 --- a/test/src/HeaderKeyImportTest.cc	Fri Jul 31 15:11:36 2020 +0200
    32.2 +++ b/test/src/HeaderKeyImportTest.cc	Fri Jul 31 17:59:21 2020 +0200
    32.3 @@ -56,7 +56,7 @@
    32.4                  ASSERT_NE(engine, nullptr);
    32.5  
    32.6                  // Ok, let's initialize test directories etc.
    32.7 -                engine->prep(NULL, NULL, init_files);
    32.8 +                engine->prep(NULL, NULL, NULL, init_files);
    32.9  
   32.10                  // Ok, try to start this bugger.
   32.11                  engine->start();
    33.1 --- a/test/src/I18nTest.cc	Fri Jul 31 15:11:36 2020 +0200
    33.2 +++ b/test/src/I18nTest.cc	Fri Jul 31 17:59:21 2020 +0200
    33.3 @@ -52,7 +52,7 @@
    33.4                  ASSERT_NE(engine, nullptr);
    33.5  
    33.6                  // Ok, let's initialize test directories etc.
    33.7 -                engine->prep(NULL, NULL, init_files);
    33.8 +                engine->prep(NULL, NULL, NULL, init_files);
    33.9  
   33.10                  // Ok, try to start this bugger.
   33.11                  engine->start();
    34.1 --- a/test/src/IdentEncFormatTest.cc	Fri Jul 31 15:11:36 2020 +0200
    34.2 +++ b/test/src/IdentEncFormatTest.cc	Fri Jul 31 17:59:21 2020 +0200
    34.3 @@ -47,7 +47,7 @@
    34.4                  ASSERT_NE(engine, nullptr);
    34.5  
    34.6                  // Ok, let's initialize test directories etc.
    34.7 -                engine->prep(NULL, NULL, init_files);
    34.8 +                engine->prep(NULL, NULL, NULL, init_files);
    34.9  
   34.10                  // Ok, try to start this bugger.
   34.11                  engine->start();
    35.1 --- a/test/src/ImportKeyTest.cc	Fri Jul 31 15:11:36 2020 +0200
    35.2 +++ b/test/src/ImportKeyTest.cc	Fri Jul 31 17:59:21 2020 +0200
    35.3 @@ -47,7 +47,7 @@
    35.4                  ASSERT_NE(engine, nullptr);
    35.5  
    35.6                  // Ok, let's initialize test directories etc.
    35.7 -                engine->prep(NULL, NULL, init_files);
    35.8 +                engine->prep(NULL, NULL, NULL, init_files);
    35.9  
   35.10                  // Ok, try to start this bugger.
   35.11                  engine->start();
    36.1 --- a/test/src/KeyAttachmentTest.cc	Fri Jul 31 15:11:36 2020 +0200
    36.2 +++ b/test/src/KeyAttachmentTest.cc	Fri Jul 31 17:59:21 2020 +0200
    36.3 @@ -57,7 +57,7 @@
    36.4                  ASSERT_NE(engine, nullptr);
    36.5  
    36.6                  // Ok, let's initialize test directories etc.
    36.7 -                engine->prep(NULL, NULL, init_files);
    36.8 +                engine->prep(NULL, NULL, NULL, init_files);
    36.9  
   36.10                  // Ok, try to start this bugger.
   36.11                  engine->start();
    37.1 --- a/test/src/KeyManipulationTest.cc	Fri Jul 31 15:11:36 2020 +0200
    37.2 +++ b/test/src/KeyManipulationTest.cc	Fri Jul 31 17:59:21 2020 +0200
    37.3 @@ -47,7 +47,7 @@
    37.4                  ASSERT_NE(engine, nullptr);
    37.5  
    37.6                  // Ok, let's initialize test directories etc.
    37.7 -                engine->prep(NULL, NULL, init_files);
    37.8 +                engine->prep(NULL, NULL, NULL, init_files);
    37.9  
   37.10                  // Ok, try to start this bugger.
   37.11                  engine->start();
    38.1 --- a/test/src/KeyResetMessageTest.cc	Fri Jul 31 15:11:36 2020 +0200
    38.2 +++ b/test/src/KeyResetMessageTest.cc	Fri Jul 31 17:59:21 2020 +0200
    38.3 @@ -24,6 +24,7 @@
    38.4  #include <gtest/gtest.h>
    38.5  
    38.6  PEP_STATUS KRMT_message_send_callback(message* msg);
    38.7 +PEP_STATUS KRMT_ensure_passphrase_callback(PEP_SESSION session, const char* key);
    38.8  
    38.9  static void* KRMT_fake_this;
   38.10  
   38.11 @@ -34,6 +35,7 @@
   38.12          PEP_SESSION session;
   38.13  
   38.14          vector<message*> m_queue;
   38.15 +        vector<string> pass_list;
   38.16  
   38.17      protected:
   38.18  
   38.19 @@ -87,7 +89,7 @@
   38.20              ASSERT_NE(engine, nullptr);
   38.21  
   38.22              // Ok, let's initialize test directories etc.
   38.23 -            engine->prep(&KRMT_message_send_callback, NULL, init_files);
   38.24 +            engine->prep(&KRMT_message_send_callback, NULL, &KRMT_ensure_passphrase_callback, init_files);
   38.25  
   38.26              // Ok, try to start this bugger.
   38.27              engine->start();
   38.28 @@ -245,6 +247,9 @@
   38.29      return PEP_STATUS_OK;
   38.30  }
   38.31  
   38.32 +PEP_STATUS KRMT_ensure_passphrase_callback(PEP_SESSION session, const char* fpr) {
   38.33 +    return config_valid_passphrase(session, fpr, ((KeyResetMessageTest*)KRMT_fake_this)->pass_list);
   38.34 +}
   38.35  
   38.36  TEST_F(KeyResetMessageTest, check_reset_key_and_notify) {
   38.37      send_setup();
    39.1 --- a/test/src/KeyeditTest.cc	Fri Jul 31 15:11:36 2020 +0200
    39.2 +++ b/test/src/KeyeditTest.cc	Fri Jul 31 17:59:21 2020 +0200
    39.3 @@ -55,7 +55,7 @@
    39.4                  ASSERT_NE(engine, nullptr);
    39.5  
    39.6                  // Ok, let's initialize test directories etc.
    39.7 -                engine->prep(NULL, NULL, init_files);
    39.8 +                engine->prep(NULL, NULL, NULL, init_files);
    39.9  
   39.10                  // Ok, try to start this bugger.
   39.11                  engine->start();
    40.1 --- a/test/src/KeyringImportTest.cc	Fri Jul 31 15:11:36 2020 +0200
    40.2 +++ b/test/src/KeyringImportTest.cc	Fri Jul 31 17:59:21 2020 +0200
    40.3 @@ -58,7 +58,7 @@
    40.4                  ASSERT_NE(engine, nullptr);
    40.5  
    40.6                  // Ok, let's initialize test directories etc.
    40.7 -                engine->prep(NULL, NULL, init_files);
    40.8 +                engine->prep(NULL, NULL, NULL, init_files);
    40.9  
   40.10                  // Ok, try to start this bugger.
   40.11                  engine->start();
    41.1 --- a/test/src/LeastColorGroupTest.cc	Fri Jul 31 15:11:36 2020 +0200
    41.2 +++ b/test/src/LeastColorGroupTest.cc	Fri Jul 31 17:59:21 2020 +0200
    41.3 @@ -58,7 +58,7 @@
    41.4                  ASSERT_NE(engine, nullptr);
    41.5  
    41.6                  // Ok, let's initialize test directories etc.
    41.7 -                engine->prep(NULL, NULL, init_files);
    41.8 +                engine->prep(NULL, NULL, NULL, init_files);
    41.9  
   41.10                  // Ok, try to start this bugger.
   41.11                  engine->start();
    42.1 --- a/test/src/LeastCommonDenomColorTest.cc	Fri Jul 31 15:11:36 2020 +0200
    42.2 +++ b/test/src/LeastCommonDenomColorTest.cc	Fri Jul 31 17:59:21 2020 +0200
    42.3 @@ -58,7 +58,7 @@
    42.4                  ASSERT_NE(engine, nullptr);
    42.5  
    42.6                  // Ok, let's initialize test directories etc.
    42.7 -                engine->prep(NULL, NULL, init_files);
    42.8 +                engine->prep(NULL, NULL, NULL, init_files);
    42.9  
   42.10                  // Ok, try to start this bugger.
   42.11                  engine->start();
    43.1 --- a/test/src/LiteralFilenameTest.cc	Fri Jul 31 15:11:36 2020 +0200
    43.2 +++ b/test/src/LiteralFilenameTest.cc	Fri Jul 31 17:59:21 2020 +0200
    43.3 @@ -53,7 +53,7 @@
    43.4                  ASSERT_NE(engine, nullptr);
    43.5  
    43.6                  // Ok, let's initialize test directories etc.
    43.7 -                engine->prep(NULL, NULL, init_files);
    43.8 +                engine->prep(NULL, NULL, NULL, init_files);
    43.9  
   43.10                  // Ok, try to start this bugger.
   43.11                  engine->start();
    44.1 --- a/test/src/LookupTest.cc	Fri Jul 31 15:11:36 2020 +0200
    44.2 +++ b/test/src/LookupTest.cc	Fri Jul 31 17:59:21 2020 +0200
    44.3 @@ -57,7 +57,7 @@
    44.4                  ASSERT_NE(engine, nullptr);
    44.5  
    44.6                  // Ok, let's initialize test directories etc.
    44.7 -                engine->prep(NULL, NULL, init_files);
    44.8 +                engine->prep(NULL, NULL, NULL, init_files);
    44.9  
   44.10                  // Ok, try to start this bugger.
   44.11                  engine->start();
    45.1 --- a/test/src/LotsOfKeysTest.cc	Fri Jul 31 15:11:36 2020 +0200
    45.2 +++ b/test/src/LotsOfKeysTest.cc	Fri Jul 31 17:59:21 2020 +0200
    45.3 @@ -168,7 +168,7 @@
    45.4                  ASSERT_NE(engine, nullptr);
    45.5  
    45.6                  // Ok, let's initialize test directories etc.
    45.7 -                engine->prep(NULL, NULL, init_files);
    45.8 +                engine->prep(NULL, NULL, NULL, init_files);
    45.9  
   45.10                  // Ok, try to start this bugger.
   45.11                  engine->start();
    46.1 --- a/test/src/MapAsn1Test.cc	Fri Jul 31 15:11:36 2020 +0200
    46.2 +++ b/test/src/MapAsn1Test.cc	Fri Jul 31 17:59:21 2020 +0200
    46.3 @@ -54,7 +54,7 @@
    46.4                  ASSERT_NE(engine, nullptr);
    46.5  
    46.6                  // Ok, let's initialize test directories etc.
    46.7 -                engine->prep(NULL, NULL, init_files);
    46.8 +                engine->prep(NULL, NULL, NULL, init_files);
    46.9  
   46.10                  // Ok, try to start this bugger.
   46.11                  engine->start();
    47.1 --- a/test/src/Message2_1Test.cc	Fri Jul 31 15:11:36 2020 +0200
    47.2 +++ b/test/src/Message2_1Test.cc	Fri Jul 31 17:59:21 2020 +0200
    47.3 @@ -52,7 +52,7 @@
    47.4                  ASSERT_NE(engine, nullptr);
    47.5  
    47.6                  // Ok, let's initialize test directories etc.
    47.7 -                engine->prep(NULL, NULL, init_files);
    47.8 +                engine->prep(NULL, NULL, NULL, init_files);
    47.9  
   47.10                  // Ok, try to start this bugger.
   47.11                  engine->start();
    48.1 --- a/test/src/MessageApiTest.cc	Fri Jul 31 15:11:36 2020 +0200
    48.2 +++ b/test/src/MessageApiTest.cc	Fri Jul 31 17:59:21 2020 +0200
    48.3 @@ -58,7 +58,7 @@
    48.4                  ASSERT_NE(engine, nullptr);
    48.5  
    48.6                  // Ok, let's initialize test directories etc.
    48.7 -                engine->prep(NULL, NULL, init_files);
    48.8 +                engine->prep(NULL, NULL, NULL, init_files);
    48.9  
   48.10                  // Ok, try to start this bugger.
   48.11                  engine->start();
    49.1 --- a/test/src/MessageNullFromTest.cc	Fri Jul 31 15:11:36 2020 +0200
    49.2 +++ b/test/src/MessageNullFromTest.cc	Fri Jul 31 17:59:21 2020 +0200
    49.3 @@ -70,7 +70,7 @@
    49.4                  ASSERT_NE(engine, nullptr);
    49.5  
    49.6                  // Ok, let's initialize test directories etc.
    49.7 -                engine->prep(NULL, NULL, init_files);
    49.8 +                engine->prep(NULL, NULL, NULL, init_files);
    49.9  
   49.10                  // Ok, try to start this bugger.
   49.11                  engine->start();
    50.1 --- a/test/src/MessageTwoPointOhTest.cc	Fri Jul 31 15:11:36 2020 +0200
    50.2 +++ b/test/src/MessageTwoPointOhTest.cc	Fri Jul 31 17:59:21 2020 +0200
    50.3 @@ -59,7 +59,7 @@
    50.4                  ASSERT_NE(engine, nullptr);
    50.5  
    50.6                  // Ok, let's initialize test directories etc.
    50.7 -                engine->prep(NULL, NULL, init_files);
    50.8 +                engine->prep(NULL, NULL, NULL, init_files);
    50.9  
   50.10                  // Ok, try to start this bugger.
   50.11                  engine->start();
    51.1 --- a/test/src/MimeTest.cc	Fri Jul 31 15:11:36 2020 +0200
    51.2 +++ b/test/src/MimeTest.cc	Fri Jul 31 17:59:21 2020 +0200
    51.3 @@ -57,7 +57,7 @@
    51.4                  ASSERT_NE(engine, nullptr);
    51.5  
    51.6                  // Ok, let's initialize test directories etc.
    51.7 -                engine->prep(NULL, NULL, init_files);
    51.8 +                engine->prep(NULL, NULL, NULL, init_files);
    51.9  
   51.10                  // Ok, try to start this bugger.
   51.11                  engine->start();
    52.1 --- a/test/src/NoOwnIdentWritesOnDecryptTest.cc	Fri Jul 31 15:11:36 2020 +0200
    52.2 +++ b/test/src/NoOwnIdentWritesOnDecryptTest.cc	Fri Jul 31 17:59:21 2020 +0200
    52.3 @@ -57,7 +57,7 @@
    52.4                  ASSERT_NE(engine, nullptr);
    52.5  
    52.6                  // Ok, let's initialize test directories etc.
    52.7 -                engine->prep(NULL, NULL, init_files);
    52.8 +                engine->prep(NULL, NULL, NULL, init_files);
    52.9  
   52.10                  // Ok, try to start this bugger.
   52.11                  engine->start();
   52.12 @@ -131,7 +131,7 @@
   52.13      ASSERT_NE(engine, nullptr);
   52.14  
   52.15      // Ok, let's initialize test directories etc.
   52.16 -    engine->prep(NULL, NULL, init_files);
   52.17 +    engine->prep(NULL, NULL, NULL, init_files);
   52.18  
   52.19      // Ok, try to start this bugger.
   52.20      engine->start();
   52.21 @@ -196,7 +196,7 @@
   52.22      ASSERT_NE(engine, nullptr);
   52.23  
   52.24      // Ok, let's initialize test directories etc.
   52.25 -    engine->prep(NULL, NULL, init_files);
   52.26 +    engine->prep(NULL, NULL, NULL, init_files);
   52.27  
   52.28      // Ok, try to start this bugger.
   52.29      engine->start();
    53.1 --- a/test/src/OwnIdentitiesRetrieveTest.cc	Fri Jul 31 15:11:36 2020 +0200
    53.2 +++ b/test/src/OwnIdentitiesRetrieveTest.cc	Fri Jul 31 17:59:21 2020 +0200
    53.3 @@ -52,7 +52,7 @@
    53.4                  ASSERT_NE(engine, nullptr);
    53.5  
    53.6                  // Ok, let's initialize test directories etc.
    53.7 -                engine->prep(NULL, NULL, init_files);
    53.8 +                engine->prep(NULL, NULL, NULL, init_files);
    53.9  
   53.10                  // Ok, try to start this bugger.
   53.11                  engine->start();
    54.1 --- a/test/src/OwnKeysRetrieveTest.cc	Fri Jul 31 15:11:36 2020 +0200
    54.2 +++ b/test/src/OwnKeysRetrieveTest.cc	Fri Jul 31 17:59:21 2020 +0200
    54.3 @@ -52,7 +52,7 @@
    54.4                  ASSERT_NE(engine, nullptr);
    54.5  
    54.6                  // Ok, let's initialize test directories etc.
    54.7 -                engine->prep(NULL, NULL, init_files);
    54.8 +                engine->prep(NULL, NULL, NULL, init_files);
    54.9  
   54.10                  // Ok, try to start this bugger.
   54.11                  engine->start();
    55.1 --- a/test/src/PassphraseTest.cc	Fri Jul 31 15:11:36 2020 +0200
    55.2 +++ b/test/src/PassphraseTest.cc	Fri Jul 31 17:59:21 2020 +0200
    55.3 @@ -49,7 +49,7 @@
    55.4                  ASSERT_NE(engine, nullptr);
    55.5  
    55.6                  // Ok, let's initialize test directories etc.
    55.7 -                engine->prep(NULL, NULL, init_files);
    55.8 +                engine->prep(NULL, NULL, NULL, init_files);
    55.9  
   55.10                  // Ok, try to start this bugger.
   55.11                  engine->start();
    56.1 --- a/test/src/PepSubjectReceivedTest.cc	Fri Jul 31 15:11:36 2020 +0200
    56.2 +++ b/test/src/PepSubjectReceivedTest.cc	Fri Jul 31 17:59:21 2020 +0200
    56.3 @@ -58,7 +58,7 @@
    56.4                  ASSERT_NE(engine, nullptr);
    56.5  
    56.6                  // Ok, let's initialize test directories etc.
    56.7 -                engine->prep(NULL, NULL, init_files);
    56.8 +                engine->prep(NULL, NULL, NULL, init_files);
    56.9  
   56.10                  // Ok, try to start this bugger.
   56.11                  engine->start();
    57.1 --- a/test/src/PgpBinaryTest.cc	Fri Jul 31 15:11:36 2020 +0200
    57.2 +++ b/test/src/PgpBinaryTest.cc	Fri Jul 31 17:59:21 2020 +0200
    57.3 @@ -53,7 +53,7 @@
    57.4                  ASSERT_NE(engine, nullptr);
    57.5  
    57.6                  // Ok, let's initialize test directories etc.
    57.7 -                engine->prep(NULL, NULL, init_files);
    57.8 +                engine->prep(NULL, NULL, NULL, init_files);
    57.9  
   57.10                  // Ok, try to start this bugger.
   57.11                  engine->start();
    58.1 --- a/test/src/PgpListKeysTest.cc	Fri Jul 31 15:11:36 2020 +0200
    58.2 +++ b/test/src/PgpListKeysTest.cc	Fri Jul 31 17:59:21 2020 +0200
    58.3 @@ -55,7 +55,7 @@
    58.4                  ASSERT_NE(engine, nullptr);
    58.5  
    58.6                  // Ok, let's initialize test directories etc.
    58.7 -                engine->prep(NULL, NULL, init_files);
    58.8 +                engine->prep(NULL, NULL, NULL, init_files);
    58.9  
   58.10                  // Ok, try to start this bugger.
   58.11                  engine->start();
    59.1 --- a/test/src/Quick11to12Test.cc	Fri Jul 31 15:11:36 2020 +0200
    59.2 +++ b/test/src/Quick11to12Test.cc	Fri Jul 31 17:59:21 2020 +0200
    59.3 @@ -51,7 +51,7 @@
    59.4                  ASSERT_NE(engine, nullptr);
    59.5  
    59.6                  // Ok, let's initialize test directories etc.
    59.7 -                engine->prep(NULL, NULL, init_files);
    59.8 +                engine->prep(NULL, NULL, NULL, init_files);
    59.9  
   59.10                  // Ok, try to start this bugger.
   59.11                  engine->start();
    60.1 --- a/test/src/ReencryptPlusExtraKeysTest.cc	Fri Jul 31 15:11:36 2020 +0200
    60.2 +++ b/test/src/ReencryptPlusExtraKeysTest.cc	Fri Jul 31 17:59:21 2020 +0200
    60.3 @@ -58,7 +58,7 @@
    60.4                  ASSERT_NE(engine, nullptr);
    60.5  
    60.6                  // Ok, let's initialize test directories etc.
    60.7 -                engine->prep(NULL, NULL, init_files);
    60.8 +                engine->prep(NULL, NULL, NULL, init_files);
    60.9  
   60.10                  // Ok, try to start this bugger.
   60.11                  engine->start();
    61.1 --- a/test/src/RevocationTest.cc	Fri Jul 31 15:11:36 2020 +0200
    61.2 +++ b/test/src/RevocationTest.cc	Fri Jul 31 17:59:21 2020 +0200
    61.3 @@ -57,7 +57,7 @@
    61.4                  ASSERT_NE(engine, nullptr);
    61.5  
    61.6                  // Ok, let's initialize test directories etc.
    61.7 -                engine->prep(NULL, NULL, init_files);
    61.8 +                engine->prep(NULL, NULL, NULL, init_files);
    61.9  
   61.10                  // Ok, try to start this bugger.
   61.11                  engine->start();
    62.1 --- a/test/src/RevokeRegenAttachTest.cc	Fri Jul 31 15:11:36 2020 +0200
    62.2 +++ b/test/src/RevokeRegenAttachTest.cc	Fri Jul 31 17:59:21 2020 +0200
    62.3 @@ -61,7 +61,7 @@
    62.4                  ASSERT_NE(engine, nullptr);
    62.5  
    62.6                  // Ok, let's initialize test directories etc.
    62.7 -                engine->prep(NULL, NULL, init_files);
    62.8 +                engine->prep(NULL, NULL, NULL, init_files);
    62.9  
   62.10                  // Ok, try to start this bugger.
   62.11                  engine->start();
    63.1 --- a/test/src/SenderFPRTest.cc	Fri Jul 31 15:11:36 2020 +0200
    63.2 +++ b/test/src/SenderFPRTest.cc	Fri Jul 31 17:59:21 2020 +0200
    63.3 @@ -53,7 +53,7 @@
    63.4                  ASSERT_NE(engine, nullptr);
    63.5  
    63.6                  // Ok, let's initialize test directories etc.
    63.7 -                engine->prep(NULL, NULL, init_files);
    63.8 +                engine->prep(NULL, NULL, NULL, init_files);
    63.9  
   63.10                  // Ok, try to start this bugger.
   63.11                  engine->start();
    64.1 --- a/test/src/SequenceTest.cc	Fri Jul 31 15:11:36 2020 +0200
    64.2 +++ b/test/src/SequenceTest.cc	Fri Jul 31 17:59:21 2020 +0200
    64.3 @@ -52,7 +52,7 @@
    64.4                  ASSERT_NE(engine, nullptr);
    64.5  
    64.6                  // Ok, let's initialize test directories etc.
    64.7 -                engine->prep(NULL, NULL, init_files);
    64.8 +                engine->prep(NULL, NULL, NULL, init_files);
    64.9  
   64.10                  // Ok, try to start this bugger.
   64.11                  engine->start();
    65.1 --- a/test/src/SignOnlyTest.cc	Fri Jul 31 15:11:36 2020 +0200
    65.2 +++ b/test/src/SignOnlyTest.cc	Fri Jul 31 17:59:21 2020 +0200
    65.3 @@ -53,7 +53,7 @@
    65.4                  ASSERT_NE(engine, nullptr);
    65.5  
    65.6                  // Ok, let's initialize test directories etc.
    65.7 -                engine->prep(NULL, NULL, init_files);
    65.8 +                engine->prep(NULL, NULL, NULL, init_files);
    65.9  
   65.10                  // Ok, try to start this bugger.
   65.11                  engine->start();
    66.1 --- a/test/src/SimpleBodyNotAltTest.cc	Fri Jul 31 15:11:36 2020 +0200
    66.2 +++ b/test/src/SimpleBodyNotAltTest.cc	Fri Jul 31 17:59:21 2020 +0200
    66.3 @@ -55,7 +55,7 @@
    66.4                  ASSERT_NE(engine, nullptr);
    66.5  
    66.6                  // Ok, let's initialize test directories etc.
    66.7 -                engine->prep(NULL, NULL, init_files);
    66.8 +                engine->prep(NULL, NULL, NULL, init_files);
    66.9  
   66.10                  // Ok, try to start this bugger.
   66.11                  engine->start();
    67.1 --- a/test/src/SubkeyRatingEvalTest.cc	Fri Jul 31 15:11:36 2020 +0200
    67.2 +++ b/test/src/SubkeyRatingEvalTest.cc	Fri Jul 31 17:59:21 2020 +0200
    67.3 @@ -53,7 +53,7 @@
    67.4                  ASSERT_NE(engine, nullptr);
    67.5  
    67.6                  // Ok, let's initialize test directories etc.
    67.7 -                engine->prep(NULL, NULL, init_files);
    67.8 +                engine->prep(NULL, NULL, NULL, init_files);
    67.9  
   67.10                  // Ok, try to start this bugger.
   67.11                  engine->start();
    68.1 --- a/test/src/SyncTest.cc	Fri Jul 31 15:11:36 2020 +0200
    68.2 +++ b/test/src/SyncTest.cc	Fri Jul 31 17:59:21 2020 +0200
    68.3 @@ -226,7 +226,7 @@
    68.4                  ASSERT_NE(engine, nullptr);
    68.5  
    68.6                  // Ok, let's initialize test directories etc.
    68.7 -                engine->prep(NULL, NULL, init_files);
    68.8 +                engine->prep(NULL, NULL, NULL, init_files);
    68.9  
   68.10                  // Ok, try to start this bugger. Is this totally irrelevant for this case??
   68.11                  engine->start();
    69.1 --- a/test/src/TrustManipulationTest.cc	Fri Jul 31 15:11:36 2020 +0200
    69.2 +++ b/test/src/TrustManipulationTest.cc	Fri Jul 31 17:59:21 2020 +0200
    69.3 @@ -56,7 +56,7 @@
    69.4                  ASSERT_NE(engine, nullptr);
    69.5  
    69.6                  // Ok, let's initialize test directories etc.
    69.7 -                engine->prep(NULL, NULL, init_files);
    69.8 +                engine->prep(NULL, NULL, NULL, init_files);
    69.9  
   69.10                  // Ok, try to start this bugger.
   69.11                  engine->start();
    70.1 --- a/test/src/TrustwordsTest.cc	Fri Jul 31 15:11:36 2020 +0200
    70.2 +++ b/test/src/TrustwordsTest.cc	Fri Jul 31 17:59:21 2020 +0200
    70.3 @@ -51,7 +51,7 @@
    70.4                  ASSERT_NE(engine, nullptr);
    70.5  
    70.6                  // Ok, let's initialize test directories etc.
    70.7 -                engine->prep(NULL, NULL, init_files);
    70.8 +                engine->prep(NULL, NULL, NULL, init_files);
    70.9  
   70.10                  // Ok, try to start this bugger.
   70.11                  engine->start();
    71.1 --- a/test/src/URIAddressTest.cc	Fri Jul 31 15:11:36 2020 +0200
    71.2 +++ b/test/src/URIAddressTest.cc	Fri Jul 31 17:59:21 2020 +0200
    71.3 @@ -56,7 +56,7 @@
    71.4                  ASSERT_NE(engine, nullptr);
    71.5  
    71.6                  // Ok, let's initialize test directories etc.
    71.7 -                engine->prep(NULL, NULL, init_files);
    71.8 +                engine->prep(NULL, NULL, NULL, init_files);
    71.9  
   71.10                  // Ok, try to start this bugger.
   71.11                  engine->start();
    72.1 --- a/test/src/UnencryptedPepMailTest.cc	Fri Jul 31 15:11:36 2020 +0200
    72.2 +++ b/test/src/UnencryptedPepMailTest.cc	Fri Jul 31 17:59:21 2020 +0200
    72.3 @@ -50,7 +50,7 @@
    72.4                  ASSERT_NE(engine, nullptr);
    72.5  
    72.6                  // Ok, let's initialize test directories etc.
    72.7 -                engine->prep(NULL, NULL, init_files);
    72.8 +                engine->prep(NULL, NULL, NULL, init_files);
    72.9  
   72.10                  // Ok, try to start this bugger.
   72.11                  engine->start();
    73.1 --- a/test/src/UpdateIdAndMyselfTest.cc	Fri Jul 31 15:11:36 2020 +0200
    73.2 +++ b/test/src/UpdateIdAndMyselfTest.cc	Fri Jul 31 17:59:21 2020 +0200
    73.3 @@ -60,7 +60,7 @@
    73.4                  ASSERT_NE(engine, nullptr);
    73.5  
    73.6                  // Ok, let's initialize test directories etc.
    73.7 -                engine->prep(NULL, NULL, init_files);
    73.8 +                engine->prep(NULL, NULL, NULL, init_files);
    73.9  
   73.10                  // Ok, try to start this bugger.
   73.11                  engine->start();
    74.1 --- a/test/src/UserIDAliasTest.cc	Fri Jul 31 15:11:36 2020 +0200
    74.2 +++ b/test/src/UserIDAliasTest.cc	Fri Jul 31 17:59:21 2020 +0200
    74.3 @@ -56,7 +56,7 @@
    74.4                  ASSERT_NE(engine, nullptr);
    74.5  
    74.6                  // Ok, let's initialize test directories etc.
    74.7 -                engine->prep(NULL, NULL, init_files);
    74.8 +                engine->prep(NULL, NULL, NULL, init_files);
    74.9  
   74.10                  // Ok, try to start this bugger.
   74.11                  engine->start();
    75.1 --- a/test/src/UserIdCollisionTest.cc	Fri Jul 31 15:11:36 2020 +0200
    75.2 +++ b/test/src/UserIdCollisionTest.cc	Fri Jul 31 17:59:21 2020 +0200
    75.3 @@ -134,7 +134,7 @@
    75.4                  ASSERT_NE(engine, nullptr);
    75.5  
    75.6                  // Ok, let's initialize test directories etc.
    75.7 -                engine->prep(NULL, NULL, init_files);
    75.8 +                engine->prep(NULL, NULL, NULL, init_files);
    75.9  
   75.10                  // Ok, try to start this bugger.
   75.11                  engine->start();
    76.1 --- a/test/src/VerifyTest.cc	Fri Jul 31 15:11:36 2020 +0200
    76.2 +++ b/test/src/VerifyTest.cc	Fri Jul 31 17:59:21 2020 +0200
    76.3 @@ -53,7 +53,7 @@
    76.4                  ASSERT_NE(engine, nullptr);
    76.5  
    76.6                  // Ok, let's initialize test directories etc.
    76.7 -                engine->prep(NULL, NULL, init_files);
    76.8 +                engine->prep(NULL, NULL, NULL, init_files);
    76.9  
   76.10                  // Ok, try to start this bugger.
   76.11                  engine->start();
    77.1 --- a/test/src/test_util.cc	Fri Jul 31 15:11:36 2020 +0200
    77.2 +++ b/test/src/test_util.cc	Fri Jul 31 17:59:21 2020 +0200
    77.3 @@ -14,6 +14,7 @@
    77.4  #include <iostream>
    77.5  #include <stdexcept>
    77.6  #include <algorithm>
    77.7 +#include <vector>
    77.8  #include <stdlib.h>
    77.9  #include <sys/stat.h>
   77.10  #include <errno.h>
   77.11 @@ -483,6 +484,21 @@
   77.12      return retval;
   77.13  }
   77.14  
   77.15 +PEP_STATUS config_valid_passphrase(PEP_SESSION session, const char* fpr, std::vector<std::string> passphrases) {
   77.16 +    // Check to see if it currently works
   77.17 +    PEP_STATUS status = probe_encrypt(session, fpr);
   77.18 +    if (status == PEP_STATUS_OK || passphrases.empty())
   77.19 +        return status;
   77.20 +        
   77.21 +    for (auto && pass : passphrases) {
   77.22 +        config_passphrase(session, pass.c_str());
   77.23 +        status = probe_encrypt(session, fpr);
   77.24 +        if (status == PEP_STATUS_OK)
   77.25 +            break;
   77.26 +    }
   77.27 +    return status;
   77.28 +}
   77.29 +
   77.30  #ifndef ENIGMAIL_MAY_USE_THIS
   77.31  
   77.32  static PEP_STATUS update_identity_recip_list(PEP_SESSION session,
    78.1 --- a/test/src/test_util.h	Fri Jul 31 15:11:36 2020 +0200
    78.2 +++ b/test/src/test_util.h	Fri Jul 31 17:59:21 2020 +0200
    78.3 @@ -6,6 +6,7 @@
    78.4  #include <sys/stat.h>
    78.5  #include <ftw.h>
    78.6  #include <iostream>
    78.7 +#include <vector>
    78.8  
    78.9  #include "pEpEngine.h"
   78.10  #include "message_api.h"
   78.11 @@ -122,6 +123,8 @@
   78.12          int overflow(int c);
   78.13  };                         
   78.14                           
   78.15 +PEP_STATUS config_valid_passphrase(PEP_SESSION session, const char* fpr, std::vector<std::string> passphrases);
   78.16 +
   78.17  #ifndef ENIGMAIL_MAY_USE_THIS
   78.18  
   78.19  // MIME_decrypt_message() - decrypt a MIME message, with MIME output