Merged in ENGINE-467
authorKrista Bennett <krista@pep-project.org>
Wed, 03 Oct 2018 16:39:05 +0200
changeset 2979104040105413
parent 2976 9a82b60a9c6c
parent 2978 2b16aa31c35b
child 2984 9399e0ee7dcb
child 2999 ae91fe244f9b
Merged in ENGINE-467
     1.1 --- a/src/cryptotech.h	Wed Oct 03 15:26:07 2018 +0200
     1.2 +++ b/src/cryptotech.h	Wed Oct 03 16:39:05 2018 +0200
     1.3 @@ -19,7 +19,8 @@
     1.4  typedef PEP_STATUS (*decrypt_and_verify_t)(
     1.5          PEP_SESSION session, const char *ctext, size_t csize,
     1.6          const char *dsigtext, size_t dsigsize,
     1.7 -        char **ptext, size_t *psize, stringlist_t **keylist
     1.8 +        char **ptext, size_t *psize, stringlist_t **keylist,
     1.9 +        char **filename_ptr 
    1.10      );
    1.11  
    1.12  typedef PEP_STATUS (*verify_text_t)(
     2.1 --- a/src/message_api.c	Wed Oct 03 15:26:07 2018 +0200
     2.2 +++ b/src/message_api.c	Wed Oct 03 16:39:05 2018 +0200
     2.3 @@ -1456,7 +1456,8 @@
     2.4                                                          blob_value, blob_size,
     2.5                                                          NULL, 0,
     2.6                                                          &bl_ptext, &bl_psize, 
     2.7 -                                                        &bl_keylist);
     2.8 +                                                        &bl_keylist,
     2.9 +                                                        NULL);
    2.10                  free_stringlist(bl_keylist); // we don't care about key encryption as long as we decrypt
    2.11                  if (_status == PEP_DECRYPTED || _status == PEP_DECRYPTED_AND_VERIFIED) {
    2.12                      free_blobval = true;
    2.13 @@ -2701,7 +2702,8 @@
    2.14          free_stringlist(*keylist);
    2.15          *decrypt_status = decrypt_and_verify(session, ctext, csize,
    2.16                                               NULL, 0,
    2.17 -                                             &ptext, &psize, keylist);
    2.18 +                                             &ptext, &psize, keylist,
    2.19 +                                             NULL);
    2.20          
    2.21      }
    2.22  
    2.23 @@ -2751,9 +2753,12 @@
    2.24              free(ptext);
    2.25              ptext = NULL;
    2.26  
    2.27 +            char* pgp_filename = NULL;
    2.28              status = decrypt_and_verify(session, attctext, attcsize,
    2.29                                          NULL, 0,
    2.30 -                                        &ptext, &psize, &_keylist);
    2.31 +                                        &ptext, &psize, &_keylist,
    2.32 +                                        &pgp_filename);
    2.33 +                                        
    2.34              free_stringlist(_keylist);
    2.35  
    2.36              if (ptext) {
    2.37 @@ -2763,17 +2768,25 @@
    2.38                  }
    2.39                  else {
    2.40                      static const char * const mime_type = "application/octet-stream";
    2.41 -                    char * const filename =
    2.42 -                        without_double_ending(_s->filename);
    2.43 -                    if (filename == NULL)
    2.44 -                        return PEP_OUT_OF_MEMORY;
    2.45 -
    2.46 -                    _m = bloblist_add(_m, ptext, psize, mime_type,
    2.47 -                        filename);
    2.48 -                    free(filename);
    2.49 -                    if (_m == NULL)
    2.50 -                        return PEP_OUT_OF_MEMORY;
    2.51 -
    2.52 +                    if (pgp_filename) {
    2.53 +                        _m = bloblist_add(_m, ptext, psize, mime_type,
    2.54 +                             pgp_filename);
    2.55 +                        free(pgp_filename);                        
    2.56 +                        if (_m == NULL)
    2.57 +                            return PEP_OUT_OF_MEMORY;
    2.58 +                    }
    2.59 +                    else {
    2.60 +                        char * const filename =
    2.61 +                            without_double_ending(_s->filename);
    2.62 +                        if (filename == NULL)
    2.63 +                            return PEP_OUT_OF_MEMORY;
    2.64 +
    2.65 +                        _m = bloblist_add(_m, ptext, psize, mime_type,
    2.66 +                            filename);
    2.67 +                        free(filename);
    2.68 +                        if (_m == NULL)
    2.69 +                            return PEP_OUT_OF_MEMORY;
    2.70 +                    }
    2.71                      ptext = NULL;
    2.72  
    2.73                      if (msg->attachments == NULL)
    2.74 @@ -3197,7 +3210,8 @@
    2.75      /** Ok, we should be ready to decrypt. Try decrypt and verify first! **/
    2.76      status = cryptotech[crypto].decrypt_and_verify(session, ctext,
    2.77                                                     csize, dsig_text, dsig_size,
    2.78 -                                                   &ptext, &psize, &_keylist);
    2.79 +                                                   &ptext, &psize, &_keylist,
    2.80 +                                                   NULL);
    2.81  
    2.82      if (status > PEP_CANNOT_DECRYPT_UNKNOWN)
    2.83          goto pep_error;
     3.1 --- a/src/pEpEngine.c	Wed Oct 03 15:26:07 2018 +0200
     3.2 +++ b/src/pEpEngine.c	Wed Oct 03 16:39:05 2018 +0200
     3.3 @@ -3055,7 +3055,8 @@
     3.4  DYNAMIC_API PEP_STATUS decrypt_and_verify(
     3.5      PEP_SESSION session, const char *ctext, size_t csize,
     3.6      const char *dsigtext, size_t dsigsize,
     3.7 -    char **ptext, size_t *psize, stringlist_t **keylist
     3.8 +    char **ptext, size_t *psize, stringlist_t **keylist,
     3.9 +    char** filename_ptr
    3.10      )
    3.11  {
    3.12      assert(session);
    3.13 @@ -3069,7 +3070,8 @@
    3.14          return PEP_ILLEGAL_VALUE;
    3.15  
    3.16      return session->cryptotech[PEP_crypt_OpenPGP].decrypt_and_verify(
    3.17 -            session, ctext, csize, dsigtext, dsigsize, ptext, psize, keylist);
    3.18 +            session, ctext, csize, dsigtext, dsigsize, ptext, psize, keylist,
    3.19 +            filename_ptr);
    3.20  }
    3.21  
    3.22  DYNAMIC_API PEP_STATUS encrypt_and_sign(
     4.1 --- a/src/pEpEngine.h	Wed Oct 03 15:26:07 2018 +0200
     4.2 +++ b/src/pEpEngine.h	Wed Oct 03 16:39:05 2018 +0200
     4.3 @@ -231,16 +231,20 @@
     4.4  // decrypt_and_verify() - decrypt and/or verify a message
     4.5  //
     4.6  //    parameters:
     4.7 -//        session (in)    session handle
     4.8 -//        ctext (in)      cipher text to decrypt and/or verify
     4.9 -//        csize (in)      size of cipher text
    4.10 -//        dsigtext (in)   if extant, *detached* signature text for this
    4.11 -//                        message (or NULL if not)
    4.12 -//        dsize (in)      size of *detached* signature text for this
    4.13 -//                        message (0, if no detached sig exists)
    4.14 -//        ptext (out)     pointer to internal buffer with plain text
    4.15 -//        psize (out)     size of plain text
    4.16 -//        keylist (out)   list of key ids which where used to encrypt
    4.17 +//        session (in)          session handle
    4.18 +//        ctext (in)            cipher text to decrypt and/or verify
    4.19 +//        csize (in)            size of cipher text
    4.20 +//        dsigtext (in)         if extant, *detached* signature text for this
    4.21 +//                              message (or NULL if not)
    4.22 +//        dsize (in)            size of *detached* signature text for this
    4.23 +//                              message (0, if no detached sig exists)
    4.24 +//        ptext (out)           pointer to internal buffer with plain text
    4.25 +//        psize (out)           size of plain text
    4.26 +//        keylist (out)         list of key ids which where used to encrypt
    4.27 +//        filename_ptr (out)    mails produced by certain PGP implementations 
    4.28 +//                              may return a decrypted filename here for attachments. 
    4.29 +//                              Externally, this can generally be NULL, and is an optional
    4.30 +//                              parameter.
    4.31  //
    4.32  //    return value:
    4.33  //        PEP_UNENCRYPTED               message was unencrypted and not signed
    4.34 @@ -262,7 +266,8 @@
    4.35  DYNAMIC_API PEP_STATUS decrypt_and_verify(
    4.36          PEP_SESSION session, const char *ctext, size_t csize,
    4.37          const char *dsigtext, size_t dsigsize,
    4.38 -        char **ptext, size_t *psize, stringlist_t **keylist
    4.39 +        char **ptext, size_t *psize, stringlist_t **keylist,
    4.40 +        char ** filename_ptr
    4.41      );
    4.42  
    4.43  
     5.1 --- a/src/pgp_gpg.c	Wed Oct 03 15:26:07 2018 +0200
     5.2 +++ b/src/pgp_gpg.c	Wed Oct 03 16:39:05 2018 +0200
     5.3 @@ -577,7 +577,8 @@
     5.4  PEP_STATUS pgp_decrypt_and_verify(
     5.5      PEP_SESSION session, const char *ctext, size_t csize,
     5.6      const char *dsigtext, size_t dsigsize,
     5.7 -    char **ptext, size_t *psize, stringlist_t **keylist
     5.8 +    char **ptext, size_t *psize, stringlist_t **keylist,
     5.9 +    char** filename_ptr
    5.10      )
    5.11  {
    5.12      PEP_STATUS result;
    5.13 @@ -693,6 +694,15 @@
    5.14                          *keylist = NULL;
    5.15                          result = PEP_OUT_OF_MEMORY;
    5.16                      }
    5.17 +                    // Get filename, if desired
    5.18 +                    if (filename_ptr) {
    5.19 +                        const char* fname = gpgme_decrypt_result->file_name;
    5.20 +                        if (fname) {
    5.21 +                            *filename_ptr = strdup(fname);
    5.22 +                            if (!(*filename_ptr))
    5.23 +                                result = PEP_OUT_OF_MEMORY;
    5.24 +                        }
    5.25 +                    }
    5.26                  } /* Ok, so now we have any recipients it was encrypted for
    5.27                       in recipient_keylist */
    5.28              
    5.29 @@ -811,7 +821,7 @@
    5.30                          }
    5.31                          case GPG_ERR_CERT_REVOKED:
    5.32                          case GPG_ERR_BAD_SIGNATURE:
    5.33 -			    result = PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH;
    5.34 +                            result = PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH;
    5.35                              //result = PEP_DECRYPT_BAD_SIGNATURE;
    5.36                              break;
    5.37                          case GPG_ERR_SIG_EXPIRED:
     6.1 --- a/src/pgp_gpg.h	Wed Oct 03 15:26:07 2018 +0200
     6.2 +++ b/src/pgp_gpg.h	Wed Oct 03 16:39:05 2018 +0200
     6.3 @@ -11,7 +11,8 @@
     6.4  PEP_STATUS pgp_decrypt_and_verify(
     6.5          PEP_SESSION session, const char *ctext, size_t csize,
     6.6          const char *dsigtext, size_t dsigsize,
     6.7 -        char **ptext, size_t *psize, stringlist_t **keylist
     6.8 +        char **ptext, size_t *psize, stringlist_t **keylist,
     6.9 +        char** filename_ptr
    6.10      );
    6.11  
    6.12  PEP_STATUS pgp_encrypt_and_sign(
     7.1 --- a/src/pgp_netpgp.c	Wed Oct 03 15:26:07 2018 +0200
     7.2 +++ b/src/pgp_netpgp.c	Wed Oct 03 16:39:05 2018 +0200
     7.3 @@ -373,7 +373,8 @@
     7.4  PEP_STATUS pgp_decrypt_and_verify(
     7.5      PEP_SESSION session, const char *ctext, size_t csize,
     7.6      const char *dsigtext, size_t dsigsize,
     7.7 -    char **ptext, size_t *psize, stringlist_t **keylist
     7.8 +    char **ptext, size_t *psize, stringlist_t **keylist,
     7.9 +    char** filename_ptr // will be ignored
    7.10      )
    7.11  {
    7.12      char *_ptext = NULL;
     8.1 --- a/src/pgp_netpgp.h	Wed Oct 03 15:26:07 2018 +0200
     8.2 +++ b/src/pgp_netpgp.h	Wed Oct 03 16:39:05 2018 +0200
     8.3 @@ -10,7 +10,8 @@
     8.4  PEP_STATUS pgp_decrypt_and_verify(
     8.5          PEP_SESSION session, const char *ctext, size_t csize,
     8.6          const char *dsigtext, size_t dsigsize,
     8.7 -        char **ptext, size_t *psize, stringlist_t **keylist
     8.8 +        char **ptext, size_t *psize, stringlist_t **keylist,
     8.9 +        char** filename_ptr // will be ignored
    8.10      );
    8.11  
    8.12  PEP_STATUS pgp_encrypt_and_sign(
     9.1 --- a/test/src/SuiteMaker.cc	Wed Oct 03 15:26:07 2018 +0200
     9.2 +++ b/test/src/SuiteMaker.cc	Wed Oct 03 16:39:05 2018 +0200
     9.3 @@ -12,167 +12,167 @@
     9.4  #include "SuiteMaker.h"
     9.5  
     9.6  // Begin where we generate stuff
     9.7 +#include "DecorateTests.h"
     9.8 +#include "ReencryptPlusExtraKeysTests.h"
     9.9 +#include "BlacklistTests.h"
    9.10 +#include "AppleMailTests.h"
    9.11 +#include "MessageTwoPointOhTests.h"
    9.12 +#include "IdentityListTests.h"
    9.13 +#include "I18nTests.h"
    9.14 +#include "Engine463Tests.h"
    9.15 +#include "DecryptAttachPrivateKeyUntrustedTests.h"
    9.16 +#include "BCCTests.h"
    9.17 +#include "LeastColorGroupTests.h"
    9.18 +#include "MistrustUndoTests.h"
    9.19 +#include "BlacklistAcceptNewKeyTests.h"
    9.20 +#include "MessageApiTests.h"
    9.21 +#include "StringlistTests.h"
    9.22 +#include "StringpairListTests.h"
    9.23 +#include "TrustManipulationTests.h"
    9.24 +#include "EncryptAttachPrivateKeyTests.h"
    9.25 +#include "BloblistTests.h"
    9.26 +#include "SequenceTests.h"
    9.27 +#include "TrustwordsTests.h"
    9.28 +#include "RevokeRegenAttachTests.h"
    9.29 +#include "EncryptMissingPrivateKeyTests.h"
    9.30 +#include "PepSubjectReceivedTests.h"
    9.31 +#include "KeyeditTests.h"
    9.32 +#include "MapAsn1Tests.h"
    9.33 +#include "PgpBinaryTests.h"
    9.34 +#include "DecryptAttachPrivateKeyTrustedTests.h"
    9.35 +#include "MessageNullFromTests.h"
    9.36  #include "MimeTests.h"
    9.37 -#include "Engine463Tests.h"
    9.38 -#include "BloblistTests.h"
    9.39 +#include "PgpListKeysTests.h"
    9.40  #include "NewUpdateIdAndMyselfTests.h"
    9.41 -#include "I18nTests.h"
    9.42 -#include "IdentityListTests.h"
    9.43 -#include "PgpBinaryTests.h"
    9.44 -#include "MistrustUndoTests.h"
    9.45 -#include "MessageNullFromTests.h"
    9.46 +#include "EncryptForIdentityTests.h"
    9.47 +#include "CrashdumpTests.h"
    9.48 +#include "CaseAndDotAddressTests.h"
    9.49  #include "LeastCommonDenomColorTests.h"
    9.50 -#include "StringlistTests.h"
    9.51 -#include "PgpListKeysTests.h"
    9.52 -#include "MessageApiTests.h"
    9.53 -#include "EncryptMissingPrivateKeyTests.h"
    9.54 -#include "CaseAndDotAddressTests.h"
    9.55 +#include "ExternalRevokeTests.h"
    9.56  #include "UserIDAliasTests.h"
    9.57 -#include "BCCTests.h"
    9.58 -#include "BlacklistAcceptNewKeyTests.h"
    9.59 -#include "DecryptAttachPrivateKeyUntrustedTests.h"
    9.60 -#include "BlacklistTests.h"
    9.61 -#include "RevokeRegenAttachTests.h"
    9.62 -#include "PepSubjectReceivedTests.h"
    9.63 -#include "SequenceTests.h"
    9.64 -#include "EncryptAttachPrivateKeyTests.h"
    9.65 -#include "ExternalRevokeTests.h"
    9.66 -#include "KeyeditTests.h"
    9.67 -#include "LeastColorGroupTests.h"
    9.68 -#include "DecryptAttachPrivateKeyTrustedTests.h"
    9.69 -#include "TrustwordsTests.h"
    9.70 -#include "ReencryptPlusExtraKeysTests.h"
    9.71 -#include "MapAsn1Tests.h"
    9.72 -#include "DecorateTests.h"
    9.73 -#include "MessageTwoPointOhTests.h"
    9.74 -#include "CrashdumpTests.h"
    9.75 -#include "StringpairListTests.h"
    9.76 -#include "EncryptForIdentityTests.h"
    9.77 -#include "TrustManipulationTests.h"
    9.78 -#include "AppleMailTests.h"
    9.79  
    9.80  
    9.81  const char* SuiteMaker::all_suites[] = {
    9.82 +    "DecorateTests",
    9.83 +    "ReencryptPlusExtraKeysTests",
    9.84 +    "BlacklistTests",
    9.85 +    "AppleMailTests",
    9.86 +    "MessageTwoPointOhTests",
    9.87 +    "IdentityListTests",
    9.88 +    "I18nTests",
    9.89 +    "Engine463Tests",
    9.90 +    "DecryptAttachPrivateKeyUntrustedTests",
    9.91 +    "BCCTests",
    9.92 +    "LeastColorGroupTests",
    9.93 +    "MistrustUndoTests",
    9.94 +    "BlacklistAcceptNewKeyTests",
    9.95 +    "MessageApiTests",
    9.96 +    "StringlistTests",
    9.97 +    "StringpairListTests",
    9.98 +    "TrustManipulationTests",
    9.99 +    "EncryptAttachPrivateKeyTests",
   9.100 +    "BloblistTests",
   9.101 +    "SequenceTests",
   9.102 +    "TrustwordsTests",
   9.103 +    "RevokeRegenAttachTests",
   9.104 +    "EncryptMissingPrivateKeyTests",
   9.105 +    "PepSubjectReceivedTests",
   9.106 +    "KeyeditTests",
   9.107 +    "MapAsn1Tests",
   9.108 +    "PgpBinaryTests",
   9.109 +    "DecryptAttachPrivateKeyTrustedTests",
   9.110 +    "MessageNullFromTests",
   9.111      "MimeTests",
   9.112 -    "Engine463Tests",
   9.113 -    "BloblistTests",
   9.114 +    "PgpListKeysTests",
   9.115      "NewUpdateIdAndMyselfTests",
   9.116 -    "I18nTests",
   9.117 -    "IdentityListTests",
   9.118 -    "PgpBinaryTests",
   9.119 -    "MistrustUndoTests",
   9.120 -    "MessageNullFromTests",
   9.121 +    "EncryptForIdentityTests",
   9.122 +    "CrashdumpTests",
   9.123 +    "CaseAndDotAddressTests",
   9.124      "LeastCommonDenomColorTests",
   9.125 -    "StringlistTests",
   9.126 -    "PgpListKeysTests",
   9.127 -    "MessageApiTests",
   9.128 -    "EncryptMissingPrivateKeyTests",
   9.129 -    "CaseAndDotAddressTests",
   9.130 +    "ExternalRevokeTests",
   9.131      "UserIDAliasTests",
   9.132 -    "BCCTests",
   9.133 -    "BlacklistAcceptNewKeyTests",
   9.134 -    "DecryptAttachPrivateKeyUntrustedTests",
   9.135 -    "BlacklistTests",
   9.136 -    "RevokeRegenAttachTests",
   9.137 -    "PepSubjectReceivedTests",
   9.138 -    "SequenceTests",
   9.139 -    "EncryptAttachPrivateKeyTests",
   9.140 -    "ExternalRevokeTests",
   9.141 -    "KeyeditTests",
   9.142 -    "LeastColorGroupTests",
   9.143 -    "DecryptAttachPrivateKeyTrustedTests",
   9.144 -    "TrustwordsTests",
   9.145 -    "ReencryptPlusExtraKeysTests",
   9.146 -    "MapAsn1Tests",
   9.147 -    "DecorateTests",
   9.148 -    "MessageTwoPointOhTests",
   9.149 -    "CrashdumpTests",
   9.150 -    "StringpairListTests",
   9.151 -    "EncryptForIdentityTests",
   9.152 -    "TrustManipulationTests",
   9.153 -    "AppleMailTests",
   9.154  };
   9.155  
   9.156  // This file is generated, so magic constants are ok.
   9.157  int SuiteMaker::num_suites = 38;
   9.158  
   9.159  void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
   9.160 -    if (strcmp(test_class_name, "MimeTests") == 0)
   9.161 -        *test_suite = new MimeTests(test_class_name, test_home);
   9.162 +    if (strcmp(test_class_name, "DecorateTests") == 0)
   9.163 +        *test_suite = new DecorateTests(test_class_name, test_home);
   9.164 +    else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
   9.165 +        *test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
   9.166 +    else if (strcmp(test_class_name, "BlacklistTests") == 0)
   9.167 +        *test_suite = new BlacklistTests(test_class_name, test_home);
   9.168 +    else if (strcmp(test_class_name, "AppleMailTests") == 0)
   9.169 +        *test_suite = new AppleMailTests(test_class_name, test_home);
   9.170 +    else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
   9.171 +        *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
   9.172 +    else if (strcmp(test_class_name, "IdentityListTests") == 0)
   9.173 +        *test_suite = new IdentityListTests(test_class_name, test_home);
   9.174 +    else if (strcmp(test_class_name, "I18nTests") == 0)
   9.175 +        *test_suite = new I18nTests(test_class_name, test_home);
   9.176      else if (strcmp(test_class_name, "Engine463Tests") == 0)
   9.177          *test_suite = new Engine463Tests(test_class_name, test_home);
   9.178 +    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
   9.179 +        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
   9.180 +    else if (strcmp(test_class_name, "BCCTests") == 0)
   9.181 +        *test_suite = new BCCTests(test_class_name, test_home);
   9.182 +    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
   9.183 +        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
   9.184 +    else if (strcmp(test_class_name, "MistrustUndoTests") == 0)
   9.185 +        *test_suite = new MistrustUndoTests(test_class_name, test_home);
   9.186 +    else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
   9.187 +        *test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
   9.188 +    else if (strcmp(test_class_name, "MessageApiTests") == 0)
   9.189 +        *test_suite = new MessageApiTests(test_class_name, test_home);
   9.190 +    else if (strcmp(test_class_name, "StringlistTests") == 0)
   9.191 +        *test_suite = new StringlistTests(test_class_name, test_home);
   9.192 +    else if (strcmp(test_class_name, "StringpairListTests") == 0)
   9.193 +        *test_suite = new StringpairListTests(test_class_name, test_home);
   9.194 +    else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
   9.195 +        *test_suite = new TrustManipulationTests(test_class_name, test_home);
   9.196 +    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
   9.197 +        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
   9.198      else if (strcmp(test_class_name, "BloblistTests") == 0)
   9.199          *test_suite = new BloblistTests(test_class_name, test_home);
   9.200 +    else if (strcmp(test_class_name, "SequenceTests") == 0)
   9.201 +        *test_suite = new SequenceTests(test_class_name, test_home);
   9.202 +    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
   9.203 +        *test_suite = new TrustwordsTests(test_class_name, test_home);
   9.204 +    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
   9.205 +        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
   9.206 +    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
   9.207 +        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
   9.208 +    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
   9.209 +        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
   9.210 +    else if (strcmp(test_class_name, "KeyeditTests") == 0)
   9.211 +        *test_suite = new KeyeditTests(test_class_name, test_home);
   9.212 +    else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
   9.213 +        *test_suite = new MapAsn1Tests(test_class_name, test_home);
   9.214 +    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
   9.215 +        *test_suite = new PgpBinaryTests(test_class_name, test_home);
   9.216 +    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
   9.217 +        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
   9.218 +    else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
   9.219 +        *test_suite = new MessageNullFromTests(test_class_name, test_home);
   9.220 +    else if (strcmp(test_class_name, "MimeTests") == 0)
   9.221 +        *test_suite = new MimeTests(test_class_name, test_home);
   9.222 +    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
   9.223 +        *test_suite = new PgpListKeysTests(test_class_name, test_home);
   9.224      else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
   9.225          *test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
   9.226 -    else if (strcmp(test_class_name, "I18nTests") == 0)
   9.227 -        *test_suite = new I18nTests(test_class_name, test_home);
   9.228 -    else if (strcmp(test_class_name, "IdentityListTests") == 0)
   9.229 -        *test_suite = new IdentityListTests(test_class_name, test_home);
   9.230 -    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
   9.231 -        *test_suite = new PgpBinaryTests(test_class_name, test_home);
   9.232 -    else if (strcmp(test_class_name, "MistrustUndoTests") == 0)
   9.233 -        *test_suite = new MistrustUndoTests(test_class_name, test_home);
   9.234 -    else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
   9.235 -        *test_suite = new MessageNullFromTests(test_class_name, test_home);
   9.236 +    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
   9.237 +        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
   9.238 +    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
   9.239 +        *test_suite = new CrashdumpTests(test_class_name, test_home);
   9.240 +    else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
   9.241 +        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
   9.242      else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
   9.243          *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
   9.244 -    else if (strcmp(test_class_name, "StringlistTests") == 0)
   9.245 -        *test_suite = new StringlistTests(test_class_name, test_home);
   9.246 -    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
   9.247 -        *test_suite = new PgpListKeysTests(test_class_name, test_home);
   9.248 -    else if (strcmp(test_class_name, "MessageApiTests") == 0)
   9.249 -        *test_suite = new MessageApiTests(test_class_name, test_home);
   9.250 -    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
   9.251 -        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
   9.252 -    else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
   9.253 -        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
   9.254 +    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
   9.255 +        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
   9.256      else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
   9.257          *test_suite = new UserIDAliasTests(test_class_name, test_home);
   9.258 -    else if (strcmp(test_class_name, "BCCTests") == 0)
   9.259 -        *test_suite = new BCCTests(test_class_name, test_home);
   9.260 -    else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
   9.261 -        *test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
   9.262 -    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
   9.263 -        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
   9.264 -    else if (strcmp(test_class_name, "BlacklistTests") == 0)
   9.265 -        *test_suite = new BlacklistTests(test_class_name, test_home);
   9.266 -    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
   9.267 -        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
   9.268 -    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
   9.269 -        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
   9.270 -    else if (strcmp(test_class_name, "SequenceTests") == 0)
   9.271 -        *test_suite = new SequenceTests(test_class_name, test_home);
   9.272 -    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
   9.273 -        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
   9.274 -    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
   9.275 -        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
   9.276 -    else if (strcmp(test_class_name, "KeyeditTests") == 0)
   9.277 -        *test_suite = new KeyeditTests(test_class_name, test_home);
   9.278 -    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
   9.279 -        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
   9.280 -    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
   9.281 -        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
   9.282 -    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
   9.283 -        *test_suite = new TrustwordsTests(test_class_name, test_home);
   9.284 -    else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
   9.285 -        *test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
   9.286 -    else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
   9.287 -        *test_suite = new MapAsn1Tests(test_class_name, test_home);
   9.288 -    else if (strcmp(test_class_name, "DecorateTests") == 0)
   9.289 -        *test_suite = new DecorateTests(test_class_name, test_home);
   9.290 -    else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
   9.291 -        *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
   9.292 -    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
   9.293 -        *test_suite = new CrashdumpTests(test_class_name, test_home);
   9.294 -    else if (strcmp(test_class_name, "StringpairListTests") == 0)
   9.295 -        *test_suite = new StringpairListTests(test_class_name, test_home);
   9.296 -    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
   9.297 -        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
   9.298 -    else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
   9.299 -        *test_suite = new TrustManipulationTests(test_class_name, test_home);
   9.300 -    else if (strcmp(test_class_name, "AppleMailTests") == 0)
   9.301 -        *test_suite = new AppleMailTests(test_class_name, test_home);
   9.302  }
   9.303  
   9.304  void SuiteMaker::suitemaker_buildlist(const char** test_class_names, int num_to_run, const char* test_home, std::vector<Test::Suite*>& test_suites) {