test stuff
authorKrista Bennett <krista@pep-project.org>
Fri, 12 Oct 2018 13:56:59 +0200
changeset 3050f62ab227276f
parent 3049 edbd93b17440
parent 3048 c7bc7d4a1cc1
child 3051 084c00652ac9
test stuff
test/src/SuiteMaker.cc
test/src/engine_tests/BlacklistTests.cc
     1.1 --- a/build-mac/pEpEngine.xcodeproj/project.pbxproj	Fri Oct 12 13:11:41 2018 +0200
     1.2 +++ b/build-mac/pEpEngine.xcodeproj/project.pbxproj	Fri Oct 12 13:56:59 2018 +0200
     1.3 @@ -135,6 +135,8 @@
     1.4  		64A826891B455D0800EECAF0 /* trans_auto.c in Sources */ = {isa = PBXBuildFile; fileRef = 64A826731B455D0800EECAF0 /* trans_auto.c */; };
     1.5  		64A8268A1B455D0800EECAF0 /* transport.c in Sources */ = {isa = PBXBuildFile; fileRef = 64A826751B455D0800EECAF0 /* transport.c */; };
     1.6  		64A8268C1B455D9D00EECAF0 /* pEpEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 64A826611B455D0800EECAF0 /* pEpEngine.h */; };
     1.7 +		C46EBAED216E445F0042A6A3 /* base64.c in Sources */ = {isa = PBXBuildFile; fileRef = C46EBAE7216E445F0042A6A3 /* base64.c */; };
     1.8 +		C46EBAEE216E445F0042A6A3 /* base64.h in Headers */ = {isa = PBXBuildFile; fileRef = C46EBAEC216E445F0042A6A3 /* base64.h */; };
     1.9  /* End PBXBuildFile section */
    1.10  
    1.11  /* Begin PBXContainerItemProxy section */
    1.12 @@ -350,6 +352,8 @@
    1.13  		64A826771B455D0800EECAF0 /* wrappers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wrappers.h; path = ../src/wrappers.h; sourceTree = "<group>"; };
    1.14  		64DA240C1B832EA0000BEE80 /* netpgp.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = netpgp.xcodeproj; path = "../../netpgp-et/netpgp-xcode/netpgp.xcodeproj"; sourceTree = "<group>"; };
    1.15  		64DA24121B832EBA000BEE80 /* libetpan.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libetpan.xcodeproj; path = "../../libetpan/build-mac/libetpan.xcodeproj"; sourceTree = "<group>"; };
    1.16 +		C46EBAE7216E445F0042A6A3 /* base64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = base64.c; path = ../src/base64.c; sourceTree = "<group>"; };
    1.17 +		C46EBAEC216E445F0042A6A3 /* base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = base64.h; path = ../src/base64.h; sourceTree = "<group>"; };
    1.18  /* End PBXFileReference section */
    1.19  
    1.20  /* Begin PBXFrameworksBuildPhase section */
    1.21 @@ -518,6 +522,8 @@
    1.22  		64A8264B1B455C5600EECAF0 /* srcref */ = {
    1.23  			isa = PBXGroup;
    1.24  			children = (
    1.25 +				C46EBAE7216E445F0042A6A3 /* base64.c */,
    1.26 +				C46EBAEC216E445F0042A6A3 /* base64.h */,
    1.27  				438C43B42167752C00C7425B /* labeled_int_list.c */,
    1.28  				438C43AF2167752C00C7425B /* labeled_int_list.h */,
    1.29  				4337082D203C075A004E6547 /* sqlite3.c */,
    1.30 @@ -638,6 +644,7 @@
    1.31  				646C41231D510CD800C63EFF /* NativeEnumerated.h in Headers */,
    1.32  				646C41071D510CD800C63EFF /* constr_SET_OF.h in Headers */,
    1.33  				646C414B1D510D2C00C63EFF /* sync.h in Headers */,
    1.34 +				C46EBAEE216E445F0042A6A3 /* base64.h in Headers */,
    1.35  				646C411B1D510CD800C63EFF /* Identity.h in Headers */,
    1.36  				646C412B1D510CD800C63EFF /* per_encoder.h in Headers */,
    1.37  				646C40F91D510CD800C63EFF /* ber_tlv_length.h in Headers */,
    1.38 @@ -870,6 +877,7 @@
    1.39  				646C412A1D510CD800C63EFF /* per_encoder.c in Sources */,
    1.40  				646C412E1D510CD800C63EFF /* per_support.c in Sources */,
    1.41  				64A826781B455D0800EECAF0 /* bloblist.c in Sources */,
    1.42 +				C46EBAED216E445F0042A6A3 /* base64.c in Sources */,
    1.43  				430BCC492015EE800077E998 /* pEp_string.c in Sources */,
    1.44  				646C41041D510CD800C63EFF /* constr_SEQUENCE.c in Sources */,
    1.45  				43370833203C075A004E6547 /* sqlite3.c in Sources */,
     2.1 --- a/src/base64.c	Fri Oct 12 13:11:41 2018 +0200
     2.2 +++ b/src/base64.c	Fri Oct 12 13:56:59 2018 +0200
     2.3 @@ -216,4 +216,5 @@
     2.4  pEp_error:
     2.5      free(blobby);
     2.6      return NULL;
     2.7 -}    
     2.8 \ No newline at end of file
     2.9 +}    
    2.10 +
     3.1 --- a/src/labeled_int_list.c	Fri Oct 12 13:11:41 2018 +0200
     3.2 +++ b/src/labeled_int_list.c	Fri Oct 12 13:56:59 2018 +0200
     3.3 @@ -118,4 +118,5 @@
     3.4          len++;
     3.5  
     3.6      return len;
     3.7 -}
     3.8 \ No newline at end of file
     3.9 +}
    3.10 +
     4.1 --- a/src/message_api.c	Fri Oct 12 13:11:41 2018 +0200
     4.2 +++ b/src/message_api.c	Fri Oct 12 13:56:59 2018 +0200
     4.3 @@ -3632,6 +3632,8 @@
     4.4                                                true);
     4.5                      if (status != PEP_STATUS_OK || il->ident->fpr == NULL) {
     4.6                          il->ident->comm_type = PEP_ct_key_not_found;
     4.7 +                        if (*max_comm_type > PEP_ct_no_encryption)
     4.8 +                            *max_comm_type = PEP_ct_no_encryption;
     4.9                      }
    4.10                  }    
    4.11              }
     5.1 --- a/src/pgp_gpg.c	Fri Oct 12 13:11:41 2018 +0200
     5.2 +++ b/src/pgp_gpg.c	Fri Oct 12 13:56:59 2018 +0200
     5.3 @@ -11,6 +11,12 @@
     5.4  
     5.5  #define _GPGERR(X) ((X) & 0xffffL)
     5.6  
     5.7 +#ifdef NODLSYM
     5.8 +#define DLOAD(X) gpg.X = X
     5.9 +#else
    5.10 +#define DLOAD(X) gpg.X = (X ## _t) (intptr_t) dlsym(gpgme, #X); assert(gpg.X)
    5.11 +#endif
    5.12 +
    5.13  static void *gpgme;
    5.14  static struct gpg_s gpg;
    5.15  
    5.16 @@ -296,6 +302,7 @@
    5.17              goto pep_error;
    5.18          }
    5.19  
    5.20 +#ifndef NODLSYM
    5.21          gpgme = dlopen(LIBGPGME, RTLD_LAZY);
    5.22          if (gpgme == NULL) {
    5.23              // FIXME: Hotfix here?
    5.24 @@ -303,13 +310,11 @@
    5.25              status = PEP_INIT_CANNOT_LOAD_GPGME;
    5.26              goto pep_error;
    5.27          }
    5.28 +#endif
    5.29  
    5.30          memset(&gpg, 0, sizeof(struct gpg_s));
    5.31  
    5.32 -        gpg.gpgme_get_engine_info
    5.33 -            = (gpgme_get_engine_info_t) (intptr_t) dlsym(gpgme,
    5.34 -            "gpgme_get_engine_info");
    5.35 -        assert(gpg.gpgme_get_engine_info);
    5.36 +        DLOAD(gpgme_get_engine_info);
    5.37  
    5.38          gpgme_engine_info_t info;
    5.39          int err = gpg.gpgme_get_engine_info(&info);
    5.40 @@ -325,208 +330,61 @@
    5.41          if (status != PEP_STATUS_OK)
    5.42              return status;
    5.43  
    5.44 -        gpg.gpgme_set_locale
    5.45 -            = (gpgme_set_locale_t) (intptr_t) dlsym(gpgme,
    5.46 -            "gpgme_set_locale");
    5.47 -        assert(gpg.gpgme_set_locale);
    5.48 +#ifdef NODLSYM
    5.49 +        gpg.gpgme_check = gpgme_check_version;
    5.50 +#else
    5.51 +        gpg.gpgme_check = (gpgme_check_t) (intptr_t) dlsym(gpgme, "gpgme_check_version");
    5.52 +        assert(gpg.gpgme_check);
    5.53 +#endif
    5.54  
    5.55 -        gpg.gpgme_check
    5.56 -            = (gpgme_check_version_t) (intptr_t) dlsym(gpgme,
    5.57 -            "gpgme_check_version");
    5.58 -        assert(gpg.gpgme_check);
    5.59 +        DLOAD(gpgme_set_locale);
    5.60 +        DLOAD(gpgme_new);
    5.61 +        DLOAD(gpgme_release);
    5.62 +        DLOAD(gpgme_set_protocol);
    5.63 +        DLOAD(gpgme_set_armor);
    5.64 +        DLOAD(gpgme_data_new);
    5.65 +        DLOAD(gpgme_data_new_from_mem);
    5.66 +        DLOAD(gpgme_data_new_from_cbs);
    5.67 +        DLOAD(gpgme_data_release);
    5.68 +        DLOAD(gpgme_data_identify);
    5.69 +        DLOAD(gpgme_data_seek);
    5.70 +        DLOAD(gpgme_data_read);
    5.71 +        DLOAD(gpgme_op_decrypt);
    5.72 +        DLOAD(gpgme_op_verify);
    5.73 +        DLOAD(gpgme_op_decrypt_verify);
    5.74 +        DLOAD(gpgme_op_decrypt_result);
    5.75 +        DLOAD(gpgme_op_encrypt_sign);
    5.76 +        DLOAD(gpgme_op_encrypt);
    5.77 +        DLOAD(gpgme_op_verify_result);
    5.78 +        DLOAD(gpgme_signers_clear);
    5.79 +        DLOAD(gpgme_signers_add);
    5.80 +        DLOAD(gpgme_set_passphrase_cb);
    5.81 +        DLOAD(gpgme_get_key);
    5.82 +        
    5.83 +#ifdef GPGME_VERSION_NUMBER
    5.84 +#if (GPGME_VERSION_NUMBER >= 0x010700)
    5.85 +        DLOAD(gpgme_op_createkey);
    5.86 +        DLOAD(gpgme_op_createsubkey);
    5.87 +#endif
    5.88 +#endif
    5.89  
    5.90 -        gpg.gpgme_new
    5.91 -            = (gpgme_new_t) (intptr_t) dlsym(gpgme, "gpgme_new");
    5.92 -        assert(gpg.gpgme_new);
    5.93 -
    5.94 -        gpg.gpgme_release
    5.95 -            = (gpgme_release_t) (intptr_t) dlsym(gpgme, "gpgme_release");
    5.96 -        assert(gpg.gpgme_release);
    5.97 -
    5.98 -        gpg.gpgme_set_protocol
    5.99 -            = (gpgme_set_protocol_t) (intptr_t) dlsym(gpgme,
   5.100 -            "gpgme_set_protocol");
   5.101 -        assert(gpg.gpgme_set_protocol);
   5.102 -
   5.103 -        gpg.gpgme_set_armor
   5.104 -            = (gpgme_set_armor_t) (intptr_t) dlsym(gpgme,
   5.105 -            "gpgme_set_armor");
   5.106 -        assert(gpg.gpgme_set_armor);
   5.107 -
   5.108 -        gpg.gpgme_data_new
   5.109 -            = (gpgme_data_new_t) (intptr_t) dlsym(gpgme,
   5.110 -            "gpgme_data_new");
   5.111 -        assert(gpg.gpgme_data_new);
   5.112 -
   5.113 -        gpg.gpgme_data_new_from_mem
   5.114 -            = (gpgme_data_new_from_mem_t) (intptr_t) dlsym(gpgme,
   5.115 -            "gpgme_data_new_from_mem");
   5.116 -        assert(gpg.gpgme_data_new_from_mem);
   5.117 -
   5.118 -        gpg.gpgme_data_new_from_cbs
   5.119 -            = (gpgme_data_new_from_cbs_t) (intptr_t) dlsym(gpgme,
   5.120 -            "gpgme_data_new_from_cbs");
   5.121 -        assert(gpg.gpgme_data_new_from_cbs);
   5.122 -
   5.123 -        gpg.gpgme_data_release
   5.124 -            = (gpgme_data_release_t) (intptr_t) dlsym(gpgme,
   5.125 -            "gpgme_data_release");
   5.126 -        assert(gpg.gpgme_data_release);
   5.127 -
   5.128 -        gpg.gpgme_data_identify
   5.129 -            = (gpgme_data_identify_t) (intptr_t) dlsym(gpgme,
   5.130 -            "gpgme_data_identify");
   5.131 -        assert(gpg.gpgme_data_identify);
   5.132 -
   5.133 -        gpg.gpgme_data_seek
   5.134 -            = (gpgme_data_seek_t) (intptr_t) dlsym(gpgme,
   5.135 -            "gpgme_data_seek");
   5.136 -        assert(gpg.gpgme_data_seek);
   5.137 -
   5.138 -        gpg.gpgme_data_read
   5.139 -            = (gpgme_data_read_t) (intptr_t) dlsym(gpgme,
   5.140 -            "gpgme_data_read");
   5.141 -        assert(gpg.gpgme_data_read);
   5.142 -
   5.143 -        gpg.gpgme_op_decrypt
   5.144 -            = (gpgme_op_decrypt_t) (intptr_t) dlsym(gpgme,
   5.145 -            "gpgme_op_decrypt");
   5.146 -        assert(gpg.gpgme_op_decrypt);
   5.147 -
   5.148 -        gpg.gpgme_op_verify
   5.149 -            = (gpgme_op_verify_t) (intptr_t) dlsym(gpgme,
   5.150 -            "gpgme_op_verify");
   5.151 -        assert(gpg.gpgme_op_verify);
   5.152 -
   5.153 -        gpg.gpgme_op_decrypt_verify
   5.154 -            = (gpgme_op_decrypt_verify_t) (intptr_t) dlsym(gpgme,
   5.155 -            "gpgme_op_decrypt_verify");
   5.156 -        assert(gpg.gpgme_op_decrypt_verify);
   5.157 -
   5.158 -        gpg.gpgme_op_decrypt_result
   5.159 -            = (gpgme_op_decrypt_result_t) (intptr_t) dlsym(gpgme,
   5.160 -            "gpgme_op_decrypt_result");
   5.161 -        assert(gpg.gpgme_op_decrypt_result);
   5.162 -
   5.163 -        gpg.gpgme_op_encrypt_sign
   5.164 -            = (gpgme_op_encrypt_sign_t) (intptr_t) dlsym(gpgme,
   5.165 -            "gpgme_op_encrypt_sign");
   5.166 -        assert(gpg.gpgme_op_encrypt_sign);
   5.167 -
   5.168 -        gpg.gpgme_op_encrypt
   5.169 -            = (gpgme_op_encrypt_t) (intptr_t) dlsym(gpgme,
   5.170 -            "gpgme_op_encrypt");
   5.171 -        assert(gpg.gpgme_op_encrypt);
   5.172 -
   5.173 -        gpg.gpgme_op_verify_result
   5.174 -            = (gpgme_op_verify_result_t) (intptr_t) dlsym(gpgme,
   5.175 -            "gpgme_op_verify_result");
   5.176 -        assert(gpg.gpgme_op_verify_result);
   5.177 -
   5.178 -        gpg.gpgme_signers_clear
   5.179 -            = (gpgme_signers_clear_t) (intptr_t) dlsym(gpgme,
   5.180 -            "gpgme_signers_clear");
   5.181 -        assert(gpg.gpgme_signers_clear);
   5.182 -
   5.183 -        gpg.gpgme_signers_add
   5.184 -            = (gpgme_signers_add_t) (intptr_t) dlsym(gpgme,
   5.185 -            "gpgme_signers_add");
   5.186 -        assert(gpg.gpgme_signers_add);
   5.187 -
   5.188 -        gpg.gpgme_set_passphrase_cb
   5.189 -            = (gpgme_set_passphrase_cb_t) (intptr_t) dlsym(gpgme,
   5.190 -            "gpgme_set_passphrase_cb");
   5.191 -        assert(gpg.gpgme_set_passphrase_cb);
   5.192 -
   5.193 -        gpg.gpgme_get_key
   5.194 -            = (gpgme_get_key_t) (intptr_t) dlsym(gpgme, "gpgme_get_key");
   5.195 -        assert(gpg.gpgme_get_key);
   5.196 -        
   5.197 -        #ifdef GPGME_VERSION_NUMBER
   5.198 -        #if (GPGME_VERSION_NUMBER >= 0x010700)
   5.199 -                gpg.gpgme_op_createkey
   5.200 -                    = (gpgme_op_createkey_t) (intptr_t) dlsym(gpgme,
   5.201 -                    "gpgme_op_createkey");
   5.202 -                assert(gpg.gpgme_op_createkey);
   5.203 -                
   5.204 -                gpg.gpgme_op_createsubkey
   5.205 -                    = (gpgme_op_createsubkey_t) (intptr_t) dlsym(gpgme,
   5.206 -                    "gpgme_op_createsubkey");
   5.207 -                assert(gpg.gpgme_op_createsubkey);
   5.208 -
   5.209 -        #endif
   5.210 -        #endif
   5.211 -        
   5.212 -        gpg.gpgme_op_genkey
   5.213 -            = (gpgme_op_genkey_t) (intptr_t) dlsym(gpgme,
   5.214 -            "gpgme_op_genkey");
   5.215 -        assert(gpg.gpgme_op_genkey);
   5.216 -
   5.217 -        gpg.gpgme_op_genkey_result
   5.218 -            = (gpgme_op_genkey_result_t) (intptr_t) dlsym(gpgme,
   5.219 -            "gpgme_op_genkey_result");
   5.220 -        assert(gpg.gpgme_op_genkey_result);
   5.221 -
   5.222 -        gpg.gpgme_op_delete = (gpgme_op_delete_t) (intptr_t)
   5.223 -            dlsym(gpgme, "gpgme_op_delete");
   5.224 -        assert(gpg.gpgme_op_delete);
   5.225 -
   5.226 -        gpg.gpgme_op_import = (gpgme_op_import_t) (intptr_t)
   5.227 -            dlsym(gpgme, "gpgme_op_import");
   5.228 -        assert(gpg.gpgme_op_import);
   5.229 -
   5.230 -        gpg.gpgme_op_import_result
   5.231 -            = (gpgme_op_import_result_t) (intptr_t) dlsym(gpgme,
   5.232 -            "gpgme_op_import_result");
   5.233 -        assert(gpg.gpgme_op_import_result);
   5.234 -
   5.235 -        gpg.gpgme_op_export = (gpgme_op_export_t) (intptr_t)
   5.236 -            dlsym(gpgme, "gpgme_op_export");
   5.237 -        assert(gpg.gpgme_op_export);
   5.238 -
   5.239 -        gpg.gpgme_set_keylist_mode = (gpgme_set_keylist_mode_t) (intptr_t)
   5.240 -            dlsym(gpgme, "gpgme_set_keylist_mode");
   5.241 -        assert(gpg.gpgme_set_keylist_mode);
   5.242 -
   5.243 -        gpg.gpgme_get_keylist_mode = (gpgme_get_keylist_mode_t) (intptr_t)
   5.244 -            dlsym(gpgme, "gpgme_get_keylist_mode");
   5.245 -        assert(gpg.gpgme_get_keylist_mode);
   5.246 -
   5.247 -        gpg.gpgme_op_keylist_start = (gpgme_op_keylist_start_t) (intptr_t)
   5.248 -            dlsym(gpgme, "gpgme_op_keylist_start");
   5.249 -        assert(gpg.gpgme_op_keylist_start);
   5.250 -
   5.251 -        gpg.gpgme_op_keylist_next = (gpgme_op_keylist_next_t) (intptr_t)
   5.252 -            dlsym(gpgme, "gpgme_op_keylist_next");
   5.253 -        assert(gpg.gpgme_op_keylist_next);
   5.254 -
   5.255 -        gpg.gpgme_op_keylist_end = (gpgme_op_keylist_end_t) (intptr_t)
   5.256 -            dlsym(gpgme, "gpgme_op_keylist_end");
   5.257 -        assert(gpg.gpgme_op_keylist_end);
   5.258 -
   5.259 -        gpg.gpgme_op_import_keys = (gpgme_op_import_keys_t) (intptr_t)
   5.260 -            dlsym(gpgme, "gpgme_op_import_keys");
   5.261 -        assert(gpg.gpgme_op_import_keys);
   5.262 -
   5.263 -        gpg.gpgme_key_ref = (gpgme_key_ref_t) (intptr_t)
   5.264 -            dlsym(gpgme, "gpgme_key_ref");
   5.265 -        assert(gpg.gpgme_key_ref);
   5.266 -
   5.267 -        gpg.gpgme_key_unref = (gpgme_key_unref_t) (intptr_t)
   5.268 -            dlsym(gpgme, "gpgme_key_unref");
   5.269 -        assert(gpg.gpgme_key_unref);
   5.270 -
   5.271 -		gpg.gpgme_key_release = (gpgme_key_release_t)(intptr_t)
   5.272 -			dlsym(gpgme, "gpgme_key_release");
   5.273 -		assert(gpg.gpgme_key_release);
   5.274 -
   5.275 -        gpg.gpgme_op_edit = (gpgme_op_edit_t) (intptr_t)
   5.276 -            dlsym(gpgme, "gpgme_op_edit");
   5.277 -        assert(gpg.gpgme_op_edit);
   5.278 -
   5.279 -        gpg.gpgme_io_write = (gpgme_io_write_t) (intptr_t)
   5.280 -            dlsym(gpgme, "gpgme_io_write");
   5.281 -        assert(gpg.gpgme_io_write);
   5.282 +        DLOAD(gpgme_op_genkey);
   5.283 +        DLOAD(gpgme_op_genkey_result);
   5.284 +        DLOAD(gpgme_op_delete);
   5.285 +        DLOAD(gpgme_op_import);
   5.286 +        DLOAD(gpgme_op_import_result);
   5.287 +        DLOAD(gpgme_op_export);
   5.288 +        DLOAD(gpgme_set_keylist_mode);
   5.289 +        DLOAD(gpgme_get_keylist_mode);
   5.290 +        DLOAD(gpgme_op_keylist_start);
   5.291 +        DLOAD(gpgme_op_keylist_next);
   5.292 +        DLOAD(gpgme_op_keylist_end);
   5.293 +        DLOAD(gpgme_op_import_keys);
   5.294 +        DLOAD(gpgme_key_ref);
   5.295 +        DLOAD(gpgme_key_unref);
   5.296 +		DLOAD(gpgme_key_release);
   5.297 +        DLOAD(gpgme_op_edit);
   5.298 +        DLOAD(gpgme_io_write);
   5.299  
   5.300          gpg.version = gpg.gpgme_check(NULL);
   5.301  
     6.1 --- a/src/pgp_gpg_internal.h	Fri Oct 12 13:11:41 2018 +0200
     6.2 +++ b/src/pgp_gpg_internal.h	Fri Oct 12 13:56:59 2018 +0200
     6.3 @@ -7,7 +7,7 @@
     6.4  
     6.5  // init
     6.6  
     6.7 -typedef const char * (*gpgme_check_version_t)(const char*);
     6.8 +typedef const char * (*gpgme_check_t)(const char*);
     6.9  typedef gpgme_error_t (*gpgme_get_engine_info_t)(gpgme_engine_info_t *INFO);
    6.10  typedef gpgme_error_t(*gpgme_set_locale_t)(gpgme_ctx_t CTX, int CATEGORY,
    6.11      const char *VALUE);
    6.12 @@ -100,7 +100,7 @@
    6.13  
    6.14  struct gpg_s {
    6.15      const char * version;
    6.16 -    gpgme_check_version_t gpgme_check;
    6.17 +    gpgme_check_t gpgme_check;
    6.18      gpgme_get_engine_info_t gpgme_get_engine_info;
    6.19      gpgme_set_locale_t gpgme_set_locale;
    6.20      gpgme_new_t gpgme_new;
     7.1 --- a/test/src/engine_tests/BlacklistTests.cc	Fri Oct 12 13:11:41 2018 +0200
     7.2 +++ b/test/src/engine_tests/BlacklistTests.cc	Fri Oct 12 13:56:59 2018 +0200
     7.3 @@ -20,6 +20,8 @@
     7.4  
     7.5  #include <cpptest.h>
     7.6  
     7.7 +#include <assert.h>
     7.8 +
     7.9  #include "pEpEngine.h"
    7.10  
    7.11  #include "blacklist.h"
    7.12 @@ -143,6 +145,25 @@
    7.13               << "Expected it to be empty or (possibly) " << bl_fpr_2 << endl;
    7.14      TEST_ASSERT_MSG((!(blacklisted_identity->fpr) || blacklisted_identity->fpr[0] == '\0'|| (strcmp(blacklisted_identity->fpr, bl_fpr_2) == 0)), "!(blacklisted_identity->fpr) || blacklisted_identity->fpr[0] == '\0'|| (strcmp(blacklisted_identity->fpr, bl_fpr_2) == 0)");
    7.15  
    7.16 +    pEp_identity *me = new_identity("alice@peptest.ch", NULL, "423", "Alice Miller");
    7.17 +    assert(me);
    7.18 +    PEP_STATUS status24 = myself(session, me);
    7.19 +    TEST_ASSERT_MSG((status24 == PEP_STATUS_OK), "myself: status24 == PEP_STATUS_OK");
    7.20 +
    7.21 +    message *msg23 = new_message(PEP_dir_outgoing);
    7.22 +    assert(msg23);
    7.23 +    msg23->from = me;
    7.24 +    msg23->to = new_identity_list(identity_dup(blacklisted_identity));
    7.25 +    assert(msg23->to && msg23->to->ident);
    7.26 +    PEP_rating rating23;
    7.27 +
    7.28 +    cout << "testing outgoing_message_rating() with blacklisted key in to\n";
    7.29 +    PEP_STATUS status23 = outgoing_message_rating(session, msg23, &rating23);
    7.30 +    TEST_ASSERT_MSG((status23 == PEP_STATUS_OK), "outgoing_message_rating: status must be PEP_STATUS_OK");
    7.31 +    TEST_ASSERT_MSG((rating23 == PEP_rating_unencrypted), "outgoing_message_rating: rating must be PEP_rating_unencrypted");
    7.32 +
    7.33 +    free_message(msg23);
    7.34 +
    7.35      const string keytext2 = slurp("blacklisted_pub2.asc");
    7.36      PEP_STATUS status14 = import_key(session, keytext2.c_str(), keytext2.length(), NULL);
    7.37