Removed allowed calls to trust_personal_key with an own_identity. Trusting a pubkey from the same user and another device will require using a different user_id or calling set_own_key (on a pub/priv keypair) sync
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Mon, 14 Jan 2019 18:54:27 +0100
branchsync
changeset 3220d7b4ac90ce77
parent 3218 03a18842da11
child 3225 e2dfdb612445
Removed allowed calls to trust_personal_key with an own_identity. Trusting a pubkey from the same user and another device will require using a different user_id or calling set_own_key (on a pub/priv keypair)
src/keymanagement.c
src/keymanagement.h
test/src/SuiteMaker.cc
     1.1 --- a/src/keymanagement.c	Mon Jan 14 13:00:09 2019 +0100
     1.2 +++ b/src/keymanagement.c	Mon Jan 14 18:54:27 2019 +0100
     1.3 @@ -1381,7 +1381,9 @@
     1.4              EMPTYSTR(ident->fpr))
     1.5          return PEP_ILLEGAL_VALUE;
     1.6  
     1.7 -    //bool ident_has_trusted_default = false;
     1.8 +    if (is_me(session, ident))
     1.9 +        return PEP_ILLEGAL_VALUE;
    1.10 +        
    1.11      char* ident_default_fpr = NULL;
    1.12  
    1.13      // Before we do anything, be sure the input fpr is even eligible to be trusted
    1.14 @@ -1394,8 +1396,6 @@
    1.15      if (status != PEP_STATUS_OK)
    1.16          return status;
    1.17  
    1.18 -    bool me = is_me(session, ident);
    1.19 -
    1.20      pEp_identity* ident_copy = identity_dup(ident);
    1.21      char* cached_fpr = NULL;
    1.22  
    1.23 @@ -1404,23 +1404,7 @@
    1.24  
    1.25      // For later, in case we need to check the user default key
    1.26      pEp_identity* tmp_user_ident = NULL;
    1.27 -
    1.28 -    if (me) {
    1.29 -        bool has_private = false;
    1.30 -        // first of all, does this key even have a private component.
    1.31 -        status = contains_priv_key(session, ident->fpr, &has_private);
    1.32 -        if (status != PEP_STATUS_OK && status != PEP_KEY_NOT_FOUND)
    1.33 -            goto pEp_free;
    1.34 -            
    1.35 -        // if (has_private) {
    1.36 -        //     status = set_own_key(session, ident_copy, ident->fpr); 
    1.37 -        //     goto pEp_free;
    1.38 -        // }
    1.39 -    }
    1.40 -    
    1.41 -    // Either it's not me, or it's me but the key has no private key. 
    1.42 -    // We're only talking about pub keys here. Moving on.
    1.43 -    
    1.44 +        
    1.45      // Save the input fpr, which we already tested as non-NULL
    1.46      cached_fpr = strdup(ident->fpr);
    1.47  
    1.48 @@ -1436,10 +1420,7 @@
    1.49          tmp_id->comm_type = _MAX(tmp_id->comm_type, input_default_ct) | PEP_ct_confirmed;
    1.50  
    1.51          // Get the default identity without setting the fpr                                       
    1.52 -        if (me)
    1.53 -            status = _myself(session, ident_copy, false, true);
    1.54 -        else    
    1.55 -            status = update_identity(session, ident_copy);
    1.56 +        status = update_identity(session, ident_copy);
    1.57              
    1.58          ident_default_fpr = (EMPTYSTR(ident_copy->fpr) ? NULL : strdup(ident_copy->fpr));
    1.59  
    1.60 @@ -1447,13 +1428,13 @@
    1.61              bool trusted_default = false;
    1.62  
    1.63              // If there's no default, or the default is different from the input...
    1.64 -            if (me || EMPTYSTR(ident_default_fpr) || strcmp(cached_fpr, ident_default_fpr) != 0) {
    1.65 +            if (EMPTYSTR(ident_default_fpr) || strcmp(cached_fpr, ident_default_fpr) != 0) {
    1.66                  
    1.67                  // If the default fpr (if there is one) is trusted and key is strong enough,
    1.68                  // don't replace, we just set the trusted bit on this key for this user_id...
    1.69                  // (If there's no default fpr, this won't be true anyway.)
    1.70 -                if (me || (ident_copy->comm_type >= PEP_ct_strong_but_unconfirmed && 
    1.71 -                          (ident_copy->comm_type & PEP_ct_confirmed))) {                        
    1.72 +                if ((ident_copy->comm_type >= PEP_ct_strong_but_unconfirmed && 
    1.73 +                    (ident_copy->comm_type & PEP_ct_confirmed))) {                        
    1.74  
    1.75                      trusted_default = true;
    1.76                                      
    1.77 @@ -1957,4 +1938,3 @@
    1.78      return status;
    1.79  }
    1.80  #endif // USE_GPG
    1.81 -
     2.1 --- a/src/keymanagement.h	Mon Jan 14 13:00:09 2019 +0100
     2.2 +++ b/src/keymanagement.h	Mon Jan 14 18:54:27 2019 +0100
     2.3 @@ -211,15 +211,17 @@
     2.4  //
     2.5  //  parameters:
     2.6  //      session (in)        session to use
     2.7 -//      ident (in)          person and key to trust in
     2.8 +//      ident (in)          person and key to trust in - this must not be an
     2.9 +//                          own_identity in which the .me flag is set or
    2.10 +//                          the user_id is an own user_id.
    2.11  //
    2.12  //  caveat:
    2.13  //      the fields user_id, address and fpr must be supplied
    2.14 +//      own identities will result in a return of PEP_ILLEGAL_VALUE.
    2.15  //      for non-own users, this will 1) set the trust bit on its comm type in the DB,
    2.16  //      2) set this key as the identity default if the current identity default
    2.17  //      is not trusted, and 3) set this key as the user default if the current
    2.18  //      user default is not trusted.
    2.19 -//      For an own user, this is simply a call to myself().
    2.20  
    2.21  DYNAMIC_API PEP_STATUS trust_personal_key(
    2.22          PEP_SESSION session,
     3.1 --- a/test/src/SuiteMaker.cc	Mon Jan 14 13:00:09 2019 +0100
     3.2 +++ b/test/src/SuiteMaker.cc	Mon Jan 14 18:54:27 2019 +0100
     3.3 @@ -12,191 +12,191 @@
     3.4  #include "SuiteMaker.h"
     3.5  
     3.6  // Begin where we generate stuff
     3.7 -#include "DecorateTests.h"
     3.8 +#include "MimeTests.h"
     3.9 +#include "ExpiredSubkeyTests.h"
    3.10  #include "UserIdCollisionTests.h"
    3.11 -#include "ReencryptPlusExtraKeysTests.h"
    3.12 -#include "BlacklistTests.h"
    3.13 -#include "AppleMailTests.h"
    3.14 -#include "MessageTwoPointOhTests.h"
    3.15 +#include "Engine463Tests.h"
    3.16 +#include "BloblistTests.h"
    3.17 +#include "NewUpdateIdAndMyselfTests.h"
    3.18 +#include "I18nTests.h"
    3.19  #include "IdentityListTests.h"
    3.20 -#include "I18nTests.h"
    3.21 -#include "Engine463Tests.h"
    3.22 -#include "DecryptAttachPrivateKeyUntrustedTests.h"
    3.23 +#include "PgpBinaryTests.h"
    3.24 +#include "MessageNullFromTests.h"
    3.25 +#include "LeastCommonDenomColorTests.h"
    3.26 +#include "StringlistTests.h"
    3.27 +#include "PgpListKeysTests.h"
    3.28 +#include "MessageApiTests.h"
    3.29 +#include "EncryptMissingPrivateKeyTests.h"
    3.30 +#include "CaseAndDotAddressTests.h"
    3.31 +#include "UserIDAliasTests.h"
    3.32 +#include "SignOnlyTests.h"
    3.33  #include "BCCTests.h"
    3.34 -#include "LeastColorGroupTests.h"
    3.35  #include "Engine358Tests.h"
    3.36  #include "BlacklistAcceptNewKeyTests.h"
    3.37 -#include "MessageApiTests.h"
    3.38 -#include "StringlistTests.h"
    3.39 +#include "DecryptAttachPrivateKeyUntrustedTests.h"
    3.40 +#include "BlacklistTests.h"
    3.41 +#include "RevokeRegenAttachTests.h"
    3.42 +#include "PepSubjectReceivedTests.h"
    3.43 +#include "SequenceTests.h"
    3.44  #include "HeaderKeyImportTests.h"
    3.45 +#include "EncryptAttachPrivateKeyTests.h"
    3.46 +#include "ExternalRevokeTests.h"
    3.47 +#include "KeyeditTests.h"
    3.48 +#include "LeastColorGroupTests.h"
    3.49 +#include "DecryptAttachPrivateKeyTrustedTests.h"
    3.50 +#include "CheckRenewedExpiredKeyTrustStatusTests.h"
    3.51 +#include "TrustwordsTests.h"
    3.52 +#include "ReencryptPlusExtraKeysTests.h"
    3.53 +#include "MapAsn1Tests.h"
    3.54 +#include "DecorateTests.h"
    3.55 +#include "MessageTwoPointOhTests.h"
    3.56 +#include "CrashdumpTests.h"
    3.57  #include "StringpairListTests.h"
    3.58 +#include "EncryptForIdentityTests.h"
    3.59 +#include "KeyResetMessageTests.h"
    3.60  #include "TrustManipulationTests.h"
    3.61 -#include "SignOnlyTests.h"
    3.62 -#include "EncryptAttachPrivateKeyTests.h"
    3.63 -#include "BloblistTests.h"
    3.64 -#include "KeyResetMessageTests.h"
    3.65 -#include "SequenceTests.h"
    3.66 -#include "TrustwordsTests.h"
    3.67 -#include "RevokeRegenAttachTests.h"
    3.68 -#include "CheckRenewedExpiredKeyTrustStatusTests.h"
    3.69 -#include "EncryptMissingPrivateKeyTests.h"
    3.70 -#include "PepSubjectReceivedTests.h"
    3.71 -#include "KeyeditTests.h"
    3.72 -#include "MapAsn1Tests.h"
    3.73 -#include "PgpBinaryTests.h"
    3.74 -#include "DecryptAttachPrivateKeyTrustedTests.h"
    3.75 -#include "MessageNullFromTests.h"
    3.76 -#include "MimeTests.h"
    3.77 -#include "PgpListKeysTests.h"
    3.78 -#include "NewUpdateIdAndMyselfTests.h"
    3.79 -#include "EncryptForIdentityTests.h"
    3.80 -#include "CrashdumpTests.h"
    3.81 -#include "CaseAndDotAddressTests.h"
    3.82 -#include "ExpiredSubkeyTests.h"
    3.83 -#include "LeastCommonDenomColorTests.h"
    3.84 -#include "ExternalRevokeTests.h"
    3.85 -#include "UserIDAliasTests.h"
    3.86 +#include "AppleMailTests.h"
    3.87  
    3.88  
    3.89  const char* SuiteMaker::all_suites[] = {
    3.90 -    "DecorateTests",
    3.91 +    "MimeTests",
    3.92 +    "ExpiredSubkeyTests",
    3.93      "UserIdCollisionTests",
    3.94 -    "ReencryptPlusExtraKeysTests",
    3.95 -    "BlacklistTests",
    3.96 -    "AppleMailTests",
    3.97 -    "MessageTwoPointOhTests",
    3.98 +    "Engine463Tests",
    3.99 +    "BloblistTests",
   3.100 +    "NewUpdateIdAndMyselfTests",
   3.101 +    "I18nTests",
   3.102      "IdentityListTests",
   3.103 -    "I18nTests",
   3.104 -    "Engine463Tests",
   3.105 -    "DecryptAttachPrivateKeyUntrustedTests",
   3.106 +    "PgpBinaryTests",
   3.107 +    "MessageNullFromTests",
   3.108 +    "LeastCommonDenomColorTests",
   3.109 +    "StringlistTests",
   3.110 +    "PgpListKeysTests",
   3.111 +    "MessageApiTests",
   3.112 +    "EncryptMissingPrivateKeyTests",
   3.113 +    "CaseAndDotAddressTests",
   3.114 +    "UserIDAliasTests",
   3.115 +    "SignOnlyTests",
   3.116      "BCCTests",
   3.117 -    "LeastColorGroupTests",
   3.118      "Engine358Tests",
   3.119      "BlacklistAcceptNewKeyTests",
   3.120 -    "MessageApiTests",
   3.121 -    "StringlistTests",
   3.122 +    "DecryptAttachPrivateKeyUntrustedTests",
   3.123 +    "BlacklistTests",
   3.124 +    "RevokeRegenAttachTests",
   3.125 +    "PepSubjectReceivedTests",
   3.126 +    "SequenceTests",
   3.127      "HeaderKeyImportTests",
   3.128 +    "EncryptAttachPrivateKeyTests",
   3.129 +    "ExternalRevokeTests",
   3.130 +    "KeyeditTests",
   3.131 +    "LeastColorGroupTests",
   3.132 +    "DecryptAttachPrivateKeyTrustedTests",
   3.133 +    "CheckRenewedExpiredKeyTrustStatusTests",
   3.134 +    "TrustwordsTests",
   3.135 +    "ReencryptPlusExtraKeysTests",
   3.136 +    "MapAsn1Tests",
   3.137 +    "DecorateTests",
   3.138 +    "MessageTwoPointOhTests",
   3.139 +    "CrashdumpTests",
   3.140      "StringpairListTests",
   3.141 +    "EncryptForIdentityTests",
   3.142 +    "KeyResetMessageTests",
   3.143      "TrustManipulationTests",
   3.144 -    "SignOnlyTests",
   3.145 -    "EncryptAttachPrivateKeyTests",
   3.146 -    "BloblistTests",
   3.147 -    "KeyResetMessageTests",
   3.148 -    "SequenceTests",
   3.149 -    "TrustwordsTests",
   3.150 -    "RevokeRegenAttachTests",
   3.151 -    "CheckRenewedExpiredKeyTrustStatusTests",
   3.152 -    "EncryptMissingPrivateKeyTests",
   3.153 -    "PepSubjectReceivedTests",
   3.154 -    "KeyeditTests",
   3.155 -    "MapAsn1Tests",
   3.156 -    "PgpBinaryTests",
   3.157 -    "DecryptAttachPrivateKeyTrustedTests",
   3.158 -    "MessageNullFromTests",
   3.159 -    "MimeTests",
   3.160 -    "PgpListKeysTests",
   3.161 -    "NewUpdateIdAndMyselfTests",
   3.162 -    "EncryptForIdentityTests",
   3.163 -    "CrashdumpTests",
   3.164 -    "CaseAndDotAddressTests",
   3.165 -    "ExpiredSubkeyTests",
   3.166 -    "LeastCommonDenomColorTests",
   3.167 -    "ExternalRevokeTests",
   3.168 -    "UserIDAliasTests",
   3.169 +    "AppleMailTests",
   3.170  };
   3.171  
   3.172  // This file is generated, so magic constants are ok.
   3.173  int SuiteMaker::num_suites = 44;
   3.174  
   3.175  void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
   3.176 -    if (strcmp(test_class_name, "DecorateTests") == 0)
   3.177 -        *test_suite = new DecorateTests(test_class_name, test_home);
   3.178 +    if (strcmp(test_class_name, "MimeTests") == 0)
   3.179 +        *test_suite = new MimeTests(test_class_name, test_home);
   3.180 +    else if (strcmp(test_class_name, "ExpiredSubkeyTests") == 0)
   3.181 +        *test_suite = new ExpiredSubkeyTests(test_class_name, test_home);
   3.182      else if (strcmp(test_class_name, "UserIdCollisionTests") == 0)
   3.183          *test_suite = new UserIdCollisionTests(test_class_name, test_home);
   3.184 -    else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
   3.185 -        *test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
   3.186 -    else if (strcmp(test_class_name, "BlacklistTests") == 0)
   3.187 -        *test_suite = new BlacklistTests(test_class_name, test_home);
   3.188 -    else if (strcmp(test_class_name, "AppleMailTests") == 0)
   3.189 -        *test_suite = new AppleMailTests(test_class_name, test_home);
   3.190 -    else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
   3.191 -        *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
   3.192 +    else if (strcmp(test_class_name, "Engine463Tests") == 0)
   3.193 +        *test_suite = new Engine463Tests(test_class_name, test_home);
   3.194 +    else if (strcmp(test_class_name, "BloblistTests") == 0)
   3.195 +        *test_suite = new BloblistTests(test_class_name, test_home);
   3.196 +    else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
   3.197 +        *test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
   3.198 +    else if (strcmp(test_class_name, "I18nTests") == 0)
   3.199 +        *test_suite = new I18nTests(test_class_name, test_home);
   3.200      else if (strcmp(test_class_name, "IdentityListTests") == 0)
   3.201          *test_suite = new IdentityListTests(test_class_name, test_home);
   3.202 -    else if (strcmp(test_class_name, "I18nTests") == 0)
   3.203 -        *test_suite = new I18nTests(test_class_name, test_home);
   3.204 -    else if (strcmp(test_class_name, "Engine463Tests") == 0)
   3.205 -        *test_suite = new Engine463Tests(test_class_name, test_home);
   3.206 -    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
   3.207 -        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
   3.208 +    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
   3.209 +        *test_suite = new PgpBinaryTests(test_class_name, test_home);
   3.210 +    else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
   3.211 +        *test_suite = new MessageNullFromTests(test_class_name, test_home);
   3.212 +    else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
   3.213 +        *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
   3.214 +    else if (strcmp(test_class_name, "StringlistTests") == 0)
   3.215 +        *test_suite = new StringlistTests(test_class_name, test_home);
   3.216 +    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
   3.217 +        *test_suite = new PgpListKeysTests(test_class_name, test_home);
   3.218 +    else if (strcmp(test_class_name, "MessageApiTests") == 0)
   3.219 +        *test_suite = new MessageApiTests(test_class_name, test_home);
   3.220 +    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
   3.221 +        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
   3.222 +    else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
   3.223 +        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
   3.224 +    else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
   3.225 +        *test_suite = new UserIDAliasTests(test_class_name, test_home);
   3.226 +    else if (strcmp(test_class_name, "SignOnlyTests") == 0)
   3.227 +        *test_suite = new SignOnlyTests(test_class_name, test_home);
   3.228      else if (strcmp(test_class_name, "BCCTests") == 0)
   3.229          *test_suite = new BCCTests(test_class_name, test_home);
   3.230 -    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
   3.231 -        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
   3.232      else if (strcmp(test_class_name, "Engine358Tests") == 0)
   3.233          *test_suite = new Engine358Tests(test_class_name, test_home);
   3.234      else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
   3.235          *test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
   3.236 -    else if (strcmp(test_class_name, "MessageApiTests") == 0)
   3.237 -        *test_suite = new MessageApiTests(test_class_name, test_home);
   3.238 -    else if (strcmp(test_class_name, "StringlistTests") == 0)
   3.239 -        *test_suite = new StringlistTests(test_class_name, test_home);
   3.240 +    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
   3.241 +        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
   3.242 +    else if (strcmp(test_class_name, "BlacklistTests") == 0)
   3.243 +        *test_suite = new BlacklistTests(test_class_name, test_home);
   3.244 +    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
   3.245 +        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
   3.246 +    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
   3.247 +        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
   3.248 +    else if (strcmp(test_class_name, "SequenceTests") == 0)
   3.249 +        *test_suite = new SequenceTests(test_class_name, test_home);
   3.250      else if (strcmp(test_class_name, "HeaderKeyImportTests") == 0)
   3.251          *test_suite = new HeaderKeyImportTests(test_class_name, test_home);
   3.252 +    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
   3.253 +        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
   3.254 +    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
   3.255 +        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
   3.256 +    else if (strcmp(test_class_name, "KeyeditTests") == 0)
   3.257 +        *test_suite = new KeyeditTests(test_class_name, test_home);
   3.258 +    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
   3.259 +        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
   3.260 +    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
   3.261 +        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
   3.262 +    else if (strcmp(test_class_name, "CheckRenewedExpiredKeyTrustStatusTests") == 0)
   3.263 +        *test_suite = new CheckRenewedExpiredKeyTrustStatusTests(test_class_name, test_home);
   3.264 +    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
   3.265 +        *test_suite = new TrustwordsTests(test_class_name, test_home);
   3.266 +    else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
   3.267 +        *test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
   3.268 +    else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
   3.269 +        *test_suite = new MapAsn1Tests(test_class_name, test_home);
   3.270 +    else if (strcmp(test_class_name, "DecorateTests") == 0)
   3.271 +        *test_suite = new DecorateTests(test_class_name, test_home);
   3.272 +    else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
   3.273 +        *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
   3.274 +    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
   3.275 +        *test_suite = new CrashdumpTests(test_class_name, test_home);
   3.276      else if (strcmp(test_class_name, "StringpairListTests") == 0)
   3.277          *test_suite = new StringpairListTests(test_class_name, test_home);
   3.278 +    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
   3.279 +        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
   3.280 +    else if (strcmp(test_class_name, "KeyResetMessageTests") == 0)
   3.281 +        *test_suite = new KeyResetMessageTests(test_class_name, test_home);
   3.282      else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
   3.283          *test_suite = new TrustManipulationTests(test_class_name, test_home);
   3.284 -    else if (strcmp(test_class_name, "SignOnlyTests") == 0)
   3.285 -        *test_suite = new SignOnlyTests(test_class_name, test_home);
   3.286 -    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
   3.287 -        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
   3.288 -    else if (strcmp(test_class_name, "BloblistTests") == 0)
   3.289 -        *test_suite = new BloblistTests(test_class_name, test_home);
   3.290 -    else if (strcmp(test_class_name, "KeyResetMessageTests") == 0)
   3.291 -        *test_suite = new KeyResetMessageTests(test_class_name, test_home);
   3.292 -    else if (strcmp(test_class_name, "SequenceTests") == 0)
   3.293 -        *test_suite = new SequenceTests(test_class_name, test_home);
   3.294 -    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
   3.295 -        *test_suite = new TrustwordsTests(test_class_name, test_home);
   3.296 -    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
   3.297 -        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
   3.298 -    else if (strcmp(test_class_name, "CheckRenewedExpiredKeyTrustStatusTests") == 0)
   3.299 -        *test_suite = new CheckRenewedExpiredKeyTrustStatusTests(test_class_name, test_home);
   3.300 -    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
   3.301 -        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
   3.302 -    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
   3.303 -        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
   3.304 -    else if (strcmp(test_class_name, "KeyeditTests") == 0)
   3.305 -        *test_suite = new KeyeditTests(test_class_name, test_home);
   3.306 -    else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
   3.307 -        *test_suite = new MapAsn1Tests(test_class_name, test_home);
   3.308 -    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
   3.309 -        *test_suite = new PgpBinaryTests(test_class_name, test_home);
   3.310 -    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
   3.311 -        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
   3.312 -    else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
   3.313 -        *test_suite = new MessageNullFromTests(test_class_name, test_home);
   3.314 -    else if (strcmp(test_class_name, "MimeTests") == 0)
   3.315 -        *test_suite = new MimeTests(test_class_name, test_home);
   3.316 -    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
   3.317 -        *test_suite = new PgpListKeysTests(test_class_name, test_home);
   3.318 -    else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
   3.319 -        *test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
   3.320 -    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
   3.321 -        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
   3.322 -    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
   3.323 -        *test_suite = new CrashdumpTests(test_class_name, test_home);
   3.324 -    else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
   3.325 -        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
   3.326 -    else if (strcmp(test_class_name, "ExpiredSubkeyTests") == 0)
   3.327 -        *test_suite = new ExpiredSubkeyTests(test_class_name, test_home);
   3.328 -    else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
   3.329 -        *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
   3.330 -    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
   3.331 -        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
   3.332 -    else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
   3.333 -        *test_suite = new UserIDAliasTests(test_class_name, test_home);
   3.334 +    else if (strcmp(test_class_name, "AppleMailTests") == 0)
   3.335 +        *test_suite = new AppleMailTests(test_class_name, test_home);
   3.336  }
   3.337  
   3.338  void SuiteMaker::suitemaker_buildlist(const char** test_class_names, int num_to_run, const char* test_home, std::vector<Test::Suite*>& test_suites) {