Browse Source

ENGINE-781: infrastructure to test w/ callback runs on empty pass list

ENGINE-781
parent
commit
547aa4dbe6
78 changed files with 106 additions and 79 deletions
  1. +1
    -1
      test/src/AppleMailTest.cc
  2. +1
    -1
      test/src/BCCTest.cc
  3. +1
    -1
      test/src/BlacklistAcceptNewKeyTest.cc
  4. +1
    -1
      test/src/BlacklistTest.cc
  5. +1
    -1
      test/src/CaseAndDotAddressTest.cc
  6. +1
    -1
      test/src/CheckRenewedExpiredKeyTrustStatusTest.cc
  7. +1
    -1
      test/src/CleanInvalidOwnKeysTest.cc
  8. +1
    -1
      test/src/CrashdumpTest.cc
  9. +1
    -1
      test/src/DecorateTest.cc
  10. +1
    -1
      test/src/DecryptAttachPrivateKeyTrustedTest.cc
  11. +1
    -1
      test/src/DecryptAttachPrivateKeyUntrustedTest.cc
  12. +1
    -1
      test/src/DeleteKeyTest.cc
  13. +1
    -1
      test/src/ElevatedAttachmentsTest.cc
  14. +1
    -1
      test/src/EmptyLongmsgFullHtmlTest.cc
  15. +1
    -1
      test/src/EncryptAttachPrivateKeyTest.cc
  16. +1
    -1
      test/src/EncryptForIdentityTest.cc
  17. +1
    -1
      test/src/EncryptMissingPrivateKeyTest.cc
  18. +4
    -2
      test/src/Engine.cc
  19. +2
    -1
      test/src/Engine.h
  20. +1
    -1
      test/src/Engine358Test.cc
  21. +1
    -1
      test/src/Engine463Test.cc
  22. +1
    -1
      test/src/Engine514Test.cc
  23. +1
    -1
      test/src/Engine655Test.cc
  24. +1
    -1
      test/src/Engine703Test.cc
  25. +1
    -1
      test/src/Engine704Test.cc
  26. +1
    -1
      test/src/Engine715Test.cc
  27. +1
    -1
      test/src/Engine736Test.cc
  28. +1
    -1
      test/src/ExpiredSubkeyTest.cc
  29. +1
    -1
      test/src/ExportKeyTest.cc
  30. +1
    -1
      test/src/ExternalRevokeTest.cc
  31. +1
    -1
      test/src/GetKeyRatingForUserTest.cc
  32. +1
    -1
      test/src/HeaderKeyImportTest.cc
  33. +1
    -1
      test/src/I18nTest.cc
  34. +1
    -1
      test/src/IdentEncFormatTest.cc
  35. +1
    -1
      test/src/ImportKeyTest.cc
  36. +1
    -1
      test/src/KeyAttachmentTest.cc
  37. +1
    -1
      test/src/KeyManipulationTest.cc
  38. +6
    -1
      test/src/KeyResetMessageTest.cc
  39. +1
    -1
      test/src/KeyeditTest.cc
  40. +1
    -1
      test/src/KeyringImportTest.cc
  41. +1
    -1
      test/src/LeastColorGroupTest.cc
  42. +1
    -1
      test/src/LeastCommonDenomColorTest.cc
  43. +1
    -1
      test/src/LiteralFilenameTest.cc
  44. +1
    -1
      test/src/LookupTest.cc
  45. +1
    -1
      test/src/LotsOfKeysTest.cc
  46. +1
    -1
      test/src/MapAsn1Test.cc
  47. +1
    -1
      test/src/Message2_1Test.cc
  48. +1
    -1
      test/src/MessageApiTest.cc
  49. +1
    -1
      test/src/MessageNullFromTest.cc
  50. +1
    -1
      test/src/MessageTwoPointOhTest.cc
  51. +1
    -1
      test/src/MimeTest.cc
  52. +3
    -3
      test/src/NoOwnIdentWritesOnDecryptTest.cc
  53. +1
    -1
      test/src/OwnIdentitiesRetrieveTest.cc
  54. +1
    -1
      test/src/OwnKeysRetrieveTest.cc
  55. +1
    -1
      test/src/PassphraseTest.cc
  56. +1
    -1
      test/src/PepSubjectReceivedTest.cc
  57. +1
    -1
      test/src/PgpBinaryTest.cc
  58. +1
    -1
      test/src/PgpListKeysTest.cc
  59. +1
    -1
      test/src/Quick11to12Test.cc
  60. +1
    -1
      test/src/ReencryptPlusExtraKeysTest.cc
  61. +1
    -1
      test/src/RevocationTest.cc
  62. +1
    -1
      test/src/RevokeRegenAttachTest.cc
  63. +1
    -1
      test/src/SenderFPRTest.cc
  64. +1
    -1
      test/src/SequenceTest.cc
  65. +1
    -1
      test/src/SignOnlyTest.cc
  66. +1
    -1
      test/src/SimpleBodyNotAltTest.cc
  67. +1
    -1
      test/src/SubkeyRatingEvalTest.cc
  68. +1
    -1
      test/src/SyncTest.cc
  69. +1
    -1
      test/src/TrustManipulationTest.cc
  70. +1
    -1
      test/src/TrustwordsTest.cc
  71. +1
    -1
      test/src/URIAddressTest.cc
  72. +1
    -1
      test/src/UnencryptedPepMailTest.cc
  73. +1
    -1
      test/src/UpdateIdAndMyselfTest.cc
  74. +1
    -1
      test/src/UserIDAliasTest.cc
  75. +1
    -1
      test/src/UserIdCollisionTest.cc
  76. +1
    -1
      test/src/VerifyTest.cc
  77. +16
    -0
      test/src/test_util.cc
  78. +3
    -0
      test/src/test_util.h

