Browse Source

transporting between threads

pEpMIME_windows
Volker Birk 3 years ago
parent
commit
f736bedfac
6 changed files with 197 additions and 196 deletions
  1. +2
    -2
      src/pEpEngine.c
  2. +4
    -4
      src/pEp_internal.h
  3. +6
    -7
      src/sync_api.c
  4. +25
    -15
      sync/gen_statemachine.ysl2
  5. +158
    -166
      test/src/SuiteMaker.cc
  6. +2
    -2
      test/src/engine_tests/SyncTests.cc

+ 2
- 2
src/pEpEngine.c View File

@ -4182,7 +4182,7 @@ DYNAMIC_API PEP_STATUS decrypt_and_verify(
filename_ptr);
if (status == PEP_DECRYPT_NO_KEY)
signal_Sync_event(session, Sync_PR_keysync, CannotDecrypt);
signal_Sync_event(session, Sync_PR_keysync, CannotDecrypt, NULL);
return status;
}
@ -4362,7 +4362,7 @@ DYNAMIC_API PEP_STATUS generate_keypair(
if (identity->fpr)
status = set_pgp_keypair(session, identity->fpr);
signal_Sync_event(session, Sync_PR_keysync, KeyGen);
signal_Sync_event(session, Sync_PR_keysync, KeyGen, NULL);
// add to known keypair DB, as this might not end up being a default
return status;


+ 4
- 4
src/pEp_internal.h View File

@ -99,12 +99,12 @@
#endif
#endif
#ifdef USE_GPG
#include "pgp_gpg_internal.h"
#if defined(USE_SEQUOIA)
#include "pgp_sequoia_internal.h"
#elif defined(USE_NETPGP)
#include "pgp_netpgp_internal.h"
#elif defined(USE_SEQUOIA)
#include "pgp_sequoia_internal.h"
#elif defined(USE_GPG)
#include "pgp_gpg_internal.h"
#endif
#include "keymanagement.h"


+ 6
- 7
src/sync_api.c View File

@ -75,20 +75,19 @@ DYNAMIC_API PEP_STATUS deliverHandshakeResult(
return PEP_ILLEGAL_VALUE;
}
free_identity_list(session->sync_state.common.own_identities);
session->sync_state.common.own_identities = NULL;
identity_list *own_identities = NULL;
if (identities_sharing && identities_sharing->ident) {
session->sync_state.common.own_identities = identity_list_dup(identities_sharing);
if (!session->sync_state.common.own_identities)
status = PEP_OUT_OF_MEMORY;
own_identities = identity_list_dup(identities_sharing);
if (!own_identities)
return PEP_OUT_OF_MEMORY;
}
else {
status = own_identities_retrieve(session, &session->sync_state.common.own_identities);
status = own_identities_retrieve(session, &own_identities);
}
if (!status)
status = signal_Sync_event(session, Sync_PR_keysync, event);
status = signal_Sync_event(session, Sync_PR_keysync, event, own_identities);
return status;
}


+ 25
- 15
sync/gen_statemachine.ysl2 View File

