make dlsym() optional using NODLSYM makro
authorVolker Birk <vb@pep.foundation>
Thu, 11 Oct 2018 18:05:43 +0200
changeset 3045cb5f4c863d4f
parent 3044 630d505b8a0b
child 3046 eaba234b0725
make dlsym() optional using NODLSYM makro
src/base64.c
src/labeled_int_list.c
src/pgp_gpg.c
src/pgp_gpg_internal.h
test/src/SuiteMaker.cc
     1.1 --- a/src/base64.c	Thu Oct 11 13:04:02 2018 +0200
     1.2 +++ b/src/base64.c	Thu Oct 11 18:05:43 2018 +0200
     1.3 @@ -216,4 +216,5 @@
     1.4  pEp_error:
     1.5      free(blobby);
     1.6      return NULL;
     1.7 -}    
     1.8 \ No newline at end of file
     1.9 +}    
    1.10 +
     2.1 --- a/src/labeled_int_list.c	Thu Oct 11 13:04:02 2018 +0200
     2.2 +++ b/src/labeled_int_list.c	Thu Oct 11 18:05:43 2018 +0200
     2.3 @@ -118,4 +118,5 @@
     2.4          len++;
     2.5  
     2.6      return len;
     2.7 -}
     2.8 \ No newline at end of file
     2.9 +}
    2.10 +
     3.1 --- a/src/pgp_gpg.c	Thu Oct 11 13:04:02 2018 +0200
     3.2 +++ b/src/pgp_gpg.c	Thu Oct 11 18:05:43 2018 +0200
     3.3 @@ -11,6 +11,12 @@
     3.4  
     3.5  #define _GPGERR(X) ((X) & 0xffffL)
     3.6  
     3.7 +#ifdef NODLSYM
     3.8 +#define DLOAD(X) gpg. ## X = X
     3.9 +#else
    3.10 +#define DLOAD(X) gpg.X = (X ## _t) (intptr_t) dlsym(gpgme, #X); assert(gpg.X)
    3.11 +#endif
    3.12 +
    3.13  static void *gpgme;
    3.14  static struct gpg_s gpg;
    3.15  
    3.16 @@ -296,6 +302,7 @@
    3.17              goto pep_error;
    3.18          }
    3.19  
    3.20 +#ifndef NODLSYM
    3.21          gpgme = dlopen(LIBGPGME, RTLD_LAZY);
    3.22          if (gpgme == NULL) {
    3.23              // FIXME: Hotfix here?
    3.24 @@ -303,6 +310,7 @@
    3.25              status = PEP_INIT_CANNOT_LOAD_GPGME;
    3.26              goto pep_error;
    3.27          }
    3.28 +#endif
    3.29  
    3.30          memset(&gpg, 0, sizeof(struct gpg_s));
    3.31  
    3.32 @@ -325,208 +333,61 @@
    3.33          if (status != PEP_STATUS_OK)
    3.34              return status;
    3.35  
    3.36 -        gpg.gpgme_set_locale
    3.37 -            = (gpgme_set_locale_t) (intptr_t) dlsym(gpgme,
    3.38 -            "gpgme_set_locale");
    3.39 -        assert(gpg.gpgme_set_locale);
    3.40 +#ifdef NODLSYM
    3.41 +        gpg.gpgme_check = gpgme_check_version;
    3.42 +#else
    3.43 +        gpg.gpgme_check = (gpgme_check_t) (intptr_t) dlsym(gpgme, "gpgme_check_version");
    3.44 +        assert(gpg.gpgme_check);
    3.45 +#endif
    3.46  
    3.47 -        gpg.gpgme_check
    3.48 -            = (gpgme_check_version_t) (intptr_t) dlsym(gpgme,
    3.49 -            "gpgme_check_version");
    3.50 -        assert(gpg.gpgme_check);
    3.51 +        DLOAD(gpgme_set_locale);
    3.52 +        DLOAD(gpgme_new);
    3.53 +        DLOAD(gpgme_release);
    3.54 +        DLOAD(gpgme_set_protocol);
    3.55 +        DLOAD(gpgme_set_armor);
    3.56 +        DLOAD(gpgme_data_new);
    3.57 +        DLOAD(gpgme_data_new_from_mem);
    3.58 +        DLOAD(gpgme_data_new_from_cbs);
    3.59 +        DLOAD(gpgme_data_release);
    3.60 +        DLOAD(gpgme_data_identify);
    3.61 +        DLOAD(gpgme_data_seek);
    3.62 +        DLOAD(gpgme_data_read);
    3.63 +        DLOAD(gpgme_op_decrypt);
    3.64 +        DLOAD(gpgme_op_verify);
    3.65 +        DLOAD(gpgme_op_decrypt_verify);
    3.66 +        DLOAD(gpgme_op_decrypt_result);
    3.67 +        DLOAD(gpgme_op_encrypt_sign);
    3.68 +        DLOAD(gpgme_op_encrypt);
    3.69 +        DLOAD(gpgme_op_verify_result);
    3.70 +        DLOAD(gpgme_signers_clear);
    3.71 +        DLOAD(gpgme_signers_add);
    3.72 +        DLOAD(gpgme_set_passphrase_cb);
    3.73 +        DLOAD(gpgme_get_key);
    3.74 +        
    3.75 +#ifdef GPGME_VERSION_NUMBER
    3.76 +#if (GPGME_VERSION_NUMBER >= 0x010700)
    3.77 +        DLOAD(gpgme_op_createkey);
    3.78 +        DLOAD(gpgme_op_createsubkey);
    3.79 +#endif
    3.80 +#endif
    3.81  
    3.82 -        gpg.gpgme_new
    3.83 -            = (gpgme_new_t) (intptr_t) dlsym(gpgme, "gpgme_new");
    3.84 -        assert(gpg.gpgme_new);
    3.85 -
    3.86 -        gpg.gpgme_release
    3.87 -            = (gpgme_release_t) (intptr_t) dlsym(gpgme, "gpgme_release");
    3.88 -        assert(gpg.gpgme_release);
    3.89 -
    3.90 -        gpg.gpgme_set_protocol
    3.91 -            = (gpgme_set_protocol_t) (intptr_t) dlsym(gpgme,
    3.92 -            "gpgme_set_protocol");
    3.93 -        assert(gpg.gpgme_set_protocol);
    3.94 -
    3.95 -        gpg.gpgme_set_armor
    3.96 -            = (gpgme_set_armor_t) (intptr_t) dlsym(gpgme,
    3.97 -            "gpgme_set_armor");
    3.98 -        assert(gpg.gpgme_set_armor);
    3.99 -
   3.100 -        gpg.gpgme_data_new
   3.101 -            = (gpgme_data_new_t) (intptr_t) dlsym(gpgme,
   3.102 -            "gpgme_data_new");
   3.103 -        assert(gpg.gpgme_data_new);
   3.104 -
   3.105 -        gpg.gpgme_data_new_from_mem
   3.106 -            = (gpgme_data_new_from_mem_t) (intptr_t) dlsym(gpgme,
   3.107 -            "gpgme_data_new_from_mem");
   3.108 -        assert(gpg.gpgme_data_new_from_mem);
   3.109 -
   3.110 -        gpg.gpgme_data_new_from_cbs
   3.111 -            = (gpgme_data_new_from_cbs_t) (intptr_t) dlsym(gpgme,
   3.112 -            "gpgme_data_new_from_cbs");
   3.113 -        assert(gpg.gpgme_data_new_from_cbs);
   3.114 -
   3.115 -        gpg.gpgme_data_release
   3.116 -            = (gpgme_data_release_t) (intptr_t) dlsym(gpgme,
   3.117 -            "gpgme_data_release");
   3.118 -        assert(gpg.gpgme_data_release);
   3.119 -
   3.120 -        gpg.gpgme_data_identify
   3.121 -            = (gpgme_data_identify_t) (intptr_t) dlsym(gpgme,
   3.122 -            "gpgme_data_identify");
   3.123 -        assert(gpg.gpgme_data_identify);
   3.124 -
   3.125 -        gpg.gpgme_data_seek
   3.126 -            = (gpgme_data_seek_t) (intptr_t) dlsym(gpgme,
   3.127 -            "gpgme_data_seek");
   3.128 -        assert(gpg.gpgme_data_seek);
   3.129 -
   3.130 -        gpg.gpgme_data_read
   3.131 -            = (gpgme_data_read_t) (intptr_t) dlsym(gpgme,
   3.132 -            "gpgme_data_read");
   3.133 -        assert(gpg.gpgme_data_read);
   3.134 -
   3.135 -        gpg.gpgme_op_decrypt
   3.136 -            = (gpgme_op_decrypt_t) (intptr_t) dlsym(gpgme,
   3.137 -            "gpgme_op_decrypt");
   3.138 -        assert(gpg.gpgme_op_decrypt);
   3.139 -
   3.140 -        gpg.gpgme_op_verify
   3.141 -            = (gpgme_op_verify_t) (intptr_t) dlsym(gpgme,
   3.142 -            "gpgme_op_verify");
   3.143 -        assert(gpg.gpgme_op_verify);
   3.144 -
   3.145 -        gpg.gpgme_op_decrypt_verify
   3.146 -            = (gpgme_op_decrypt_verify_t) (intptr_t) dlsym(gpgme,
   3.147 -            "gpgme_op_decrypt_verify");
   3.148 -        assert(gpg.gpgme_op_decrypt_verify);
   3.149 -
   3.150 -        gpg.gpgme_op_decrypt_result
   3.151 -            = (gpgme_op_decrypt_result_t) (intptr_t) dlsym(gpgme,
   3.152 -            "gpgme_op_decrypt_result");
   3.153 -        assert(gpg.gpgme_op_decrypt_result);
   3.154 -
   3.155 -        gpg.gpgme_op_encrypt_sign
   3.156 -            = (gpgme_op_encrypt_sign_t) (intptr_t) dlsym(gpgme,
   3.157 -            "gpgme_op_encrypt_sign");
   3.158 -        assert(gpg.gpgme_op_encrypt_sign);
   3.159 -
   3.160 -        gpg.gpgme_op_encrypt
   3.161 -            = (gpgme_op_encrypt_t) (intptr_t) dlsym(gpgme,
   3.162 -            "gpgme_op_encrypt");
   3.163 -        assert(gpg.gpgme_op_encrypt);
   3.164 -
   3.165 -        gpg.gpgme_op_verify_result
   3.166 -            = (gpgme_op_verify_result_t) (intptr_t) dlsym(gpgme,
   3.167 -            "gpgme_op_verify_result");
   3.168 -        assert(gpg.gpgme_op_verify_result);
   3.169 -
   3.170 -        gpg.gpgme_signers_clear
   3.171 -            = (gpgme_signers_clear_t) (intptr_t) dlsym(gpgme,
   3.172 -            "gpgme_signers_clear");
   3.173 -        assert(gpg.gpgme_signers_clear);
   3.174 -
   3.175 -        gpg.gpgme_signers_add
   3.176 -            = (gpgme_signers_add_t) (intptr_t) dlsym(gpgme,
   3.177 -            "gpgme_signers_add");
   3.178 -        assert(gpg.gpgme_signers_add);
   3.179 -
   3.180 -        gpg.gpgme_set_passphrase_cb
   3.181 -            = (gpgme_set_passphrase_cb_t) (intptr_t) dlsym(gpgme,
   3.182 -            "gpgme_set_passphrase_cb");
   3.183 -        assert(gpg.gpgme_set_passphrase_cb);
   3.184 -
   3.185 -        gpg.gpgme_get_key
   3.186 -            = (gpgme_get_key_t) (intptr_t) dlsym(gpgme, "gpgme_get_key");
   3.187 -        assert(gpg.gpgme_get_key);
   3.188 -        
   3.189 -        #ifdef GPGME_VERSION_NUMBER
   3.190 -        #if (GPGME_VERSION_NUMBER >= 0x010700)
   3.191 -                gpg.gpgme_op_createkey
   3.192 -                    = (gpgme_op_createkey_t) (intptr_t) dlsym(gpgme,
   3.193 -                    "gpgme_op_createkey");
   3.194 -                assert(gpg.gpgme_op_createkey);
   3.195 -                
   3.196 -                gpg.gpgme_op_createsubkey
   3.197 -                    = (gpgme_op_createsubkey_t) (intptr_t) dlsym(gpgme,
   3.198 -                    "gpgme_op_createsubkey");
   3.199 -                assert(gpg.gpgme_op_createsubkey);
   3.200 -
   3.201 -        #endif
   3.202 -        #endif
   3.203 -        
   3.204 -        gpg.gpgme_op_genkey
   3.205 -            = (gpgme_op_genkey_t) (intptr_t) dlsym(gpgme,
   3.206 -            "gpgme_op_genkey");
   3.207 -        assert(gpg.gpgme_op_genkey);
   3.208 -
   3.209 -        gpg.gpgme_op_genkey_result
   3.210 -            = (gpgme_op_genkey_result_t) (intptr_t) dlsym(gpgme,
   3.211 -            "gpgme_op_genkey_result");
   3.212 -        assert(gpg.gpgme_op_genkey_result);
   3.213 -
   3.214 -        gpg.gpgme_op_delete = (gpgme_op_delete_t) (intptr_t)
   3.215 -            dlsym(gpgme, "gpgme_op_delete");
   3.216 -        assert(gpg.gpgme_op_delete);
   3.217 -
   3.218 -        gpg.gpgme_op_import = (gpgme_op_import_t) (intptr_t)
   3.219 -            dlsym(gpgme, "gpgme_op_import");
   3.220 -        assert(gpg.gpgme_op_import);
   3.221 -
   3.222 -        gpg.gpgme_op_import_result
   3.223 -            = (gpgme_op_import_result_t) (intptr_t) dlsym(gpgme,
   3.224 -            "gpgme_op_import_result");
   3.225 -        assert(gpg.gpgme_op_import_result);
   3.226 -
   3.227 -        gpg.gpgme_op_export = (gpgme_op_export_t) (intptr_t)
   3.228 -            dlsym(gpgme, "gpgme_op_export");
   3.229 -        assert(gpg.gpgme_op_export);
   3.230 -
   3.231 -        gpg.gpgme_set_keylist_mode = (gpgme_set_keylist_mode_t) (intptr_t)
   3.232 -            dlsym(gpgme, "gpgme_set_keylist_mode");
   3.233 -        assert(gpg.gpgme_set_keylist_mode);
   3.234 -
   3.235 -        gpg.gpgme_get_keylist_mode = (gpgme_get_keylist_mode_t) (intptr_t)
   3.236 -            dlsym(gpgme, "gpgme_get_keylist_mode");
   3.237 -        assert(gpg.gpgme_get_keylist_mode);
   3.238 -
   3.239 -        gpg.gpgme_op_keylist_start = (gpgme_op_keylist_start_t) (intptr_t)
   3.240 -            dlsym(gpgme, "gpgme_op_keylist_start");
   3.241 -        assert(gpg.gpgme_op_keylist_start);
   3.242 -
   3.243 -        gpg.gpgme_op_keylist_next = (gpgme_op_keylist_next_t) (intptr_t)
   3.244 -            dlsym(gpgme, "gpgme_op_keylist_next");
   3.245 -        assert(gpg.gpgme_op_keylist_next);
   3.246 -
   3.247 -        gpg.gpgme_op_keylist_end = (gpgme_op_keylist_end_t) (intptr_t)
   3.248 -            dlsym(gpgme, "gpgme_op_keylist_end");
   3.249 -        assert(gpg.gpgme_op_keylist_end);
   3.250 -
   3.251 -        gpg.gpgme_op_import_keys = (gpgme_op_import_keys_t) (intptr_t)
   3.252 -            dlsym(gpgme, "gpgme_op_import_keys");
   3.253 -        assert(gpg.gpgme_op_import_keys);
   3.254 -
   3.255 -        gpg.gpgme_key_ref = (gpgme_key_ref_t) (intptr_t)
   3.256 -            dlsym(gpgme, "gpgme_key_ref");
   3.257 -        assert(gpg.gpgme_key_ref);
   3.258 -
   3.259 -        gpg.gpgme_key_unref = (gpgme_key_unref_t) (intptr_t)
   3.260 -            dlsym(gpgme, "gpgme_key_unref");
   3.261 -        assert(gpg.gpgme_key_unref);
   3.262 -
   3.263 -		gpg.gpgme_key_release = (gpgme_key_release_t)(intptr_t)
   3.264 -			dlsym(gpgme, "gpgme_key_release");
   3.265 -		assert(gpg.gpgme_key_release);
   3.266 -
   3.267 -        gpg.gpgme_op_edit = (gpgme_op_edit_t) (intptr_t)
   3.268 -            dlsym(gpgme, "gpgme_op_edit");
   3.269 -        assert(gpg.gpgme_op_edit);
   3.270 -
   3.271 -        gpg.gpgme_io_write = (gpgme_io_write_t) (intptr_t)
   3.272 -            dlsym(gpgme, "gpgme_io_write");
   3.273 -        assert(gpg.gpgme_io_write);
   3.274 +        DLOAD(gpgme_op_genkey);
   3.275 +        DLOAD(gpgme_op_genkey_result);
   3.276 +        DLOAD(gpgme_op_delete);
   3.277 +        DLOAD(gpgme_op_import);
   3.278 +        DLOAD(gpgme_op_import_result);
   3.279 +        DLOAD(gpgme_op_export);
   3.280 +        DLOAD(gpgme_set_keylist_mode);
   3.281 +        DLOAD(gpgme_get_keylist_mode);
   3.282 +        DLOAD(gpgme_op_keylist_start);
   3.283 +        DLOAD(gpgme_op_keylist_next);
   3.284 +        DLOAD(gpgme_op_keylist_end);
   3.285 +        DLOAD(gpgme_op_import_keys);
   3.286 +        DLOAD(gpgme_key_ref);
   3.287 +        DLOAD(gpgme_key_unref);
   3.288 +		DLOAD(gpgme_key_release);
   3.289 +        DLOAD(gpgme_op_edit);
   3.290 +        DLOAD(gpgme_io_write);
   3.291  
   3.292          gpg.version = gpg.gpgme_check(NULL);
   3.293  
     4.1 --- a/src/pgp_gpg_internal.h	Thu Oct 11 13:04:02 2018 +0200
     4.2 +++ b/src/pgp_gpg_internal.h	Thu Oct 11 18:05:43 2018 +0200
     4.3 @@ -7,7 +7,7 @@
     4.4  
     4.5  // init
     4.6  
     4.7 -typedef const char * (*gpgme_check_version_t)(const char*);
     4.8 +typedef const char * (*gpgme_check_t)(const char*);
     4.9  typedef gpgme_error_t (*gpgme_get_engine_info_t)(gpgme_engine_info_t *INFO);
    4.10  typedef gpgme_error_t(*gpgme_set_locale_t)(gpgme_ctx_t CTX, int CATEGORY,
    4.11      const char *VALUE);
    4.12 @@ -100,7 +100,7 @@
    4.13  
    4.14  struct gpg_s {
    4.15      const char * version;
    4.16 -    gpgme_check_version_t gpgme_check;
    4.17 +    gpgme_check_t gpgme_check;
    4.18      gpgme_get_engine_info_t gpgme_get_engine_info;
    4.19      gpgme_set_locale_t gpgme_set_locale;
    4.20      gpgme_new_t gpgme_new;
     5.1 --- a/test/src/SuiteMaker.cc	Thu Oct 11 13:04:02 2018 +0200
     5.2 +++ b/test/src/SuiteMaker.cc	Thu Oct 11 18:05:43 2018 +0200
     5.3 @@ -12,175 +12,175 @@
     5.4  #include "SuiteMaker.h"
     5.5  
     5.6  // Begin where we generate stuff
     5.7 +#include "MimeTests.h"
     5.8 +#include "UserIdCollisionTests.h"
     5.9 +#include "Engine463Tests.h"
    5.10 +#include "BloblistTests.h"
    5.11 +#include "NewUpdateIdAndMyselfTests.h"
    5.12 +#include "I18nTests.h"
    5.13 +#include "IdentityListTests.h"
    5.14 +#include "PgpBinaryTests.h"
    5.15 +#include "MistrustUndoTests.h"
    5.16 +#include "MessageNullFromTests.h"
    5.17 +#include "LeastCommonDenomColorTests.h"
    5.18 +#include "StringlistTests.h"
    5.19 +#include "PgpListKeysTests.h"
    5.20 +#include "MessageApiTests.h"
    5.21 +#include "EncryptMissingPrivateKeyTests.h"
    5.22 +#include "CaseAndDotAddressTests.h"
    5.23 +#include "UserIDAliasTests.h"
    5.24 +#include "BCCTests.h"
    5.25 +#include "BlacklistAcceptNewKeyTests.h"
    5.26 +#include "DecryptAttachPrivateKeyUntrustedTests.h"
    5.27 +#include "BlacklistTests.h"
    5.28 +#include "RevokeRegenAttachTests.h"
    5.29 +#include "PepSubjectReceivedTests.h"
    5.30 +#include "SequenceTests.h"
    5.31 +#include "HeaderKeyImportTests.h"
    5.32 +#include "EncryptAttachPrivateKeyTests.h"
    5.33 +#include "ExternalRevokeTests.h"
    5.34 +#include "KeyeditTests.h"
    5.35 +#include "LeastColorGroupTests.h"
    5.36 +#include "DecryptAttachPrivateKeyTrustedTests.h"
    5.37 +#include "TrustwordsTests.h"
    5.38 +#include "ReencryptPlusExtraKeysTests.h"
    5.39 +#include "MapAsn1Tests.h"
    5.40  #include "DecorateTests.h"
    5.41 -#include "UserIdCollisionTests.h"
    5.42 -#include "ReencryptPlusExtraKeysTests.h"
    5.43 -#include "BlacklistTests.h"
    5.44 +#include "MessageTwoPointOhTests.h"
    5.45 +#include "CrashdumpTests.h"
    5.46 +#include "StringpairListTests.h"
    5.47 +#include "EncryptForIdentityTests.h"
    5.48 +#include "TrustManipulationTests.h"
    5.49  #include "AppleMailTests.h"
    5.50 -#include "MessageTwoPointOhTests.h"
    5.51 -#include "IdentityListTests.h"
    5.52 -#include "I18nTests.h"
    5.53 -#include "Engine463Tests.h"
    5.54 -#include "DecryptAttachPrivateKeyUntrustedTests.h"
    5.55 -#include "BCCTests.h"
    5.56 -#include "LeastColorGroupTests.h"
    5.57 -#include "MistrustUndoTests.h"
    5.58 -#include "BlacklistAcceptNewKeyTests.h"
    5.59 -#include "MessageApiTests.h"
    5.60 -#include "StringlistTests.h"
    5.61 -#include "HeaderKeyImportTests.h"
    5.62 -#include "StringpairListTests.h"
    5.63 -#include "TrustManipulationTests.h"
    5.64 -#include "EncryptAttachPrivateKeyTests.h"
    5.65 -#include "BloblistTests.h"
    5.66 -#include "SequenceTests.h"
    5.67 -#include "TrustwordsTests.h"
    5.68 -#include "RevokeRegenAttachTests.h"
    5.69 -#include "EncryptMissingPrivateKeyTests.h"
    5.70 -#include "PepSubjectReceivedTests.h"
    5.71 -#include "KeyeditTests.h"
    5.72 -#include "MapAsn1Tests.h"
    5.73 -#include "PgpBinaryTests.h"
    5.74 -#include "DecryptAttachPrivateKeyTrustedTests.h"
    5.75 -#include "MessageNullFromTests.h"
    5.76 -#include "MimeTests.h"
    5.77 -#include "PgpListKeysTests.h"
    5.78 -#include "NewUpdateIdAndMyselfTests.h"
    5.79 -#include "EncryptForIdentityTests.h"
    5.80 -#include "CrashdumpTests.h"
    5.81 -#include "CaseAndDotAddressTests.h"
    5.82 -#include "LeastCommonDenomColorTests.h"
    5.83 -#include "ExternalRevokeTests.h"
    5.84 -#include "UserIDAliasTests.h"
    5.85  
    5.86  
    5.87  const char* SuiteMaker::all_suites[] = {
    5.88 +    "MimeTests",
    5.89 +    "UserIdCollisionTests",
    5.90 +    "Engine463Tests",
    5.91 +    "BloblistTests",
    5.92 +    "NewUpdateIdAndMyselfTests",
    5.93 +    "I18nTests",
    5.94 +    "IdentityListTests",
    5.95 +    "PgpBinaryTests",
    5.96 +    "MistrustUndoTests",
    5.97 +    "MessageNullFromTests",
    5.98 +    "LeastCommonDenomColorTests",
    5.99 +    "StringlistTests",
   5.100 +    "PgpListKeysTests",
   5.101 +    "MessageApiTests",
   5.102 +    "EncryptMissingPrivateKeyTests",
   5.103 +    "CaseAndDotAddressTests",
   5.104 +    "UserIDAliasTests",
   5.105 +    "BCCTests",
   5.106 +    "BlacklistAcceptNewKeyTests",
   5.107 +    "DecryptAttachPrivateKeyUntrustedTests",
   5.108 +    "BlacklistTests",
   5.109 +    "RevokeRegenAttachTests",
   5.110 +    "PepSubjectReceivedTests",
   5.111 +    "SequenceTests",
   5.112 +    "HeaderKeyImportTests",
   5.113 +    "EncryptAttachPrivateKeyTests",
   5.114 +    "ExternalRevokeTests",
   5.115 +    "KeyeditTests",
   5.116 +    "LeastColorGroupTests",
   5.117 +    "DecryptAttachPrivateKeyTrustedTests",
   5.118 +    "TrustwordsTests",
   5.119 +    "ReencryptPlusExtraKeysTests",
   5.120 +    "MapAsn1Tests",
   5.121      "DecorateTests",
   5.122 -    "UserIdCollisionTests",
   5.123 -    "ReencryptPlusExtraKeysTests",
   5.124 -    "BlacklistTests",
   5.125 +    "MessageTwoPointOhTests",
   5.126 +    "CrashdumpTests",
   5.127 +    "StringpairListTests",
   5.128 +    "EncryptForIdentityTests",
   5.129 +    "TrustManipulationTests",
   5.130      "AppleMailTests",
   5.131 -    "MessageTwoPointOhTests",
   5.132 -    "IdentityListTests",
   5.133 -    "I18nTests",
   5.134 -    "Engine463Tests",
   5.135 -    "DecryptAttachPrivateKeyUntrustedTests",
   5.136 -    "BCCTests",
   5.137 -    "LeastColorGroupTests",
   5.138 -    "MistrustUndoTests",
   5.139 -    "BlacklistAcceptNewKeyTests",
   5.140 -    "MessageApiTests",
   5.141 -    "StringlistTests",
   5.142 -    "HeaderKeyImportTests",
   5.143 -    "StringpairListTests",
   5.144 -    "TrustManipulationTests",
   5.145 -    "EncryptAttachPrivateKeyTests",
   5.146 -    "BloblistTests",
   5.147 -    "SequenceTests",
   5.148 -    "TrustwordsTests",
   5.149 -    "RevokeRegenAttachTests",
   5.150 -    "EncryptMissingPrivateKeyTests",
   5.151 -    "PepSubjectReceivedTests",
   5.152 -    "KeyeditTests",
   5.153 -    "MapAsn1Tests",
   5.154 -    "PgpBinaryTests",
   5.155 -    "DecryptAttachPrivateKeyTrustedTests",
   5.156 -    "MessageNullFromTests",
   5.157 -    "MimeTests",
   5.158 -    "PgpListKeysTests",
   5.159 -    "NewUpdateIdAndMyselfTests",
   5.160 -    "EncryptForIdentityTests",
   5.161 -    "CrashdumpTests",
   5.162 -    "CaseAndDotAddressTests",
   5.163 -    "LeastCommonDenomColorTests",
   5.164 -    "ExternalRevokeTests",
   5.165 -    "UserIDAliasTests",
   5.166  };
   5.167  
   5.168  // This file is generated, so magic constants are ok.
   5.169  int SuiteMaker::num_suites = 40;
   5.170  
   5.171  void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
   5.172 -    if (strcmp(test_class_name, "DecorateTests") == 0)
   5.173 -        *test_suite = new DecorateTests(test_class_name, test_home);
   5.174 +    if (strcmp(test_class_name, "MimeTests") == 0)
   5.175 +        *test_suite = new MimeTests(test_class_name, test_home);
   5.176      else if (strcmp(test_class_name, "UserIdCollisionTests") == 0)
   5.177          *test_suite = new UserIdCollisionTests(test_class_name, test_home);
   5.178 +    else if (strcmp(test_class_name, "Engine463Tests") == 0)
   5.179 +        *test_suite = new Engine463Tests(test_class_name, test_home);
   5.180 +    else if (strcmp(test_class_name, "BloblistTests") == 0)
   5.181 +        *test_suite = new BloblistTests(test_class_name, test_home);
   5.182 +    else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
   5.183 +        *test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
   5.184 +    else if (strcmp(test_class_name, "I18nTests") == 0)
   5.185 +        *test_suite = new I18nTests(test_class_name, test_home);
   5.186 +    else if (strcmp(test_class_name, "IdentityListTests") == 0)
   5.187 +        *test_suite = new IdentityListTests(test_class_name, test_home);
   5.188 +    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
   5.189 +        *test_suite = new PgpBinaryTests(test_class_name, test_home);
   5.190 +    else if (strcmp(test_class_name, "MistrustUndoTests") == 0)
   5.191 +        *test_suite = new MistrustUndoTests(test_class_name, test_home);
   5.192 +    else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
   5.193 +        *test_suite = new MessageNullFromTests(test_class_name, test_home);
   5.194 +    else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
   5.195 +        *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
   5.196 +    else if (strcmp(test_class_name, "StringlistTests") == 0)
   5.197 +        *test_suite = new StringlistTests(test_class_name, test_home);
   5.198 +    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
   5.199 +        *test_suite = new PgpListKeysTests(test_class_name, test_home);
   5.200 +    else if (strcmp(test_class_name, "MessageApiTests") == 0)
   5.201 +        *test_suite = new MessageApiTests(test_class_name, test_home);
   5.202 +    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
   5.203 +        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
   5.204 +    else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
   5.205 +        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
   5.206 +    else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
   5.207 +        *test_suite = new UserIDAliasTests(test_class_name, test_home);
   5.208 +    else if (strcmp(test_class_name, "BCCTests") == 0)
   5.209 +        *test_suite = new BCCTests(test_class_name, test_home);
   5.210 +    else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
   5.211 +        *test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
   5.212 +    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
   5.213 +        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
   5.214 +    else if (strcmp(test_class_name, "BlacklistTests") == 0)
   5.215 +        *test_suite = new BlacklistTests(test_class_name, test_home);
   5.216 +    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
   5.217 +        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
   5.218 +    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
   5.219 +        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
   5.220 +    else if (strcmp(test_class_name, "SequenceTests") == 0)
   5.221 +        *test_suite = new SequenceTests(test_class_name, test_home);
   5.222 +    else if (strcmp(test_class_name, "HeaderKeyImportTests") == 0)
   5.223 +        *test_suite = new HeaderKeyImportTests(test_class_name, test_home);
   5.224 +    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
   5.225 +        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
   5.226 +    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
   5.227 +        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
   5.228 +    else if (strcmp(test_class_name, "KeyeditTests") == 0)
   5.229 +        *test_suite = new KeyeditTests(test_class_name, test_home);
   5.230 +    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
   5.231 +        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
   5.232 +    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
   5.233 +        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
   5.234 +    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
   5.235 +        *test_suite = new TrustwordsTests(test_class_name, test_home);
   5.236      else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
   5.237          *test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
   5.238 -    else if (strcmp(test_class_name, "BlacklistTests") == 0)
   5.239 -        *test_suite = new BlacklistTests(test_class_name, test_home);
   5.240 +    else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
   5.241 +        *test_suite = new MapAsn1Tests(test_class_name, test_home);
   5.242 +    else if (strcmp(test_class_name, "DecorateTests") == 0)
   5.243 +        *test_suite = new DecorateTests(test_class_name, test_home);
   5.244 +    else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
   5.245 +        *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
   5.246 +    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
   5.247 +        *test_suite = new CrashdumpTests(test_class_name, test_home);
   5.248 +    else if (strcmp(test_class_name, "StringpairListTests") == 0)
   5.249 +        *test_suite = new StringpairListTests(test_class_name, test_home);
   5.250 +    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
   5.251 +        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
   5.252 +    else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
   5.253 +        *test_suite = new TrustManipulationTests(test_class_name, test_home);
   5.254      else if (strcmp(test_class_name, "AppleMailTests") == 0)
   5.255          *test_suite = new AppleMailTests(test_class_name, test_home);
   5.256 -    else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
   5.257 -        *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
   5.258 -    else if (strcmp(test_class_name, "IdentityListTests") == 0)
   5.259 -        *test_suite = new IdentityListTests(test_class_name, test_home);
   5.260 -    else if (strcmp(test_class_name, "I18nTests") == 0)
   5.261 -        *test_suite = new I18nTests(test_class_name, test_home);
   5.262 -    else if (strcmp(test_class_name, "Engine463Tests") == 0)
   5.263 -        *test_suite = new Engine463Tests(test_class_name, test_home);
   5.264 -    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
   5.265 -        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
   5.266 -    else if (strcmp(test_class_name, "BCCTests") == 0)
   5.267 -        *test_suite = new BCCTests(test_class_name, test_home);
   5.268 -    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
   5.269 -        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
   5.270 -    else if (strcmp(test_class_name, "MistrustUndoTests") == 0)
   5.271 -        *test_suite = new MistrustUndoTests(test_class_name, test_home);
   5.272 -    else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
   5.273 -        *test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
   5.274 -    else if (strcmp(test_class_name, "MessageApiTests") == 0)
   5.275 -        *test_suite = new MessageApiTests(test_class_name, test_home);
   5.276 -    else if (strcmp(test_class_name, "StringlistTests") == 0)
   5.277 -        *test_suite = new StringlistTests(test_class_name, test_home);
   5.278 -    else if (strcmp(test_class_name, "HeaderKeyImportTests") == 0)
   5.279 -        *test_suite = new HeaderKeyImportTests(test_class_name, test_home);
   5.280 -    else if (strcmp(test_class_name, "StringpairListTests") == 0)
   5.281 -        *test_suite = new StringpairListTests(test_class_name, test_home);
   5.282 -    else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
   5.283 -        *test_suite = new TrustManipulationTests(test_class_name, test_home);
   5.284 -    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
   5.285 -        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
   5.286 -    else if (strcmp(test_class_name, "BloblistTests") == 0)
   5.287 -        *test_suite = new BloblistTests(test_class_name, test_home);
   5.288 -    else if (strcmp(test_class_name, "SequenceTests") == 0)
   5.289 -        *test_suite = new SequenceTests(test_class_name, test_home);
   5.290 -    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
   5.291 -        *test_suite = new TrustwordsTests(test_class_name, test_home);
   5.292 -    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
   5.293 -        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
   5.294 -    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
   5.295 -        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
   5.296 -    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
   5.297 -        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
   5.298 -    else if (strcmp(test_class_name, "KeyeditTests") == 0)
   5.299 -        *test_suite = new KeyeditTests(test_class_name, test_home);
   5.300 -    else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
   5.301 -        *test_suite = new MapAsn1Tests(test_class_name, test_home);
   5.302 -    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
   5.303 -        *test_suite = new PgpBinaryTests(test_class_name, test_home);
   5.304 -    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
   5.305 -        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
   5.306 -    else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
   5.307 -        *test_suite = new MessageNullFromTests(test_class_name, test_home);
   5.308 -    else if (strcmp(test_class_name, "MimeTests") == 0)
   5.309 -        *test_suite = new MimeTests(test_class_name, test_home);
   5.310 -    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
   5.311 -        *test_suite = new PgpListKeysTests(test_class_name, test_home);
   5.312 -    else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
   5.313 -        *test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
   5.314 -    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
   5.315 -        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
   5.316 -    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
   5.317 -        *test_suite = new CrashdumpTests(test_class_name, test_home);
   5.318 -    else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
   5.319 -        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
   5.320 -    else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
   5.321 -        *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
   5.322 -    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
   5.323 -        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
   5.324 -    else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
   5.325 -        *test_suite = new UserIDAliasTests(test_class_name, test_home);
   5.326  }
   5.327  
   5.328  void SuiteMaker::suitemaker_buildlist(const char** test_class_names, int num_to_run, const char* test_home, std::vector<Test::Suite*>& test_suites) {