+ 1
- 1
test/src/AppleMailTest.cc View File

@ -61,7 +61,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/BCCTest.cc View File

@ -55,7 +55,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/BlacklistAcceptNewKeyTest.cc View File

@ -58,7 +58,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/BlacklistTest.cc View File

@ -72,7 +72,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/CaseAndDotAddressTest.cc View File

@ -56,7 +56,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/CheckRenewedExpiredKeyTrustStatusTest.cc View File

@ -53,7 +53,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/CleanInvalidOwnKeysTest.cc View File

@ -51,7 +51,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/CrashdumpTest.cc View File

@ -51,7 +51,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/DecorateTest.cc View File

@ -57,7 +57,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/DecryptAttachPrivateKeyTrustedTest.cc View File

@ -59,7 +59,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/DecryptAttachPrivateKeyUntrustedTest.cc View File

@ -57,7 +57,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/DeleteKeyTest.cc View File

@ -67,7 +67,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/ElevatedAttachmentsTest.cc View File

@ -48,7 +48,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/EmptyLongmsgFullHtmlTest.cc View File

@ -52,7 +52,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/EncryptAttachPrivateKeyTest.cc View File

@ -57,7 +57,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/EncryptForIdentityTest.cc View File

@ -57,7 +57,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/EncryptMissingPrivateKeyTest.cc View File

@ -62,7 +62,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 4
- 2
test/src/Engine.cc View File