@ -39,6 +39,9 @@ tstylesheet {
// transport data
pEp_identity *from;
char *signature_fpr;
// identities to sync
identity_list *own_identities;
} «@name»_event_t;
@ -114,6 +117,7 @@ tstylesheet {
void free_«@name»_event(«@name»_event_t *ev)
{
if (ev) {
free_identity_list(ev->own_identities);
free_«@name»_message(ev->msg);
free_identity(ev->from);
free(ev->signature_fpr);
@ -190,11 +194,13 @@ tstylesheet {
// API being used by the engine internally
// call this if you need to signal an external event
// caveat: the ownership of own_identities goes to the callee
PEP_STATUS signal_«@name»_event(
PEP_SESSION session,
«@name»_PR fsm,
int event
int event,
identity_list *own_identities
);
// call this if you are a transport and are receiving
@ -268,7 +274,8 @@ tstylesheet {
PEP_STATUS signal_«@name»_event(
PEP_SESSION session,
«@name»_PR fsm,
int event
int event,
identity_list *own_identities
)
{
«@name»_t *msg = NULL;
@ -301,6 +308,8 @@ tstylesheet {
goto the_end;
}
ev->own_identities = own_identities;
int result = session->inject_«yml:lcase(@name)»_event(ev,
session->«yml:lcase(@name)»_management);
if (result) {
@ -661,22 +670,23 @@ tstylesheet {
// update transport data
if (ev->from) {
free_identity(session->sync_state.common.from);
session->sync_state.common.from = identity_dup(ev->from);
if (!session->sync_state.common.from) {
status = PEP_OUT_OF_MEMORY;
goto the_end;
}
free_identity(session->«yml:lcase(@name)»_state.common.from);
session->«yml:lcase(@name)»_state.common.from = ev->from;
ev->from = NULL;
}
if (ev->signature_fpr) {
free(session->sync_state.common.signature_fpr);
session->sync_state.common.signature_fpr = strdup(ev->signature_fpr);
assert(session->sync_state.common.signature_fpr);
if (!session->sync_state.common.signature_fpr) {
status = PEP_OUT_OF_MEMORY;
goto the_end;
}
free(session->«yml:lcase(@name)»_state.common.signature_fpr);
session->«yml:lcase(@name)»_state.common.signature_fpr = ev->signature_fpr;
ev->signature_fpr = NULL;
}
// update own identities
if (ev->own_identities && ev->own_identities->ident) {
free_identity_list(session->«yml:lcase(@name)»_state.common.own_identities);
session->«yml:lcase(@name)»_state.common.own_identities = ev->own_identities;
ev->own_identities = NULL;
}
status = «@name»_driver(session, fsm, event);


+ 158
- 166
test/src/SuiteMaker.cc View File

@ -12,227 +12,219 @@
#include "SuiteMaker.h"
// Begin where we generate stuff
#include "EnterLeaveDeviceGroupTests.h"
#include "LeastCommonDenomColorTests.h"
#include "PgpBinaryTests.h"
#include "I18nTests.h"
#include "TrustManipulationTests.h"
#include "KeyResetMessageTests.h"
#include "SyncTests.h"
#include "MimeTests.h"
#include "BlacklistTests.h"
#include "OwnIdentitiesRetrieveTests.h"
#include "ExpiredSubkeyTests.h"
#include "UserIdCollisionTests.h"
#include "Engine463Tests.h"
#include "BloblistTests.h"
#include "NewUpdateIdAndMyselfTests.h"
#include "NoOwnIdentWritesOnDecryptTests.h"
#include "I18nTests.h"
#include "IdentityListTests.h"
#include "PgpBinaryTests.h"
#include "SubkeyRatingEvalTests.h"
#include "MessageNullFromTests.h"
#include "LeastCommonDenomColorTests.h"
#include "StringlistTests.h"
#include "PgpListKeysTests.h"
#include "MessageApiTests.h"
#include "EncryptMissingPrivateKeyTests.h"
#include "CaseAndDotAddressTests.h"
#include "DecryptAttachPrivateKeyTrustedTests.h"
#include "NetPGPPlaygroundTests.h"
#include "UserIDAliasTests.h"
#include "EnterLeaveDeviceGroupTests.h"
#include "SignOnlyTests.h"
#include "BCCTests.h"
#include "Engine358Tests.h"
#include "BlacklistAcceptNewKeyTests.h"
#include "EncryptForIdentityTests.h"
#include "LeastColorGroupTests.h"
#include "MessageNullFromTests.h"
#include "DecryptAttachPrivateKeyUntrustedTests.h"
#include "BCCTests.h"
#include "StringpairListTests.h"
#include "BlacklistTests.h"
#include "RevokeRegenAttachTests.h"
#include "PepSubjectReceivedTests.h"
#include "SequenceTests.h"
#include "HeaderKeyImportTests.h"
#include "EncryptAttachPrivateKeyTests.h"
#include "ExpiredSubkeyTests.h"
#include "ExternalRevokeTests.h"
#include "KeyeditTests.h"
#include "LeastColorGroupTests.h"
#include "DecryptAttachPrivateKeyTrustedTests.h"
#include "CheckRenewedExpiredKeyTrustStatusTests.h"
#include "TrustwordsTests.h"
#include "Engine358Tests.h"
#include "ReturnMistrustFprTests.h"
#include "DecorateTests.h"
#include "EncryptMissingPrivateKeyTests.h"
#include "SignOnlyTests.h"
#include "KeyeditTests.h"
#include "IdentityListTests.h"
#include "ReencryptPlusExtraKeysTests.h"
#include "Engine463Tests.h"
#include "SubkeyRatingEvalTests.h"
#include "NoOwnIdentWritesOnDecryptTests.h"
#include "SimpleBodyNotAltTests.h"
#include "AppleMailTests.h"
#include "ReencryptPlusExtraKeysTests.h"
#include "MapAsn1Tests.h"
#include "DecorateTests.h"
#include "MessageTwoPointOhTests.h"
#include "HeaderKeyImportTests.h"
#include "SequenceTests.h"
#include "PgpListKeysTests.h"
#include "OwnIdentitiesRetrieveTests.h"
#include "NewUpdateIdAndMyselfTests.h"
#include "ExternalRevokeTests.h"
#include "CrashdumpTests.h"
#include "MessageApiTests.h"
#include "BloblistTests.h"
#include "RevokeRegenAttachTests.h"
#include "UserIDAliasTests.h"
#include "StringlistTests.h"
#include "StringpairListTests.h"
#include "EncryptForIdentityTests.h"
#include "KeyResetMessageTests.h"
#include "KeyAttachmentTests.h"
#include "PepSubjectReceivedTests.h"
#include "MapAsn1Tests.h"
#include "TrustManipulationTests.h"
#include "SyncTests.h"
#include "AppleMailTests.h"
const char* SuiteMaker::all_suites[] = {
"EnterLeaveDeviceGroupTests",
"LeastCommonDenomColorTests",
"PgpBinaryTests",
"I18nTests",
"TrustManipulationTests",
"KeyResetMessageTests",
"SyncTests",
"MimeTests",
"BlacklistTests",
"OwnIdentitiesRetrieveTests",
"ExpiredSubkeyTests",
"UserIdCollisionTests",
"Engine463Tests",
"BloblistTests",
"NewUpdateIdAndMyselfTests",
"NoOwnIdentWritesOnDecryptTests",
"I18nTests",
"IdentityListTests",
"PgpBinaryTests",
"SubkeyRatingEvalTests",
"MessageNullFromTests",
"LeastCommonDenomColorTests",
"StringlistTests",
"PgpListKeysTests",
"MessageApiTests",
"EncryptMissingPrivateKeyTests",
"CaseAndDotAddressTests",
"DecryptAttachPrivateKeyTrustedTests",
"NetPGPPlaygroundTests",
"UserIDAliasTests",
"EnterLeaveDeviceGroupTests",
"SignOnlyTests",
"BCCTests",
"Engine358Tests",
"BlacklistAcceptNewKeyTests",
"EncryptForIdentityTests",
"LeastColorGroupTests",
"MessageNullFromTests",
"DecryptAttachPrivateKeyUntrustedTests",
"BCCTests",
"StringpairListTests",
"BlacklistTests",
"RevokeRegenAttachTests",
"PepSubjectReceivedTests",
"SequenceTests",
"HeaderKeyImportTests",
"EncryptAttachPrivateKeyTests",
"ExpiredSubkeyTests",
"ExternalRevokeTests",
"KeyeditTests",
"LeastColorGroupTests",
"DecryptAttachPrivateKeyTrustedTests",
"CheckRenewedExpiredKeyTrustStatusTests",
"TrustwordsTests",
"Engine358Tests",
"ReturnMistrustFprTests",
"DecorateTests",
"EncryptMissingPrivateKeyTests",
"SignOnlyTests",
"KeyeditTests",
"IdentityListTests",
"ReencryptPlusExtraKeysTests",
"Engine463Tests",
"SubkeyRatingEvalTests",
"NoOwnIdentWritesOnDecryptTests",
"SimpleBodyNotAltTests",
"AppleMailTests",
"ReencryptPlusExtraKeysTests",
"MapAsn1Tests",
"DecorateTests",
"MessageTwoPointOhTests",
"HeaderKeyImportTests",
"SequenceTests",
"PgpListKeysTests",
"OwnIdentitiesRetrieveTests",
"NewUpdateIdAndMyselfTests",
"ExternalRevokeTests",
"CrashdumpTests",
"MessageApiTests",
"BloblistTests",
"RevokeRegenAttachTests",
"UserIDAliasTests",
"StringlistTests",
"StringpairListTests",
"EncryptForIdentityTests",
"KeyResetMessageTests",
"KeyAttachmentTests",
"PepSubjectReceivedTests",
"MapAsn1Tests",
"TrustManipulationTests",
"SyncTests",
"AppleMailTests",
};
// This file is generated, so magic constants are ok.
int SuiteMaker::num_suites = 53;
int SuiteMaker::num_suites = 51;
void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
if (strcmp(test_class_name, "EnterLeaveDeviceGroupTests") == 0)
*test_suite = new EnterLeaveDeviceGroupTests(test_class_name, test_home);
else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
*test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
*test_suite = new PgpBinaryTests(test_class_name, test_home);
else if (strcmp(test_class_name, "I18nTests") == 0)
*test_suite = new I18nTests(test_class_name, test_home);
else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
*test_suite = new TrustManipulationTests(test_class_name, test_home);
else if (strcmp(test_class_name, "KeyResetMessageTests") == 0)
*test_suite = new KeyResetMessageTests(test_class_name, test_home);
else if (strcmp(test_class_name, "SyncTests") == 0)
*test_suite = new SyncTests(test_class_name, test_home);
else if (strcmp(test_class_name, "MimeTests") == 0)
if (strcmp(test_class_name, "MimeTests") == 0)
*test_suite = new MimeTests(test_class_name, test_home);
else if (strcmp(test_class_name, "BlacklistTests") == 0)
*test_suite = new BlacklistTests(test_class_name, test_home);
else if (strcmp(test_class_name, "OwnIdentitiesRetrieveTests") == 0)
*test_suite = new OwnIdentitiesRetrieveTests(test_class_name, test_home);
else if (strcmp(test_class_name, "ExpiredSubkeyTests") == 0)
*test_suite = new ExpiredSubkeyTests(test_class_name, test_home);
else if (strcmp(test_class_name, "UserIdCollisionTests") == 0)
*test_suite = new UserIdCollisionTests(test_class_name, test_home);
else if (strcmp(test_class_name, "Engine463Tests") == 0)
*test_suite = new Engine463Tests(test_class_name, test_home);
else if (strcmp(test_class_name, "BloblistTests") == 0)
*test_suite = new BloblistTests(test_class_name, test_home);
else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
*test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
else if (strcmp(test_class_name, "NoOwnIdentWritesOnDecryptTests") == 0)
*test_suite = new NoOwnIdentWritesOnDecryptTests(test_class_name, test_home);
else if (strcmp(test_class_name, "I18nTests") == 0)
*test_suite = new I18nTests(test_class_name, test_home);
else if (strcmp(test_class_name, "IdentityListTests") == 0)
*test_suite = new IdentityListTests(test_class_name, test_home);
else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
*test_suite = new PgpBinaryTests(test_class_name, test_home);
else if (strcmp(test_class_name, "SubkeyRatingEvalTests") == 0)
*test_suite = new SubkeyRatingEvalTests(test_class_name, test_home);
else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
*test_suite = new MessageNullFromTests(test_class_name, test_home);
else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
*test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
else if (strcmp(test_class_name, "StringlistTests") == 0)
*test_suite = new StringlistTests(test_class_name, test_home);
else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
*test_suite = new PgpListKeysTests(test_class_name, test_home);
else if (strcmp(test_class_name, "MessageApiTests") == 0)
*test_suite = new MessageApiTests(test_class_name, test_home);
else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
*test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
*test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
*test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
else if (strcmp(test_class_name, "NetPGPPlaygroundTests") == 0)
*test_suite = new NetPGPPlaygroundTests(test_class_name, test_home);
else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
*test_suite = new UserIDAliasTests(test_class_name, test_home);
else if (strcmp(test_class_name, "EnterLeaveDeviceGroupTests") == 0)
*test_suite = new EnterLeaveDeviceGroupTests(test_class_name, test_home);
else if (strcmp(test_class_name, "SignOnlyTests") == 0)
*test_suite = new SignOnlyTests(test_class_name, test_home);
else if (strcmp(test_class_name, "BCCTests") == 0)
*test_suite = new BCCTests(test_class_name, test_home);
else if (strcmp(test_class_name, "Engine358Tests") == 0)
*test_suite = new Engine358Tests(test_class_name, test_home);
else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
*test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
*test_suite = new EncryptForIdentityTests(test_class_name, test_home);
else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
*test_suite = new LeastColorGroupTests(test_class_name, test_home);
else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
*test_suite = new MessageNullFromTests(test_class_name, test_home);
else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
*test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
else if (strcmp(test_class_name, "BCCTests") == 0)
*test_suite = new BCCTests(test_class_name, test_home);
else if (strcmp(test_class_name, "StringpairListTests") == 0)
*test_suite = new StringpairListTests(test_class_name, test_home);
else if (strcmp(test_class_name, "BlacklistTests") == 0)
*test_suite = new BlacklistTests(test_class_name, test_home);
else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
*test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
*test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
else if (strcmp(test_class_name, "SequenceTests") == 0)
*test_suite = new SequenceTests(test_class_name, test_home);
else if (strcmp(test_class_name, "HeaderKeyImportTests") == 0)
*test_suite = new HeaderKeyImportTests(test_class_name, test_home);
else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
*test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
else if (strcmp(test_class_name, "ExpiredSubkeyTests") == 0)
*test_suite = new ExpiredSubkeyTests(test_class_name, test_home);
else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
*test_suite = new ExternalRevokeTests(test_class_name, test_home);
else if (strcmp(test_class_name, "KeyeditTests") == 0)
*test_suite = new KeyeditTests(test_class_name, test_home);
else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
*test_suite = new LeastColorGroupTests(test_class_name, test_home);
else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
*test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
else if (strcmp(test_class_name, "CheckRenewedExpiredKeyTrustStatusTests") == 0)
*test_suite = new CheckRenewedExpiredKeyTrustStatusTests(test_class_name, test_home);
else if (strcmp(test_class_name, "TrustwordsTests") == 0)
*test_suite = new TrustwordsTests(test_class_name, test_home);
else if (strcmp(test_class_name, "Engine358Tests") == 0)
*test_suite = new Engine358Tests(test_class_name, test_home);
else if (strcmp(test_class_name, "ReturnMistrustFprTests") == 0)
*test_suite = new ReturnMistrustFprTests(test_class_name, test_home);
else if (strcmp(test_class_name, "DecorateTests") == 0)
*test_suite = new DecorateTests(test_class_name, test_home);
else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
*test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
else if (strcmp(test_class_name, "SignOnlyTests") == 0)
*test_suite = new SignOnlyTests(test_class_name, test_home);
else if (strcmp(test_class_name, "KeyeditTests") == 0)
*test_suite = new KeyeditTests(test_class_name, test_home);
else if (strcmp(test_class_name, "IdentityListTests") == 0)
*test_suite = new IdentityListTests(test_class_name, test_home);
else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
*test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
else if (strcmp(test_class_name, "Engine463Tests") == 0)
*test_suite = new Engine463Tests(test_class_name, test_home);
else if (strcmp(test_class_name, "SubkeyRatingEvalTests") == 0)
*test_suite = new SubkeyRatingEvalTests(test_class_name, test_home);
else if (strcmp(test_class_name, "NoOwnIdentWritesOnDecryptTests") == 0)
*test_suite = new NoOwnIdentWritesOnDecryptTests(test_class_name, test_home);
else if (strcmp(test_class_name, "SimpleBodyNotAltTests") == 0)
*test_suite = new SimpleBodyNotAltTests(test_class_name, test_home);
else if (strcmp(test_class_name, "AppleMailTests") == 0)
*test_suite = new AppleMailTests(test_class_name, test_home);
else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
*test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
*test_suite = new MapAsn1Tests(test_class_name, test_home);
else if (strcmp(test_class_name, "DecorateTests") == 0)
*test_suite = new DecorateTests(test_class_name, test_home);
else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
*test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
else if (strcmp(test_class_name, "HeaderKeyImportTests") == 0)
*test_suite = new HeaderKeyImportTests(test_class_name, test_home);
else if (strcmp(test_class_name, "SequenceTests") == 0)
*test_suite = new SequenceTests(test_class_name, test_home);
else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
*test_suite = new PgpListKeysTests(test_class_name, test_home);
else if (strcmp(test_class_name, "OwnIdentitiesRetrieveTests") == 0)
*test_suite = new OwnIdentitiesRetrieveTests(test_class_name, test_home);
else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
*test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
*test_suite = new ExternalRevokeTests(test_class_name, test_home);
else if (strcmp(test_class_name, "CrashdumpTests") == 0)
*test_suite = new CrashdumpTests(test_class_name, test_home);
else if (strcmp(test_class_name, "MessageApiTests") == 0)
*test_suite = new MessageApiTests(test_class_name, test_home);
else if (strcmp(test_class_name, "BloblistTests") == 0)
*test_suite = new BloblistTests(test_class_name, test_home);
else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
*test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
*test_suite = new UserIDAliasTests(test_class_name, test_home);
else if (strcmp(test_class_name, "StringlistTests") == 0)
*test_suite = new StringlistTests(test_class_name, test_home);
else if (strcmp(test_class_name, "StringpairListTests") == 0)
*test_suite = new StringpairListTests(test_class_name, test_home);
else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
*test_suite = new EncryptForIdentityTests(test_class_name, test_home);
else if (strcmp(test_class_name, "KeyResetMessageTests") == 0)
*test_suite = new KeyResetMessageTests(test_class_name, test_home);
else if (strcmp(test_class_name, "KeyAttachmentTests") == 0)
*test_suite = new KeyAttachmentTests(test_class_name, test_home);
else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
*test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
*test_suite = new MapAsn1Tests(test_class_name, test_home);
else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
*test_suite = new TrustManipulationTests(test_class_name, test_home);
else if (strcmp(test_class_name, "SyncTests") == 0)
*test_suite = new SyncTests(test_class_name, test_home);
else if (strcmp(test_class_name, "AppleMailTests") == 0)
*test_suite = new AppleMailTests(test_class_name, test_home);
}
void SuiteMaker::suitemaker_buildlist(const char** test_class_names, int num_to_run, const char* test_home, std::vector<Test::Suite*>& test_suites) {


+ 2
- 2
test/src/engine_tests/SyncTests.cc View File

@ -177,9 +177,9 @@ void SyncTests::tear_down()
void SyncTests::check_sync()
{
cout << "check_sync(): trigger KeyGen event\n";
signal_Sync_event(sync, Sync_PR_keysync, KeyGen);
signal_Sync_event(sync, Sync_PR_keysync, KeyGen, NULL);
adapter.processing();
cout << "check_sync(): cry for unknown key\n";
signal_Sync_event(sync, Sync_PR_keysync, CannotDecrypt);
signal_Sync_event(sync, Sync_PR_keysync, CannotDecrypt, NULL);
}

Loading…
Cancel
Save