@ -32,17 +32,19 @@ Engine::Engine(string engine_home_dir) {
real_home = getenv("HOME");
cached_messageToSend = NULL;
cached_inject_sync_event = NULL;
cached_ensure_passphrase = NULL;
}
Engine::~Engine() {}
void Engine::prep(messageToSend_t mts, inject_sync_event_t ise,
void Engine::prep(messageToSend_t mts, inject_sync_event_t ise, ensure_passphrase_t ep,
std::vector<std::pair<std::string, std::string>> init_files) {
if (engine_home.empty())
throw std::runtime_error("Engine setup: BAD INITIALISATION. No test home.");
cached_messageToSend = mts;
cached_inject_sync_event = ise;
cached_ensure_passphrase = ep;
int success = 0;
struct stat dirchk;
@ -90,7 +92,7 @@ void Engine::start() {
unix_local_db(true);
PEP_STATUS status = init(&session, cached_messageToSend, cached_inject_sync_event, NULL);
PEP_STATUS status = init(&session, cached_messageToSend, cached_inject_sync_event, cached_ensure_passphrase);
assert(status == PEP_STATUS_OK);
assert(session);


+ 2
- 1
test/src/Engine.h View File

@ -14,7 +14,7 @@ class Engine {
Engine(string engine_home_dir);
virtual ~Engine();
void prep(const messageToSend_t mts, const inject_sync_event_t ise, std::vector<std::pair<std::string, std::string>> init_files);
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);
void start();
void shut_down();
@ -27,6 +27,7 @@ class Engine {
messageToSend_t cached_messageToSend;
inject_sync_event_t cached_inject_sync_event;
ensure_passphrase_t cached_ensure_passphrase;
void copy_conf_file_to_test_dir(const char* dest_path, const char* conf_orig_path, const char* conf_dest_name);
void process_file_queue(std::string dirname, std::vector<std::pair<std::string, std::string>> file_queue);


+ 1
- 1
test/src/Engine358Test.cc View File

@ -53,7 +53,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/Engine463Test.cc View File

@ -54,7 +54,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/Engine514Test.cc View File

@ -47,7 +47,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/Engine655Test.cc View File

@ -51,7 +51,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/Engine703Test.cc View File

@ -53,7 +53,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/Engine704Test.cc View File

@ -47,7 +47,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/Engine715Test.cc View File

@ -47,7 +47,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/Engine736Test.cc View File

@ -49,7 +49,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/ExpiredSubkeyTest.cc View File

@ -52,7 +52,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/ExportKeyTest.cc View File

@ -54,7 +54,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/ExternalRevokeTest.cc View File

@ -59,7 +59,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/GetKeyRatingForUserTest.cc View File

@ -54,7 +54,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/HeaderKeyImportTest.cc View File

@ -56,7 +56,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/I18nTest.cc View File

@ -52,7 +52,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/IdentEncFormatTest.cc View File

@ -47,7 +47,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/ImportKeyTest.cc View File

@ -47,7 +47,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/KeyAttachmentTest.cc View File

@ -57,7 +57,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/KeyManipulationTest.cc View File

@ -47,7 +47,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 6
- 1
test/src/KeyResetMessageTest.cc View File

@ -24,6 +24,7 @@
#include <gtest/gtest.h>
PEP_STATUS KRMT_message_send_callback(message* msg);
PEP_STATUS KRMT_ensure_passphrase_callback(PEP_SESSION session, const char* key);
static void* KRMT_fake_this;
@ -34,6 +35,7 @@ class KeyResetMessageTest : public ::testing::Test {
PEP_SESSION session;
vector<message*> m_queue;
vector<string> pass_list;
protected:
@ -87,7 +89,7 @@ class KeyResetMessageTest : public ::testing::Test {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(&KRMT_message_send_callback, NULL, init_files);
engine->prep(&KRMT_message_send_callback, NULL, &KRMT_ensure_passphrase_callback, init_files);
// Ok, try to start this bugger.
engine->start();
@ -245,6 +247,9 @@ PEP_STATUS KRMT_message_send_callback(message* msg) {
return PEP_STATUS_OK;
}
PEP_STATUS KRMT_ensure_passphrase_callback(PEP_SESSION session, const char* fpr) {
return config_valid_passphrase(session, fpr, ((KeyResetMessageTest*)KRMT_fake_this)->pass_list);
}
TEST_F(KeyResetMessageTest, check_reset_key_and_notify) {
send_setup();


+ 1
- 1
test/src/KeyeditTest.cc View File

@ -55,7 +55,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/KeyringImportTest.cc View File

@ -58,7 +58,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/LeastColorGroupTest.cc View File

@ -58,7 +58,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/LeastCommonDenomColorTest.cc View File

@ -58,7 +58,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/LiteralFilenameTest.cc View File

@ -53,7 +53,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/LookupTest.cc View File

@ -57,7 +57,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/LotsOfKeysTest.cc View File

@ -168,7 +168,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/MapAsn1Test.cc View File

@ -54,7 +54,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/Message2_1Test.cc View File

@ -52,7 +52,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/MessageApiTest.cc View File

@ -58,7 +58,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/MessageNullFromTest.cc View File

@ -70,7 +70,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/MessageTwoPointOhTest.cc View File

@ -59,7 +59,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/MimeTest.cc View File

@ -57,7 +57,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 3
- 3
test/src/NoOwnIdentWritesOnDecryptTest.cc View File

@ -57,7 +57,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();
@ -131,7 +131,7 @@ TEST_F(NoOwnIdentWritesOnDecryptTest, check_no_own_ident_writes_on_decrypt) {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();
@ -196,7 +196,7 @@ TEST_F(NoOwnIdentWritesOnDecryptTest, check_no_own_ident_writes_on_decrypt) {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/OwnIdentitiesRetrieveTest.cc View File

@ -52,7 +52,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/OwnKeysRetrieveTest.cc View File

@ -52,7 +52,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/PassphraseTest.cc View File

@ -49,7 +49,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/PepSubjectReceivedTest.cc View File

@ -58,7 +58,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/PgpBinaryTest.cc View File

@ -53,7 +53,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/PgpListKeysTest.cc View File

@ -55,7 +55,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/Quick11to12Test.cc View File

@ -51,7 +51,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/ReencryptPlusExtraKeysTest.cc View File

@ -58,7 +58,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/RevocationTest.cc View File

@ -57,7 +57,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/RevokeRegenAttachTest.cc View File

@ -61,7 +61,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/SenderFPRTest.cc View File

@ -53,7 +53,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/SequenceTest.cc View File

@ -52,7 +52,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/SignOnlyTest.cc View File

@ -53,7 +53,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/SimpleBodyNotAltTest.cc View File

@ -55,7 +55,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/SubkeyRatingEvalTest.cc View File

@ -53,7 +53,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/SyncTest.cc View File

@ -226,7 +226,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger. Is this totally irrelevant for this case??
engine->start();


+ 1
- 1
test/src/TrustManipulationTest.cc View File

@ -56,7 +56,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/TrustwordsTest.cc View File

@ -51,7 +51,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/URIAddressTest.cc View File

@ -56,7 +56,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/UnencryptedPepMailTest.cc View File

@ -50,7 +50,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/UpdateIdAndMyselfTest.cc View File

@ -60,7 +60,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/UserIDAliasTest.cc View File

@ -56,7 +56,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/UserIdCollisionTest.cc View File

@ -134,7 +134,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 1
- 1
test/src/VerifyTest.cc View File

@ -53,7 +53,7 @@ namespace {
ASSERT_NE(engine, nullptr);
// Ok, let's initialize test directories etc.
engine->prep(NULL, NULL, init_files);
engine->prep(NULL, NULL, NULL, init_files);
// Ok, try to start this bugger.
engine->start();


+ 16
- 0
test/src/test_util.cc View File

@ -14,6 +14,7 @@
#include <iostream>
#include <stdexcept>
#include <algorithm>
#include <vector>
#include <stdlib.h>
#include <sys/stat.h>
#include <errno.h>
@ -483,6 +484,21 @@ int util_delete_filepath(const char *filepath,
return retval;
}
PEP_STATUS config_valid_passphrase(PEP_SESSION session, const char* fpr, std::vector<std::string> passphrases) {
// Check to see if it currently works
PEP_STATUS status = probe_encrypt(session, fpr);
if (status == PEP_STATUS_OK || passphrases.empty())
return status;
for (auto && pass : passphrases) {
config_passphrase(session, pass.c_str());
status = probe_encrypt(session, fpr);
if (status == PEP_STATUS_OK)
break;
}
return status;
}
#ifndef ENIGMAIL_MAY_USE_THIS
static PEP_STATUS update_identity_recip_list(PEP_SESSION session,


+ 3
- 0
test/src/test_util.h View File

@ -6,6 +6,7 @@
#include <sys/stat.h>
#include <ftw.h>
#include <iostream>
#include <vector>
#include "pEpEngine.h"
#include "message_api.h"
@ -122,6 +123,8 @@ class NullBuffer : public std::streambuf {
int overflow(int c);
};
PEP_STATUS config_valid_passphrase(PEP_SESSION session, const char* fpr, std::vector<std::string> passphrases);
#ifndef ENIGMAIL_MAY_USE_THIS
// MIME_decrypt_message() - decrypt a MIME message, with MIME output


Loading…
Cancel
Save