import_key 2.1 changes - API change without substance XD (headers and calls) import_key_2.1
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Tue, 12 May 2020 14:28:24 +0200
branchimport_key_2.1
changeset 471125f5fbbc59ca
parent 4705 a3636cde1d7f
child 4712 e01853b3f59d
import_key 2.1 changes - API change without substance XD (headers and calls)
src/cryptotech.h
src/message_api.c
src/pEpEngine.c
src/pEpEngine.h
src/pgp_gpg.h
src/pgp_sequoia.c
src/pgp_sequoia.h
test/src/AppleMailTest.cc
test/src/BCCTest.cc
test/src/BlacklistAcceptNewKeyTest.cc
test/src/BlacklistTest.cc
test/src/CaseAndDotAddressTest.cc
test/src/DecorateTest.cc
test/src/DecryptAttachPrivateKeyTrustedTest.cc
test/src/DecryptAttachPrivateKeyUntrustedTest.cc
test/src/EncryptAttachPrivateKeyTest.cc
test/src/EncryptForIdentityTest.cc
test/src/EncryptMissingPrivateKeyTest.cc
test/src/Engine463Test.cc
test/src/Engine715Test.cc
test/src/ExternalRevokeTest.cc
test/src/KeyResetMessageTest.cc
test/src/KeyringImportTest.cc
test/src/LeastColorGroupTest.cc
test/src/LeastCommonDenomColorTest.cc
test/src/LookupTest.cc
test/src/MessageApiTest.cc
test/src/MessageNullFromTest.cc
test/src/MessageTwoPointOhTest.cc
test/src/PepSubjectReceivedTest.cc
test/src/ReencryptPlusExtraKeysTest.cc
test/src/RevocationTest.cc
test/src/RevokeRegenAttachTest.cc
test/src/UpdateIdAndMyselfTest.cc
test/src/UserIDAliasTest.cc
test/src/test_util.cc
     1.1 --- a/src/cryptotech.h	Tue May 12 09:48:39 2020 +0200
     1.2 +++ b/src/cryptotech.h	Tue May 12 14:28:24 2020 +0200
     1.3 @@ -65,7 +65,8 @@
     1.4      );
     1.5  
     1.6  typedef PEP_STATUS (*import_key_t)(PEP_SESSION session, const char *key_data,
     1.7 -        size_t size, identity_list **private_keys);
     1.8 +        size_t size, identity_list **private_keys, stringlist_t** imported_keys,
     1.9 +        uint64_t* changed_key_index);
    1.10  
    1.11  typedef PEP_STATUS (*recv_key_t)(PEP_SESSION session, const char *pattern);
    1.12  
    1.13 @@ -133,4 +134,3 @@
    1.14  
    1.15  PEP_STATUS init_cryptotech(PEP_SESSION session, bool in_first);
    1.16  void release_cryptotech(PEP_SESSION session, bool out_last);
    1.17 -
     2.1 --- a/src/message_api.c	Tue May 12 09:48:39 2020 +0200
     2.2 +++ b/src/message_api.c	Tue May 12 14:28:24 2020 +0200
     2.3 @@ -1575,8 +1575,13 @@
     2.4                      continue;
     2.5                  }
     2.6              }
     2.7 +            
     2.8 +            // FIXME: free these guys if we choke, yeah?
     2.9              identity_list *local_private_idents = NULL;
    2.10 -            PEP_STATUS import_status = import_key(session, blob_value, blob_size, &local_private_idents);
    2.11 +            stringlist_t* imported_keylist = NULL;
    2.12 +            uint64_t changed_keys = 0;
    2.13 +            PEP_STATUS import_status = import_key(session, blob_value, blob_size, &local_private_idents,
    2.14 +                                                  &imported_keylist, &changed_keys);
    2.15              bloblist_t* to_delete = NULL;
    2.16              switch (import_status) {
    2.17                  case PEP_NO_KEY_IMPORTED:
    2.18 @@ -3408,7 +3413,10 @@
    2.19      bloblist_t* the_key = base64_str_to_binary_blob(start_key, length);
    2.20      if (!the_key)
    2.21          return false;
    2.22 -    PEP_STATUS status = import_key(session, the_key->value, the_key->size, NULL);
    2.23 +    stringlist_t* imported_keys = NULL;
    2.24 +    uint64_t changed_keys = 0;    
    2.25 +    PEP_STATUS status = import_key(session, the_key->value, the_key->size, NULL,
    2.26 +                                   &imported_keys, &changed_keys);
    2.27      free_bloblist(the_key);
    2.28      if (status == PEP_STATUS_OK || status == PEP_KEY_IMPORTED)
    2.29          return true;
     3.1 --- a/src/pEpEngine.c	Tue May 12 09:48:39 2020 +0200
     3.2 +++ b/src/pEpEngine.c	Tue May 12 14:28:24 2020 +0200
     3.3 @@ -4853,7 +4853,9 @@
     3.4          PEP_SESSION session,
     3.5          const char *key_data,
     3.6          size_t size,
     3.7 -        identity_list **private_keys
     3.8 +        identity_list **private_keys,
     3.9 +        stringlist_t** imported_keys,
    3.10 +        uint64_t* changed_key_index        
    3.11      )
    3.12  {
    3.13      assert(session);
    3.14 @@ -4863,7 +4865,7 @@
    3.15          return PEP_ILLEGAL_VALUE;
    3.16  
    3.17      return session->cryptotech[PEP_crypt_OpenPGP].import_key(session, key_data,
    3.18 -            size, private_keys);
    3.19 +            size, private_keys, imported_keys, changed_key_index);
    3.20  }
    3.21  
    3.22  DYNAMIC_API PEP_STATUS recv_key(PEP_SESSION session, const char *pattern)
     4.1 --- a/src/pEpEngine.h	Tue May 12 09:48:39 2020 +0200
     4.2 +++ b/src/pEpEngine.h	Tue May 12 14:28:24 2020 +0200
     4.3 @@ -895,10 +895,17 @@
     4.4  // import_key() - import key from data
     4.5  //
     4.6  //  parameters:
     4.7 -//      session (in)            session handle
     4.8 -//      key_data (in)           key data, i.e. ASCII armored OpenPGP key
     4.9 -//      size (in)               amount of data to handle
    4.10 -//      private_keys (out)      list of private keys that have been imported
    4.11 +//      session (in)                session handle
    4.12 +//      key_data (in)               key data, i.e. ASCII armored OpenPGP key
    4.13 +//      size (in)                   amount of data to handle
    4.14 +//      private_keys (out)          list of identities containing the 
    4.15 +//                                  private keys that have been imported
    4.16 +//      imported_keys (out)         list of actual keys imported
    4.17 +//      changed_key_index (out)     bitvector - corresponds to the first 64 keys
    4.18 +//                                  imported. If nth bit is set, import changed a
    4.19 +//                                  key corresponding to the nth element in
    4.20 +//                                  imported keys (i.e. key was in DB and was
    4.21 +//                                  changed by import)
    4.22  //
    4.23  //  return value:
    4.24  //      PEP_STATUS_OK = 0       key was successfully imported
    4.25 @@ -913,7 +920,9 @@
    4.26          PEP_SESSION session,
    4.27          const char *key_data,
    4.28          size_t size,
    4.29 -        identity_list **private_keys
    4.30 +        identity_list **private_keys,
    4.31 +        stringlist_t** imported_keys,
    4.32 +        uint64_t* changed_key_index        
    4.33      );
    4.34  
    4.35  
     5.1 --- a/src/pgp_gpg.h	Tue May 12 09:48:39 2020 +0200
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,305 +0,0 @@
     5.4 -// This file is under GNU General Public License 3.0
     5.5 -// see LICENSE.txt
     5.6 -
     5.7 -#pragma once
     5.8 -
     5.9 -#include "pEpEngine.h"
    5.10 -
    5.11 -
    5.12 -// pgp_init() - initialize PGP backend
    5.13 -//
    5.14 -//  parameters:
    5.15 -//      session (in)        session handle
    5.16 -//      in_first (in)       true if this is the first session
    5.17 -//
    5.18 -//  return value:
    5.19 -//      PEP_STATUS_OK if PGP backend was successfully initialized
    5.20 -//      or any other value on error
    5.21 -
    5.22 -PEP_STATUS pgp_init(PEP_SESSION session, bool in_first);
    5.23 -
    5.24 -
    5.25 -// pgp_release() - release PGP backend
    5.26 -//
    5.27 -//  paramters:
    5.28 -//      session (in)        session handle
    5.29 -//      out_last (in)       true if this is the last session to release
    5.30 -
    5.31 -void pgp_release(PEP_SESSION session, bool out_last);
    5.32 -
    5.33 -
    5.34 -// pgp_decrypt_and_verify() - decrypt and verify ciphertext
    5.35 -//
    5.36 -//  parameters:
    5.37 -//      session (in)        session handle
    5.38 -//      ctext (in)          bytes with ciphertext
    5.39 -//      csize (in)          size of ciphertext in bytes
    5.40 -//      dsigtext (in)       pointer to bytes with detached signature
    5.41 -//                          or NULL if no detached signature
    5.42 -//      dsigsize (in)       size of detached signature in bytes
    5.43 -//      ptext (out)         bytes with ciphertext
    5.44 -//      psize (out)         size of ciphertext in bytes
    5.45 -//      keylist (out)       list of keys being used; first is the key being
    5.46 -//                          used for signing
    5.47 -//	filename (out)	    PGP filename, when rendered (Optional, only necessary for some PGP implementations (e.g. Symantec),
    5.48 -//                          *** Mostly internal ***
    5.49 -//  return value:
    5.50 -//      PEP_DECRYPTED_AND_VERIFIED      data could be decryped and verified
    5.51 -//      PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH
    5.52 -//                                      a signature does not match
    5.53 -//      PEP_DECRYPTED                   data could be decrypted but not verified
    5.54 -//      PEP_VERIFIED_AND_TRUSTED        data was unencrypted but perfectly signed
    5.55 -//      PEP_VERIFIED                    data was unencrypted, signature matches
    5.56 -//      PEP_DECRYPT_NO_KEY              data could not be decrypted because a
    5.57 -//                                      key is missing
    5.58 -//      PEP_DECRYPT_WRONG_FORMAT        data format not readable
    5.59 -//      PEP_ILLEGAL_VALUE               parameters wrong
    5.60 -//      PEP_OUT_OF_MEMORY               out of memory error
    5.61 -//      PEP_UNKOWN_ERROR                internal error
    5.62 -
    5.63 -PEP_STATUS pgp_decrypt_and_verify(
    5.64 -        PEP_SESSION session,
    5.65 -        const char *ctext,
    5.66 -        size_t csize,
    5.67 -        const char *dsigtext,
    5.68 -        size_t dsigsize,
    5.69 -        char **ptext,
    5.70 -        size_t *psize,
    5.71 -        stringlist_t **keylist,
    5.72 -        char** filename_ptr
    5.73 -    );
    5.74 -
    5.75 -
    5.76 -// pgp_encrypt_and_sign() - encrypt plaintext and sign
    5.77 -//
    5.78 -//  parameters:
    5.79 -//      session (in)        session handle
    5.80 -//      keylist (in)        first key to sign and encrypt, all other keys to
    5.81 -//                          encrypt
    5.82 -//      ptext (in)          bytes with plaintext
    5.83 -//      psize (in)          size of plaintext in bytes
    5.84 -//      ctext (out)         bytes with ciphertext, ASCII armored
    5.85 -//      csize (out)         size of ciphertext in bytes
    5.86 -//
    5.87 -//  return value:
    5.88 -//      PEP_STATUS_OK                   successful
    5.89 -//      PEP_KEY_NOT_FOUND               key not in keyring
    5.90 -//      PEP_KEY_HAS_AMBIG_NAME          multiple keys match data in keylist
    5.91 -//      PEP_GET_KEY_FAILED              access to keyring failed
    5.92 -//      PEP_ILLEGAL_VALUE               parameters wrong
    5.93 -//      PEP_OUT_OF_MEMORY               out of memory error
    5.94 -//      PEP_UNKOWN_ERROR                internal error
    5.95 -
    5.96 -PEP_STATUS pgp_encrypt_and_sign(
    5.97 -        PEP_SESSION session,
    5.98 -        const stringlist_t *keylist,
    5.99 -        const char *ptext,
   5.100 -        size_t psize,
   5.101 -        char **ctext,
   5.102 -        size_t *csize
   5.103 -    );
   5.104 -
   5.105 -PEP_STATUS pgp_sign_only(
   5.106 -        PEP_SESSION session, const char* fpr, const char *ptext,
   5.107 -        size_t psize, char **stext, size_t *ssize
   5.108 -    );
   5.109 -
   5.110 -// pgp_encrypt_only() - encrypt plaintext
   5.111 -//
   5.112 -//  parameters:
   5.113 -//      session (in)        session handle
   5.114 -//      keylist (in)        keys to encrypt plaintext
   5.115 -//      ptext (in)          bytes with plaintext
   5.116 -//      psize (in)          size of plaintext in bytes
   5.117 -//      ctext (out)         bytes with ciphertext, ASCII armored
   5.118 -//      csize (out)         size of ciphertext in bytes
   5.119 -//
   5.120 -//  return value:
   5.121 -//      PEP_STATUS_OK                   successful
   5.122 -//      PEP_KEY_NOT_FOUND               key not in keyring
   5.123 -//      PEP_KEY_HAS_AMBIG_NAME          multiple keys match data in keylist
   5.124 -//      PEP_GET_KEY_FAILED              access to keyring failed
   5.125 -//      PEP_ILLEGAL_VALUE               parameters wrong
   5.126 -//      PEP_OUT_OF_MEMORY               out of memory error
   5.127 -//      PEP_UNKNOWN_ERROR                internal error
   5.128 -
   5.129 -PEP_STATUS pgp_encrypt_only(
   5.130 -        PEP_SESSION session,
   5.131 -        const stringlist_t *keylist,
   5.132 -        const char *ptext,
   5.133 -        size_t psize,
   5.134 -        char **ctext,
   5.135 -        size_t *csize
   5.136 -    );
   5.137 -
   5.138 -
   5.139 -// pgp_verify_text() - verify signed data
   5.140 -//
   5.141 -//  parameters:
   5.142 -//      session (in)        session handle
   5.143 -//      keylist (in)        keys to encrypt plaintext
   5.144 -//      text (in)           data to verify, may include signature
   5.145 -//      size (in)           size of data to verify in bytes
   5.146 -//      signature (in)      detached signature data or NULL
   5.147 -//      sig_size (in)       size of detached signature in bytes
   5.148 -//      keylist (out)       list of keys being used for signing
   5.149 -//
   5.150 -//  return value:
   5.151 -//      PEP_VERIFIED_AND_TRUSTED        data was unencrypted but perfectly signed
   5.152 -//                                      this is depending on PGP trust concept
   5.153 -//      PEP_VERIFIED                    data was unencrypted, signature matches
   5.154 -//      PEP_DECRYPT_NO_KEY              data could not be verified because a
   5.155 -//                                      key is missing
   5.156 -//      PEP_DECRYPT_WRONG_FORMAT        data format not readable
   5.157 -//      PEP_ILLEGAL_VALUE               parameters wrong
   5.158 -//      PEP_OUT_OF_MEMORY               out of memory error
   5.159 -//      PEP_UNKOWN_ERROR                internal error
   5.160 -
   5.161 -PEP_STATUS pgp_verify_text(
   5.162 -        PEP_SESSION session,
   5.163 -        const char *text,
   5.164 -        size_t size,
   5.165 -        const char *signature,
   5.166 -        size_t sig_size,
   5.167 -        stringlist_t **keylist
   5.168 -    );
   5.169 -
   5.170 -
   5.171 -// pgp_delete_keypair() - delete key or keypair
   5.172 -//
   5.173 -//  parameters:
   5.174 -//      session (in)        session handle
   5.175 -//      fpr (in)            fingerprint of key or keypair to delete
   5.176 -
   5.177 -PEP_STATUS pgp_delete_keypair(PEP_SESSION session, const char *fpr);
   5.178 -
   5.179 -
   5.180 -// pgp_export_keydata() - export public key data ASCII armored
   5.181 -//
   5.182 -//  parameters:
   5.183 -//      session (in)        session handle
   5.184 -//      fpr (in)            fingerprint of public key to export
   5.185 -//      key_data (out)      ascii armored key data
   5.186 -//      size (out)          size of ascii armored key data
   5.187 -//      secret (in)         additionally export private key data
   5.188 -
   5.189 -PEP_STATUS pgp_export_keydata(
   5.190 -        PEP_SESSION session,
   5.191 -        const char *fpr,
   5.192 -        char **key_data,
   5.193 -        size_t *size,
   5.194 -        bool secret
   5.195 -    );
   5.196 -
   5.197 -
   5.198 -// pgp_find_keys() - find keys where fprs are matching a pattern
   5.199 -//
   5.200 -//  parameters:
   5.201 -//      session (in)        session handle
   5.202 -//      pattern (in)        UTF-8 string with pattern
   5.203 -//      keylist (out)       list of fprs matching
   5.204 -
   5.205 -PEP_STATUS pgp_find_keys(
   5.206 -        PEP_SESSION session,
   5.207 -        const char *pattern,
   5.208 -        stringlist_t **keylist
   5.209 -    );
   5.210 -
   5.211 -
   5.212 -PEP_STATUS pgp_list_keyinfo(
   5.213 -        PEP_SESSION session,
   5.214 -        const char* pattern,
   5.215 -        stringpair_list_t** keyinfo_list
   5.216 -    );
   5.217 -
   5.218 -PEP_STATUS pgp_generate_keypair(
   5.219 -        PEP_SESSION session,
   5.220 -        pEp_identity *identity
   5.221 -    );
   5.222 -
   5.223 -PEP_STATUS pgp_get_key_rating(
   5.224 -        PEP_SESSION session,
   5.225 -        const char *fpr,
   5.226 -        PEP_comm_type *comm_type
   5.227 -    );
   5.228 -
   5.229 -PEP_STATUS pgp_import_keydata(
   5.230 -        PEP_SESSION session,
   5.231 -        const char *key_data,
   5.232 -        size_t size,
   5.233 -        identity_list **private_idents
   5.234 -    );
   5.235 -
   5.236 -PEP_STATUS pgp_import_private_keydata(
   5.237 -        PEP_SESSION session,
   5.238 -        const char *key_data,
   5.239 -        size_t size,
   5.240 -        identity_list **private_idents
   5.241 -    );
   5.242 -
   5.243 -PEP_STATUS pgp_recv_key(PEP_SESSION session, const char *pattern);
   5.244 -
   5.245 -PEP_STATUS pgp_send_key(PEP_SESSION session, const char *pattern);
   5.246 -
   5.247 -PEP_STATUS pgp_renew_key(
   5.248 -        PEP_SESSION session,
   5.249 -        const char *fpr,
   5.250 -        const timestamp *ts
   5.251 -    );
   5.252 -
   5.253 -PEP_STATUS pgp_revoke_key(
   5.254 -        PEP_SESSION session,
   5.255 -        const char *fpr,
   5.256 -        const char *reason
   5.257 -    );
   5.258 -
   5.259 -PEP_STATUS pgp_key_expired(
   5.260 -        PEP_SESSION session,
   5.261 -        const char *fpr,
   5.262 -        const time_t when,
   5.263 -        bool *expired
   5.264 -    );
   5.265 -
   5.266 -PEP_STATUS pgp_key_revoked(
   5.267 -        PEP_SESSION session,
   5.268 -        const char *fpr,
   5.269 -        bool *revoked
   5.270 -    );
   5.271 -
   5.272 -PEP_STATUS pgp_key_created(
   5.273 -        PEP_SESSION session,
   5.274 -        const char *fpr,
   5.275 -        time_t *created
   5.276 -    );
   5.277 -
   5.278 -PEP_STATUS pgp_contains_priv_key(
   5.279 -        PEP_SESSION session, 
   5.280 -        const char *fpr,
   5.281 -        bool *has_private
   5.282 -    );
   5.283 -
   5.284 -PEP_STATUS pgp_find_private_keys(
   5.285 -        PEP_SESSION session,
   5.286 -        const char *pattern,
   5.287 -        stringlist_t **keylist
   5.288 -    );
   5.289 -
   5.290 -PEP_STATUS pgp_binary(const char **path);
   5.291 -
   5.292 -// Returns first failure status, if there were any. Keys may have been
   5.293 -// imported into DB regardless of status.
   5.294 -
   5.295 -PEP_STATUS pgp_import_ultimately_trusted_keypairs(PEP_SESSION session);
   5.296 -
   5.297 -/* Really only internal. */
   5.298 -PEP_STATUS pgp_replace_only_uid(
   5.299 -        PEP_SESSION session,
   5.300 -        const char* fpr,
   5.301 -        const char* realname,
   5.302 -        const char* email
   5.303 -    );
   5.304 -
   5.305 -PEP_STATUS pgp_config_cipher_suite(PEP_SESSION session,
   5.306 -        PEP_CIPHER_SUITE suite);
   5.307 -
   5.308 -#define PGP_BINARY_PATH pgp_binary
     6.1 --- a/src/pgp_sequoia.c	Tue May 12 09:48:39 2020 +0200
     6.2 +++ b/src/pgp_sequoia.c	Tue May 12 14:28:24 2020 +0200
     6.3 @@ -2253,7 +2253,9 @@
     6.4   }
     6.5  
     6.6  PEP_STATUS _pgp_import_keydata(PEP_SESSION session, const char *key_data,
     6.7 -                              size_t size, identity_list **private_idents)
     6.8 +                               size_t size, identity_list **private_idents,
     6.9 +                               stringlist_t** imported_keys,
    6.10 +                               uint64_t* changed_key_index)
    6.11  {
    6.12      PEP_STATUS status = PEP_NO_KEY_IMPORTED;
    6.13      pgp_error_t err;
    6.14 @@ -2385,7 +2387,9 @@
    6.15  }
    6.16  
    6.17  PEP_STATUS pgp_import_keydata(PEP_SESSION session, const char *key_data,
    6.18 -                              size_t size, identity_list **private_idents)
    6.19 +                              size_t size, identity_list **private_idents,
    6.20 +                              stringlist_t** imported_keys,
    6.21 +                              uint64_t* changed_key_index)
    6.22  {
    6.23  
    6.24      const char* pgp_begin = "-----BEGIN PGP";
    6.25 @@ -2404,7 +2408,8 @@
    6.26  
    6.27      unsigned int keycount = count_keydata_parts(key_data, size);
    6.28      if (keycount < 2)
    6.29 -        return(_pgp_import_keydata(session, key_data, size, private_idents));
    6.30 +        return(_pgp_import_keydata(session, key_data, size, private_idents,
    6.31 +                                   imported_keys, changed_key_index));
    6.32  
    6.33      unsigned int i;
    6.34      const char* curr_begin;
    6.35 @@ -2428,7 +2433,12 @@
    6.36          else
    6.37              curr_size = (key_data + size) - curr_begin;
    6.38  
    6.39 -        PEP_STATUS curr_status = _pgp_import_keydata(session, curr_begin, curr_size, private_idents);
    6.40 +        PEP_STATUS curr_status = _pgp_import_keydata(session, 
    6.41 +                                                     curr_begin, 
    6.42 +                                                     curr_size, 
    6.43 +                                                     private_idents,
    6.44 +                                                     imported_keys,
    6.45 +                                                     changed_key_index);
    6.46          if (private_idents && *private_idents) {
    6.47              if (!collected_idents)
    6.48                  collected_idents = *private_idents;
     7.1 --- a/src/pgp_sequoia.h	Tue May 12 09:48:39 2020 +0200
     7.2 +++ b/src/pgp_sequoia.h	Tue May 12 14:28:24 2020 +0200
     7.3 @@ -62,7 +62,9 @@
     7.4      );
     7.5  
     7.6  PEP_STATUS pgp_import_keydata(PEP_SESSION session, const char *key_data,
     7.7 -                              size_t size, identity_list **private_idents);
     7.8 +                              size_t size, identity_list **private_idents,
     7.9 +                              stringlist_t** imported_keys,
    7.10 +                              uint64_t* changed_key_index);
    7.11  
    7.12  PEP_STATUS pgp_import_private_keydata(PEP_SESSION session, const char *key_data,
    7.13                                        size_t size, identity_list **private_idents);
     8.1 --- a/test/src/AppleMailTest.cc	Tue May 12 09:48:39 2020 +0200
     8.2 +++ b/test/src/AppleMailTest.cc	Tue May 12 14:28:24 2020 +0200
     8.3 @@ -99,9 +99,9 @@
     8.4      const string keytextkey2 = slurp("test_keys/priv/pep-test-recip-0x08DB0AEE_priv.asc");
     8.5      const string keytextkey3 = slurp("test_keys/pub/pep-test-recip-0x08DB0AEE_pub.asc");
     8.6  
     8.7 -    PEP_STATUS statuskey1 = import_key(session, keytextkey1.c_str(), keytextkey1.length(), NULL);
     8.8 -    PEP_STATUS statuskey2 = import_key(session, keytextkey2.c_str(), keytextkey2.length(), NULL);
     8.9 -    PEP_STATUS statuskey3 = import_key(session, keytextkey3.c_str(), keytextkey3.length(), NULL);
    8.10 +    PEP_STATUS statuskey1 = import_key(session, keytextkey1.c_str(), keytextkey1.length(), NULL, NULL, NULL);
    8.11 +    PEP_STATUS statuskey2 = import_key(session, keytextkey2.c_str(), keytextkey2.length(), NULL, NULL, NULL);
    8.12 +    PEP_STATUS statuskey3 = import_key(session, keytextkey3.c_str(), keytextkey3.length(), NULL, NULL, NULL);
    8.13  
    8.14      const string mailtext = slurp(mailfile);
    8.15      pEp_identity * me = new_identity("pep.test.recip@kgrothoff.org", "93D19F24AD6F4C4BA9134AAF84D9217908DB0AEE", PEP_OWN_USERID, "pEp Test Recipient");
    8.16 @@ -157,9 +157,9 @@
    8.17      const string keytextkey2 = slurp("test_keys/priv/pep-test-recip-0x08DB0AEE_priv.asc");
    8.18      const string keytextkey3 = slurp("test_keys/pub/pep-test-recip-0x08DB0AEE_pub.asc");
    8.19  
    8.20 -    PEP_STATUS statuskey1 = import_key(session, keytextkey1.c_str(), keytextkey1.length(), NULL);
    8.21 -    PEP_STATUS statuskey2 = import_key(session, keytextkey2.c_str(), keytextkey2.length(), NULL);
    8.22 -    PEP_STATUS statuskey3 = import_key(session, keytextkey3.c_str(), keytextkey3.length(), NULL);
    8.23 +    PEP_STATUS statuskey1 = import_key(session, keytextkey1.c_str(), keytextkey1.length(), NULL, NULL, NULL);
    8.24 +    PEP_STATUS statuskey2 = import_key(session, keytextkey2.c_str(), keytextkey2.length(), NULL, NULL, NULL);
    8.25 +    PEP_STATUS statuskey3 = import_key(session, keytextkey3.c_str(), keytextkey3.length(), NULL, NULL, NULL);
    8.26  
    8.27      pEp_identity * me = new_identity("pep.test.recip@kgrothoff.org", "93D19F24AD6F4C4BA9134AAF84D9217908DB0AEE", PEP_OWN_USERID, "pEp Test Recipient");
    8.28      me->me = true;
     9.1 --- a/test/src/BCCTest.cc	Tue May 12 09:48:39 2020 +0200
     9.2 +++ b/test/src/BCCTest.cc	Tue May 12 14:28:24 2020 +0200
     9.3 @@ -65,18 +65,18 @@
     9.4                  // Engine is up. Keep on truckin'
     9.5                  
     9.6                  string keystr = slurp("test_keys/priv/bcc_test_dude_0-0x1CCCFC41_priv.asc");
     9.7 -                PEP_STATUS status = import_key(session, keystr.c_str(), keystr.size(), NULL);
     9.8 +                PEP_STATUS status = import_key(session, keystr.c_str(), keystr.size(), NULL, NULL, NULL);
     9.9                  ASSERT_TRUE(status == PEP_TEST_KEY_IMPORT_SUCCESS);    
    9.10                  pEp_identity * me = new_identity("bcc_test_dude_0@darthmama.cool", "0AE9AA3E320595CF93296BDFA155AC491CCCFC41", PEP_OWN_USERID, "BCC Test Sender");    
    9.11                  status = set_own_key(session, me, "0AE9AA3E320595CF93296BDFA155AC491CCCFC41");
    9.12                  keystr = slurp("test_keys/pub/bcc_test_dude_0-0x1CCCFC41_pub.asc");
    9.13 -                status = import_key(session, keystr.c_str(), keystr.size(), NULL);
    9.14 +                status = import_key(session, keystr.c_str(), keystr.size(), NULL, NULL, NULL);
    9.15                  ASSERT_TRUE(status == PEP_TEST_KEY_IMPORT_SUCCESS);
    9.16                  keystr = slurp("test_keys/pub/bcc_test_dude_1-0xDAC746BE_pub.asc");
    9.17 -                status = import_key(session, keystr.c_str(), keystr.size(), NULL);
    9.18 +                status = import_key(session, keystr.c_str(), keystr.size(), NULL, NULL, NULL);
    9.19                  ASSERT_TRUE(status == PEP_TEST_KEY_IMPORT_SUCCESS);
    9.20                  keystr = slurp("test_keys/pub/bcc_test_dude_2-0x53CECCF7_pub.asc");
    9.21 -                status = import_key(session, keystr.c_str(), keystr.size(), NULL);
    9.22 +                status = import_key(session, keystr.c_str(), keystr.size(), NULL, NULL, NULL);
    9.23                  ASSERT_TRUE(status == PEP_TEST_KEY_IMPORT_SUCCESS);    
    9.24  
    9.25              }
    10.1 --- a/test/src/BlacklistAcceptNewKeyTest.cc	Tue May 12 09:48:39 2020 +0200
    10.2 +++ b/test/src/BlacklistAcceptNewKeyTest.cc	Tue May 12 14:28:24 2020 +0200
    10.3 @@ -100,7 +100,7 @@
    10.4      const string keytext = slurp("test_keys/pub/blacklisted_pub.asc");
    10.5  
    10.6      /* import it into pep */
    10.7 -    PEP_STATUS status7 = import_key(session, keytext.c_str(), keytext.length(), NULL);
    10.8 +    PEP_STATUS status7 = import_key(session, keytext.c_str(), keytext.length(), NULL, NULL, NULL);
    10.9  
   10.10      const char* bl_fpr_1 = "279765A2FEB5B7C731B861D93E4CEFD9F7AF4684";
   10.11      bool is_blacklisted = false;
    11.1 --- a/test/src/BlacklistTest.cc	Tue May 12 09:48:39 2020 +0200
    11.2 +++ b/test/src/BlacklistTest.cc	Tue May 12 14:28:24 2020 +0200
    11.3 @@ -152,7 +152,7 @@
    11.4      /* FIXME: put in automated test stuff (N.B. only gdb mem examination to this point to get
    11.5       *        fix in */
    11.6      /* import it into pep */
    11.7 -    PEP_STATUS status7 = import_key(session, keytext.c_str(), keytext.length(), NULL);
    11.8 +    PEP_STATUS status7 = import_key(session, keytext.c_str(), keytext.length(), NULL, NULL, NULL);
    11.9  
   11.10      const char* bl_fpr_1 = "279765A2FEB5B7C731B861D93E4CEFD9F7AF4684";
   11.11      const char* bl_fpr_2 = "634FAC4417E9B2A5DC2BD4AAC4AEEBBE7E62701B";
   11.12 @@ -229,7 +229,7 @@
   11.13      free_message(msg23);
   11.14  
   11.15      const string keytext2 = slurp("test_keys/pub/blacklisted_pub2.asc");
   11.16 -    PEP_STATUS status14 = import_key(session, keytext2.c_str(), keytext2.length(), NULL);
   11.17 +    PEP_STATUS status14 = import_key(session, keytext2.c_str(), keytext2.length(), NULL, NULL, NULL);
   11.18  
   11.19      pEp_identity* blacklisted_identity2 = new_identity("blacklistedkeys@kgrothoff.org",
   11.20                                                         bl_fpr_2,
    12.1 --- a/test/src/CaseAndDotAddressTest.cc	Tue May 12 09:48:39 2020 +0200
    12.2 +++ b/test/src/CaseAndDotAddressTest.cc	Tue May 12 14:28:24 2020 +0200
    12.3 @@ -98,7 +98,7 @@
    12.4      const char* alice_email_dotless = "peptestalice@pep-project.org";
    12.5      const char* alice_email_case_and_dot = "PE.p.teS.t.ALICE@pep-project.OrG";
    12.6  
    12.7 -    PEP_STATUS statuspub = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL);
    12.8 +    PEP_STATUS statuspub = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL, NULL, NULL);
    12.9      ASSERT_EQ(statuspub , PEP_TEST_KEY_IMPORT_SUCCESS);
   12.10  
   12.11      pEp_identity * alice_id = new_identity("pep.test.alice@pep-project.org", "4ABE3AAF59AC32CFE4F86500A9411D176FF00E97", user_id, "Alice Test");
    13.1 --- a/test/src/DecorateTest.cc	Tue May 12 09:48:39 2020 +0200
    13.2 +++ b/test/src/DecorateTest.cc	Tue May 12 14:28:24 2020 +0200
    13.3 @@ -92,9 +92,9 @@
    13.4      const string alice_pub_key = slurp("test_keys/pub/pep-test-alice-0x6FF00E97_pub.asc");
    13.5      const string alice_priv_key = slurp("test_keys/priv/pep-test-alice-0x6FF00E97_priv.asc");
    13.6      const string bob_pub_key = slurp("test_keys/pub/pep-test-bob-0xC9C2EE39_pub.asc");
    13.7 -    PEP_STATUS statuspub = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL);
    13.8 -    PEP_STATUS statuspriv = import_key(session, alice_priv_key.c_str(), alice_priv_key.length(), NULL);
    13.9 -    PEP_STATUS statusbob = import_key(session, bob_pub_key.c_str(), bob_pub_key.length(), NULL);
   13.10 +    PEP_STATUS statuspub = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL, NULL, NULL);
   13.11 +    PEP_STATUS statuspriv = import_key(session, alice_priv_key.c_str(), alice_priv_key.length(), NULL, NULL, NULL);
   13.12 +    PEP_STATUS statusbob = import_key(session, bob_pub_key.c_str(), bob_pub_key.length(), NULL, NULL, NULL);
   13.13      ASSERT_EQ(statuspub , PEP_TEST_KEY_IMPORT_SUCCESS);
   13.14      ASSERT_EQ(statuspriv , PEP_TEST_KEY_IMPORT_SUCCESS);
   13.15      ASSERT_EQ(statusbob , PEP_TEST_KEY_IMPORT_SUCCESS);
    14.1 --- a/test/src/DecryptAttachPrivateKeyTrustedTest.cc	Tue May 12 09:48:39 2020 +0200
    14.2 +++ b/test/src/DecryptAttachPrivateKeyTrustedTest.cc	Tue May 12 14:28:24 2020 +0200
    14.3 @@ -108,11 +108,11 @@
    14.4      //
    14.5      // 13A9F97964A2B52520CAA40E51BCA783C065A213
    14.6      input_key = slurp("test_keys/pub/priv-key-import-test-main_0-0xC065A213_pub.asc");
    14.7 -    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
    14.8 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL, NULL, NULL);
    14.9      ASSERT_EQ(status, PEP_TEST_KEY_IMPORT_SUCCESS);
   14.10  
   14.11      input_key = slurp("test_keys/priv/priv-key-import-test-main_0-0xC065A213_priv.asc");
   14.12 -    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   14.13 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL, NULL, NULL);
   14.14      ASSERT_EQ(status, PEP_TEST_KEY_IMPORT_SUCCESS);
   14.15  
   14.16      // ensure there's no private key - doesn't work in automated tests, sadly. Uncommon when running script manually.
   14.17 @@ -121,7 +121,7 @@
   14.18      // key with same address and user_id
   14.19      // 8AB616A3BD51DEF714B5E688EFFB540C3276D2E5
   14.20      input_key = slurp("test_keys/pub/priv-key-import-test-main_0-0x3276D2E5_pub.asc");
   14.21 -    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   14.22 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL, NULL, NULL);
   14.23      ASSERT_EQ(status, PEP_TEST_KEY_IMPORT_SUCCESS);
   14.24  
   14.25  
    15.1 --- a/test/src/DecryptAttachPrivateKeyUntrustedTest.cc	Tue May 12 09:48:39 2020 +0200
    15.2 +++ b/test/src/DecryptAttachPrivateKeyUntrustedTest.cc	Tue May 12 14:28:24 2020 +0200
    15.3 @@ -106,11 +106,11 @@
    15.4      //
    15.5      // 13A9F97964A2B52520CAA40E51BCA783C065A213
    15.6      input_key = slurp("test_keys/pub/priv-key-import-test-main_0-0xC065A213_pub.asc");
    15.7 -    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
    15.8 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL, NULL, NULL);
    15.9      ASSERT_EQ(status, PEP_TEST_KEY_IMPORT_SUCCESS);
   15.10  
   15.11      input_key = slurp("test_keys/priv/priv-key-import-test-main_0-0xC065A213_priv.asc");
   15.12 -    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   15.13 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL, NULL, NULL);
   15.14      ASSERT_EQ(status, PEP_TEST_KEY_IMPORT_SUCCESS);
   15.15  
   15.16      // ensure there's no private key - doesn't work in automated tests, sadly. Uncommon when running script manually.
   15.17 @@ -126,7 +126,7 @@
   15.18      // key with same address and user_id
   15.19      // 8AB616A3BD51DEF714B5E688EFFB540C3276D2E5
   15.20      input_key = slurp("test_keys/pub/priv-key-import-test-main_0-0x3276D2E5_pub.asc");
   15.21 -    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   15.22 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL, NULL, NULL);
   15.23      ASSERT_EQ(status, PEP_TEST_KEY_IMPORT_SUCCESS);
   15.24  
   15.25  
    16.1 --- a/test/src/EncryptAttachPrivateKeyTest.cc	Tue May 12 09:48:39 2020 +0200
    16.2 +++ b/test/src/EncryptAttachPrivateKeyTest.cc	Tue May 12 14:28:24 2020 +0200
    16.3 @@ -118,35 +118,35 @@
    16.4      // key for main own user
    16.5      // 8AB616A3BD51DEF714B5E688EFFB540C3276D2E5
    16.6      input_key = slurp("test_keys/pub/priv-key-import-test-main_0-0x3276D2E5_pub.asc");
    16.7 -    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
    16.8 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL, NULL, NULL);
    16.9      ASSERT_EQ(status, PEP_TEST_KEY_IMPORT_SUCCESS);
   16.10  
   16.11      input_key = slurp("test_keys/priv/priv-key-import-test-main_0-0x3276D2E5_priv.asc");
   16.12 -    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   16.13 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL, NULL, NULL);
   16.14      ASSERT_EQ(status, PEP_TEST_KEY_IMPORT_SUCCESS);
   16.15  
   16.16      // key with same address and user_id (initially untrusted, then trusted)
   16.17      // 359DD8AC87D1F5E4304D08338D7185F180C8CD87
   16.18      input_key = slurp("test_keys/pub/priv-key-import-test-main_1-0x80C8CD87_pub.asc");
   16.19 -    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   16.20 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL, NULL, NULL);
   16.21      ASSERT_EQ(status, PEP_TEST_KEY_IMPORT_SUCCESS);
   16.22  
   16.23      // key with same address and to have different (non-aliased) user_id (initially untrusted, then trusted)
   16.24      // B044B83639E292283A3F6E14C2E64B520B74809C
   16.25      input_key = slurp("test_keys/pub/priv-key-import-test-main_2-0x0B74809C_pub.asc");
   16.26 -    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   16.27 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL, NULL, NULL);
   16.28      ASSERT_EQ(status, PEP_TEST_KEY_IMPORT_SUCCESS);
   16.29  
   16.30      // key with different address to have same user_id (initially untrusted, then trusted)
   16.31      // C52911EBA0D34B0F549594A15A7A363BD11252C9
   16.32      input_key = slurp("test_keys/pub/priv-key-import-test-other_0-0xD11252C9_pub.asc");
   16.33 -    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   16.34 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL, NULL, NULL);
   16.35      ASSERT_EQ(status, PEP_TEST_KEY_IMPORT_SUCCESS);
   16.36  
   16.37      // key with different address to have different user_id (initially untrusted, then trusted)
   16.38      // 567212EFB8A3A76B1D32B9565F45BEA9C785F20A
   16.39      input_key = slurp("test_keys/pub/priv-key-import-test-other_1-0xC785F20A_pub.asc");
   16.40 -    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   16.41 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL, NULL, NULL);
   16.42      ASSERT_EQ(status, PEP_TEST_KEY_IMPORT_SUCCESS);
   16.43      output_stream << "Done!" << endl << endl;
   16.44  
    17.1 --- a/test/src/EncryptForIdentityTest.cc	Tue May 12 09:48:39 2020 +0200
    17.2 +++ b/test/src/EncryptForIdentityTest.cc	Tue May 12 14:28:24 2020 +0200
    17.3 @@ -98,14 +98,14 @@
    17.4      const string gabrielle_pub_key = slurp("test_keys/pub/pep-test-gabrielle-0xE203586C_pub.asc");
    17.5      const string bella_pub_key = slurp("test_keys/pub/pep.test.bella-0xAF516AAE_pub.asc");
    17.6  
    17.7 -    PEP_STATUS statuspub = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL);
    17.8 -    PEP_STATUS statuspriv = import_key(session, alice_priv_key.c_str(), alice_priv_key.length(), NULL);
    17.9 +    PEP_STATUS statuspub = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL, NULL, NULL);
   17.10 +    PEP_STATUS statuspriv = import_key(session, alice_priv_key.c_str(), alice_priv_key.length(), NULL, NULL, NULL);
   17.11      ASSERT_EQ(statuspub, PEP_TEST_KEY_IMPORT_SUCCESS);
   17.12      ASSERT_EQ(statuspriv, PEP_TEST_KEY_IMPORT_SUCCESS);
   17.13  
   17.14 -    statuspub = import_key(session, gabrielle_pub_key.c_str(), gabrielle_pub_key.length(), NULL);
   17.15 +    statuspub = import_key(session, gabrielle_pub_key.c_str(), gabrielle_pub_key.length(), NULL, NULL, NULL);
   17.16      ASSERT_EQ(statuspub, PEP_TEST_KEY_IMPORT_SUCCESS);
   17.17 -    statuspub = import_key(session, bella_pub_key.c_str(), bella_pub_key.length(), NULL);
   17.18 +    statuspub = import_key(session, bella_pub_key.c_str(), bella_pub_key.length(), NULL, NULL, NULL);
   17.19      ASSERT_EQ(statuspub, PEP_TEST_KEY_IMPORT_SUCCESS);
   17.20  
   17.21      const char* alice_fpr = "4ABE3AAF59AC32CFE4F86500A9411D176FF00E97";
    18.1 --- a/test/src/EncryptMissingPrivateKeyTest.cc	Tue May 12 09:48:39 2020 +0200
    18.2 +++ b/test/src/EncryptMissingPrivateKeyTest.cc	Tue May 12 14:28:24 2020 +0200
    18.3 @@ -71,7 +71,7 @@
    18.4  
    18.5                  // Engine is up. Keep on truckin'
    18.6                  string recip_key = slurp("test_keys/pub/pep-test-bob-0xC9C2EE39_pub.asc");
    18.7 -                PEP_STATUS status = import_key(session, recip_key.c_str(), recip_key.size(), NULL);
    18.8 +                PEP_STATUS status = import_key(session, recip_key.c_str(), recip_key.size(), NULL, NULL, NULL);
    18.9                  ASSERT_EQ(status, PEP_TEST_KEY_IMPORT_SUCCESS);
   18.10  
   18.11              }
    19.1 --- a/test/src/Engine463Test.cc	Tue May 12 09:48:39 2020 +0200
    19.2 +++ b/test/src/Engine463Test.cc	Tue May 12 14:28:24 2020 +0200
    19.3 @@ -88,9 +88,9 @@
    19.4      const string claudio_keys = slurp("test_keys/priv/notfound-alt-pub_and_private.asc");
    19.5      const string fake_schleuder_key = slurp("test_keys/pub/fake-schleuder.asc");
    19.6  
    19.7 -    PEP_STATUS status = import_key(session, claudio_keys.c_str(), claudio_keys.length(), NULL);
    19.8 +    PEP_STATUS status = import_key(session, claudio_keys.c_str(), claudio_keys.length(), NULL, NULL, NULL);
    19.9      ASSERT_EQ(status , PEP_TEST_KEY_IMPORT_SUCCESS);
   19.10 -    status = import_key(session, fake_schleuder_key.c_str(), fake_schleuder_key.length(), NULL);
   19.11 +    status = import_key(session, fake_schleuder_key.c_str(), fake_schleuder_key.length(), NULL, NULL, NULL);
   19.12      ASSERT_EQ(status , PEP_TEST_KEY_IMPORT_SUCCESS);
   19.13  
   19.14      // Ok, bring in message, decrypt, and see what happens.
   19.15 @@ -111,9 +111,9 @@
   19.16      const string claudio_keys = slurp("test_keys/priv/notfound-alt-pub_and_private.asc");
   19.17      const string fake_schleuder_key = slurp("test_keys/pub/fake-schleuder.asc");
   19.18  
   19.19 -    PEP_STATUS status = import_key(session, claudio_keys.c_str(), claudio_keys.length(), NULL);
   19.20 +    PEP_STATUS status = import_key(session, claudio_keys.c_str(), claudio_keys.length(), NULL, NULL, NULL);
   19.21      ASSERT_EQ(status , PEP_TEST_KEY_IMPORT_SUCCESS);
   19.22 -    status = import_key(session, fake_schleuder_key.c_str(), fake_schleuder_key.length(), NULL);
   19.23 +    status = import_key(session, fake_schleuder_key.c_str(), fake_schleuder_key.length(), NULL, NULL, NULL);
   19.24      ASSERT_EQ(status , PEP_TEST_KEY_IMPORT_SUCCESS);
   19.25  
   19.26      pEp_identity* own_ident = new_identity("claudio+engine-463@pep.foundation", "A039BC60E43E0DFDDC9DE8663B48C38325210C88", PEP_OWN_USERID, "Not Actually Claudio");
    20.1 --- a/test/src/Engine715Test.cc	Tue May 12 09:48:39 2020 +0200
    20.2 +++ b/test/src/Engine715Test.cc	Tue May 12 14:28:24 2020 +0200
    20.3 @@ -81,6 +81,6 @@
    20.4      // This is just a dummy test case. The convention is check_whatever_you_are_checking
    20.5      // so for multiple test cases in a suite, be more explicit ;)
    20.6      string keyfile = slurp("test_keys/t001.asc");
    20.7 -    PEP_STATUS status = import_key(session, keyfile.c_str(), keyfile.size(), NULL);
    20.8 +    PEP_STATUS status = import_key(session, keyfile.c_str(), keyfile.size(), NULL, NULL, NULL);
    20.9      ASSERT_EQ(status, PEP_KEY_IMPORTED);
   20.10  }
    21.1 --- a/test/src/ExternalRevokeTest.cc	Tue May 12 09:48:39 2020 +0200
    21.2 +++ b/test/src/ExternalRevokeTest.cc	Tue May 12 14:28:24 2020 +0200
    21.3 @@ -102,8 +102,8 @@
    21.4      ASSERT_NE(fenris_pub_key.length() , 0);
    21.5      ASSERT_NE(fenris_priv_key.length() , 0);
    21.6  
    21.7 -    PEP_STATUS statuspub = import_key(session, fenris_pub_key.c_str(), fenris_pub_key.length(), NULL);
    21.8 -    PEP_STATUS statuspriv = import_key(session, fenris_priv_key.c_str(), fenris_priv_key.length(), NULL);
    21.9 +    PEP_STATUS statuspub = import_key(session, fenris_pub_key.c_str(), fenris_pub_key.length(), NULL, NULL, NULL);
   21.10 +    PEP_STATUS statuspriv = import_key(session, fenris_priv_key.c_str(), fenris_priv_key.length(), NULL, NULL, NULL);
   21.11      ASSERT_EQ(statuspub , PEP_TEST_KEY_IMPORT_SUCCESS);
   21.12      ASSERT_EQ(statuspriv , PEP_TEST_KEY_IMPORT_SUCCESS);
   21.13  
    22.1 --- a/test/src/KeyResetMessageTest.cc	Tue May 12 09:48:39 2020 +0200
    22.2 +++ b/test/src/KeyResetMessageTest.cc	Tue May 12 14:28:24 2020 +0200
    22.3 @@ -2577,7 +2577,7 @@
    22.4      // Reimport
    22.5      curr_key = revocations;
    22.6      for (i = 0; i < 4; curr_key = curr_key->next, i++) {
    22.7 -        status = import_key(session, curr_key->value, strlen(curr_key->value), NULL);
    22.8 +        status = import_key($1, $2, $3, $4, NULL, NULL);
    22.9          ASSERT_EQ(status, PEP_KEY_IMPORTED);
   22.10      }
   22.11      ASSERT_EQ(i, 4);
   22.12 @@ -2585,7 +2585,7 @@
   22.13  
   22.14      curr_key = keys;
   22.15      for (i = 0; i < 4; curr_key = curr_key->next, i++) {
   22.16 -        status = import_key(session, curr_key->value, strlen(curr_key->value), NULL);
   22.17 +        status = import_key($1, $2, $3, $4, NULL, NULL);
   22.18          ASSERT_EQ(status, PEP_KEY_IMPORTED);
   22.19      }
   22.20      ASSERT_EQ(i, 4);
    23.1 --- a/test/src/KeyringImportTest.cc	Tue May 12 09:48:39 2020 +0200
    23.2 +++ b/test/src/KeyringImportTest.cc	Tue May 12 14:28:24 2020 +0200
    23.3 @@ -93,7 +93,7 @@
    23.4  #ifdef USE_SEQUOIA
    23.5      const string pub_key = slurp("test_keys/pub/pep-test-keyring.asc");
    23.6  
    23.7 -    PEP_STATUS statuspub = import_key(session, pub_key.c_str(), pub_key.length(), NULL);
    23.8 +    PEP_STATUS statuspub = import_key(session, pub_key.c_str(), pub_key.length(), NULL, NULL, NULL);
    23.9      ASSERT_EQ(statuspub , PEP_TEST_KEY_IMPORT_SUCCESS);
   23.10  
   23.11      struct entry {
   23.12 @@ -145,7 +145,7 @@
   23.13  #ifdef USE_SEQUOIA
   23.14      const string pub_key = slurp("test_keys/pub/pep-test-android-keyring.pgp");
   23.15  
   23.16 -    PEP_STATUS statuspub = import_key(session, pub_key.c_str(), pub_key.length(), NULL);
   23.17 +    PEP_STATUS statuspub = import_key(session, pub_key.c_str(), pub_key.length(), NULL, NULL, NULL);
   23.18      ASSERT_EQ(statuspub , PEP_TEST_KEY_IMPORT_SUCCESS);
   23.19  
   23.20      struct entry {
    24.1 --- a/test/src/LeastColorGroupTest.cc	Tue May 12 09:48:39 2020 +0200
    24.2 +++ b/test/src/LeastColorGroupTest.cc	Tue May 12 14:28:24 2020 +0200
    24.3 @@ -103,7 +103,7 @@
    24.4      for (auto name : keynames) {
    24.5          output_stream << "\t read keyfile \"" << name << "\"..." << std::endl;
    24.6          const string keytextkey = slurp(name);
    24.7 -        PEP_STATUS statuskey = import_key(session, keytextkey.c_str(), keytextkey.length(), NULL);
    24.8 +        PEP_STATUS statuskey = import_key(session, keytextkey.c_str(), keytextkey.length(), NULL, NULL, NULL);
    24.9          ASSERT_EQ(statuskey , PEP_TEST_KEY_IMPORT_SUCCESS);
   24.10      }
   24.11  
    25.1 --- a/test/src/LeastCommonDenomColorTest.cc	Tue May 12 09:48:39 2020 +0200
    25.2 +++ b/test/src/LeastCommonDenomColorTest.cc	Tue May 12 14:28:24 2020 +0200
    25.3 @@ -98,10 +98,10 @@
    25.4      const string keytextkey3 = slurp("test_keys/pub/pep.never.me.test-0x79C11D1D_pub.asc");
    25.5      const string keytextkey4 = slurp("test_keys/priv/pep.never.me.test-0x79C11D1D_priv.asc");
    25.6  
    25.7 -    PEP_STATUS statuskey1 = import_key(session, keytextkey1.c_str(), keytextkey1.length(), NULL);
    25.8 -    PEP_STATUS statuskey2 = import_key(session, keytextkey2.c_str(), keytextkey2.length(), NULL);
    25.9 -    PEP_STATUS statuskey3 = import_key(session, keytextkey3.c_str(), keytextkey3.length(), NULL);
   25.10 -    PEP_STATUS statuskey4 = import_key(session, keytextkey4.c_str(), keytextkey4.length(), NULL);
   25.11 +    PEP_STATUS statuskey1 = import_key(session, keytextkey1.c_str(), keytextkey1.length(), NULL, NULL, NULL);
   25.12 +    PEP_STATUS statuskey2 = import_key(session, keytextkey2.c_str(), keytextkey2.length(), NULL, NULL, NULL);
   25.13 +    PEP_STATUS statuskey3 = import_key(session, keytextkey3.c_str(), keytextkey3.length(), NULL, NULL, NULL);
   25.14 +    PEP_STATUS statuskey4 = import_key(session, keytextkey4.c_str(), keytextkey4.length(), NULL, NULL, NULL);
   25.15  
   25.16      pEp_identity * sender = new_identity("pep.never.me.test@kgrothoff.org", NULL, "TOFU_pep.never.me.test@kgrothoff.org", "pEp Never Me Test");
   25.17      sender->me = false;
    26.1 --- a/test/src/LookupTest.cc	Tue May 12 09:48:39 2020 +0200
    26.2 +++ b/test/src/LookupTest.cc	Tue May 12 14:28:24 2020 +0200
    26.3 @@ -96,7 +96,7 @@
    26.4      const char* username = "SuperDuperHans";
    26.5      const string pub_key = slurp("test_keys/pub/hans@xn--bcher-kva.tld_-0x08AD6E9400D38894_pub.asc");
    26.6  
    26.7 -    PEP_STATUS statuspub = import_key(session, pub_key.c_str(), pub_key.length(), NULL);
    26.8 +    PEP_STATUS statuspub = import_key(session, pub_key.c_str(), pub_key.length(), NULL, NULL, NULL);
    26.9      ASSERT_EQ(statuspub , PEP_TEST_KEY_IMPORT_SUCCESS);
   26.10  
   26.11      pEp_identity* hans = new_identity(expected_address, NULL, userid, username);
    27.1 --- a/test/src/MessageApiTest.cc	Tue May 12 09:48:39 2020 +0200
    27.2 +++ b/test/src/MessageApiTest.cc	Tue May 12 14:28:24 2020 +0200
    27.3 @@ -94,11 +94,11 @@
    27.4      const string alice_priv_key = slurp("test_keys/priv/pep-test-alice-0x6FF00E97_priv.asc");
    27.5      const string bob_pub_key = slurp("test_keys/pub/pep-test-bob-0xC9C2EE39_pub.asc");
    27.6  
    27.7 -    PEP_STATUS status0 = import_key(session, alice_pub_key.c_str(), alice_pub_key.size(), NULL);
    27.8 +    PEP_STATUS status0 = import_key(session, alice_pub_key.c_str(), alice_pub_key.size(), NULL, NULL, NULL);
    27.9      ASSERT_EQ(status0 , PEP_TEST_KEY_IMPORT_SUCCESS);
   27.10 -    status0 = import_key(session, alice_priv_key.c_str(), alice_priv_key.size(), NULL);
   27.11 +    status0 = import_key(session, alice_priv_key.c_str(), alice_priv_key.size(), NULL, NULL, NULL);
   27.12      ASSERT_EQ(status0 , PEP_TEST_KEY_IMPORT_SUCCESS);
   27.13 -    status0 = import_key(session, bob_pub_key.c_str(), bob_pub_key.size(), NULL);
   27.14 +    status0 = import_key(session, bob_pub_key.c_str(), bob_pub_key.size(), NULL, NULL, NULL);
   27.15      ASSERT_EQ(status0 , PEP_TEST_KEY_IMPORT_SUCCESS);
   27.16      // message_api test code
   27.17  
    28.1 --- a/test/src/MessageNullFromTest.cc	Tue May 12 09:48:39 2020 +0200
    28.2 +++ b/test/src/MessageNullFromTest.cc	Tue May 12 14:28:24 2020 +0200
    28.3 @@ -42,16 +42,16 @@
    28.4  
    28.5              void import_alice_pub() {
    28.6                  const string alice_pub_key = slurp("test_keys/pub/pep-test-alice-0x6FF00E97_pub.asc");
    28.7 -                PEP_STATUS status = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL);
    28.8 +                PEP_STATUS status = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL, NULL, NULL);
    28.9                  assert(status == PEP_TEST_KEY_IMPORT_SUCCESS);
   28.10              }
   28.11  
   28.12              void import_bob_pair_and_set_own() {
   28.13                  const string bob_pub_key = slurp("test_keys/pub/pep-test-bob-0xC9C2EE39_pub.asc");
   28.14                  const string bob_priv_key = slurp("test_keys/priv/pep-test-bob-0xC9C2EE39_priv.asc");
   28.15 -                PEP_STATUS status = import_key(session, bob_pub_key.c_str(), bob_pub_key.length(), NULL);
   28.16 +                PEP_STATUS status = import_key(session, bob_pub_key.c_str(), bob_pub_key.length(), NULL, NULL, NULL);
   28.17                  assert(status == PEP_TEST_KEY_IMPORT_SUCCESS);
   28.18 -                status = import_key(session, bob_priv_key.c_str(), bob_priv_key.length(), NULL);
   28.19 +                status = import_key(session, bob_priv_key.c_str(), bob_priv_key.length(), NULL, NULL, NULL);
   28.20                  assert(status == PEP_TEST_KEY_IMPORT_SUCCESS);
   28.21              }
   28.22  
    29.1 --- a/test/src/MessageTwoPointOhTest.cc	Tue May 12 09:48:39 2020 +0200
    29.2 +++ b/test/src/MessageTwoPointOhTest.cc	Tue May 12 14:28:24 2020 +0200
    29.3 @@ -100,12 +100,12 @@
    29.4      const string carol_pub_key = slurp("test_keys/pub/pep-test-carol-0x42A85A42_pub.asc");
    29.5      const string carol_priv_key = slurp("test_keys/priv/pep-test-carol-0x42A85A42_priv.asc");
    29.6  
    29.7 -    PEP_STATUS statuspub = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL);
    29.8 -    PEP_STATUS statuspriv = import_key(session, alice_priv_key.c_str(), alice_priv_key.length(), NULL);
    29.9 +    PEP_STATUS statuspub = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL, NULL, NULL);
   29.10 +    PEP_STATUS statuspriv = import_key(session, alice_priv_key.c_str(), alice_priv_key.length(), NULL, NULL, NULL);
   29.11      ASSERT_EQ(statuspub , PEP_TEST_KEY_IMPORT_SUCCESS);
   29.12      ASSERT_EQ(statuspriv , PEP_TEST_KEY_IMPORT_SUCCESS);
   29.13 -    statuspub = import_key(session, carol_pub_key.c_str(), carol_pub_key.length(), NULL);
   29.14 -    statuspriv = import_key(session, carol_priv_key.c_str(), carol_priv_key.length(), NULL);
   29.15 +    statuspub = import_key(session, carol_pub_key.c_str(), carol_pub_key.length(), NULL, NULL, NULL);
   29.16 +    statuspriv = import_key(session, carol_priv_key.c_str(), carol_priv_key.length(), NULL, NULL, NULL);
   29.17      ASSERT_EQ(statuspub , PEP_TEST_KEY_IMPORT_SUCCESS);
   29.18      ASSERT_EQ(statuspriv , PEP_TEST_KEY_IMPORT_SUCCESS);
   29.19  
    30.1 --- a/test/src/PepSubjectReceivedTest.cc	Tue May 12 09:48:39 2020 +0200
    30.2 +++ b/test/src/PepSubjectReceivedTest.cc	Tue May 12 14:28:24 2020 +0200
    30.3 @@ -95,9 +95,9 @@
    30.4      const string keytextkey1 = slurp("test_keys/pub/pep-test-alice-0x6FF00E97_pub.asc");
    30.5      const string keytextkey2 = slurp("test_keys/priv/pep-test-recip-0x08DB0AEE_priv.asc");
    30.6      const string keytextkey3 = slurp("test_keys/pub/pep-test-recip-0x08DB0AEE_pub.asc");
    30.7 -    PEP_STATUS statuskey1 = import_key(session, keytextkey1.c_str(), keytextkey1.length(), NULL);
    30.8 -    PEP_STATUS statuskey2 = import_key(session, keytextkey2.c_str(), keytextkey2.length(), NULL);
    30.9 -    PEP_STATUS statuskey3 = import_key(session, keytextkey3.c_str(), keytextkey3.length(), NULL);
   30.10 +    PEP_STATUS statuskey1 = import_key(session, keytextkey1.c_str(), keytextkey1.length(), NULL, NULL, NULL);
   30.11 +    PEP_STATUS statuskey2 = import_key(session, keytextkey2.c_str(), keytextkey2.length(), NULL, NULL, NULL);
   30.12 +    PEP_STATUS statuskey3 = import_key(session, keytextkey3.c_str(), keytextkey3.length(), NULL, NULL, NULL);
   30.13  
   30.14      pEp_identity * me = new_identity("pep.test.recip@kgrothoff.org", "93D19F24AD6F4C4BA9134AAF84D9217908DB0AEE", PEP_OWN_USERID, "pEp Test Recipient");
   30.15      me->me = true;
    31.1 --- a/test/src/ReencryptPlusExtraKeysTest.cc	Tue May 12 09:48:39 2020 +0200
    31.2 +++ b/test/src/ReencryptPlusExtraKeysTest.cc	Tue May 12 14:28:24 2020 +0200
    31.3 @@ -99,35 +99,35 @@
    31.4                  const string own_recip_priv_key = slurp("test_keys/priv/reencrypt_recip_0-0xB1A2BE89_priv.asc");
    31.5                  const string own_recip_2_pub_key = slurp("test_keys/pub/reencrypt_recip_numero_deux_test_0-0xD6E75FFF_pub.asc");
    31.6                  const string own_recip_2_priv_key = slurp("test_keys/priv/reencrypt_recip_numero_deux_test_0-0xD6E75FFF_priv.asc");
    31.7 -                status = import_key(session, own_recip_pub_key.c_str(), own_recip_pub_key.length(), NULL);
    31.8 +                status = import_key(session, own_recip_pub_key.c_str(), own_recip_pub_key.length(), NULL, NULL, NULL);
    31.9                  ASSERT_EQ(status , PEP_TEST_KEY_IMPORT_SUCCESS);
   31.10 -                status = import_key(session, own_recip_priv_key.c_str(), own_recip_priv_key.length(), NULL);
   31.11 +                status = import_key(session, own_recip_priv_key.c_str(), own_recip_priv_key.length(), NULL, NULL, NULL);
   31.12                  ASSERT_EQ(status , PEP_TEST_KEY_IMPORT_SUCCESS);
   31.13 -                status = import_key(session, own_recip_2_pub_key.c_str(), own_recip_2_pub_key.length(), NULL);
   31.14 +                status = import_key(session, own_recip_2_pub_key.c_str(), own_recip_2_pub_key.length(), NULL, NULL, NULL);
   31.15                  ASSERT_EQ(status , PEP_TEST_KEY_IMPORT_SUCCESS);
   31.16 -                status = import_key(session, own_recip_2_priv_key.c_str(), own_recip_2_priv_key.length(), NULL);
   31.17 +                status = import_key(session, own_recip_2_priv_key.c_str(), own_recip_2_priv_key.length(), NULL, NULL, NULL);
   31.18                  ASSERT_EQ(status , PEP_TEST_KEY_IMPORT_SUCCESS);
   31.19  
   31.20                  // Import sender key
   31.21                  const string sender_pub_key = slurp("test_keys/pub/reencrypt_sender_0-0x3B508C8E_pub.asc");
   31.22 -                status = import_key(session, sender_pub_key.c_str(), sender_pub_key.length(), NULL);
   31.23 +                status = import_key(session, sender_pub_key.c_str(), sender_pub_key.length(), NULL, NULL, NULL);
   31.24                  ASSERT_EQ(status , PEP_TEST_KEY_IMPORT_SUCCESS);
   31.25                  
   31.26                  // Import other recips
   31.27                  const string recip_0_pub_key = slurp("test_keys/pub/reencrypt_other_recip_0-0x1F4A5986_pub.asc");
   31.28 -                status = import_key(session, recip_0_pub_key.c_str(), recip_0_pub_key.length(), NULL);
   31.29 +                status = import_key(session, recip_0_pub_key.c_str(), recip_0_pub_key.length(), NULL, NULL, NULL);
   31.30                  ASSERT_EQ(status , PEP_TEST_KEY_IMPORT_SUCCESS);
   31.31                  // we're leaving recip_1 out for the Hell of it - D3886D0DF75113BE2799C9374D6B99FE0F8273D8    
   31.32                  const string recip_2_pub_key = slurp("test_keys/pub/reencrypt_other_recip_2-0x1EDBE691_pub.asc");
   31.33 -                status = import_key(session, recip_2_pub_key.c_str(), recip_2_pub_key.length(), NULL);
   31.34 +                status = import_key(session, recip_2_pub_key.c_str(), recip_2_pub_key.length(), NULL, NULL, NULL);
   31.35                  ASSERT_EQ(status , PEP_TEST_KEY_IMPORT_SUCCESS);
   31.36  
   31.37                  // Import extra keys
   31.38                  const string pub_extra_key_0 = slurp("test_keys/pub/reencrypt_extra_keys_0-0x828AA789_pub.asc");    
   31.39                  const string pub_extra_key_1 = slurp("test_keys/pub/reencrypt_extra_keys_1-0x8B026AEC_pub.asc");
   31.40 -                status = import_key(session, pub_extra_key_0.c_str(), pub_extra_key_0.length(), NULL);
   31.41 +                status = import_key(session, pub_extra_key_0.c_str(), pub_extra_key_0.length(), NULL, NULL, NULL);
   31.42                  ASSERT_EQ(status , PEP_TEST_KEY_IMPORT_SUCCESS);
   31.43 -                status = import_key(session, pub_extra_key_1.c_str(), pub_extra_key_1.length(), NULL);
   31.44 +                status = import_key(session, pub_extra_key_1.c_str(), pub_extra_key_1.length(), NULL, NULL, NULL);
   31.45                  ASSERT_EQ(status , PEP_TEST_KEY_IMPORT_SUCCESS);
   31.46  
   31.47                  output_stream << "Keys imported." << endl;
    32.1 --- a/test/src/RevocationTest.cc	Tue May 12 09:48:39 2020 +0200
    32.2 +++ b/test/src/RevocationTest.cc	Tue May 12 14:28:24 2020 +0200
    32.3 @@ -93,7 +93,7 @@
    32.4      // Read the key.
    32.5      const string key = slurp("test_keys/priv/pep-test-linda-0xDCD555B6055ADE22_priv.asc");
    32.6  
    32.7 -    PEP_STATUS status = import_key(session, key.c_str(), key.length(), NULL);
    32.8 +    PEP_STATUS status = import_key(session, key.c_str(), key.length(), NULL, NULL, NULL);
    32.9      ASSERT_EQ(status , PEP_TEST_KEY_IMPORT_SUCCESS);
   32.10  
   32.11      pEp_identity* pre = new_identity("linda@example.org", NULL, NULL, NULL);
   32.12 @@ -104,7 +104,7 @@
   32.13      // Read in the revocation certificate.
   32.14      const string rev = slurp("test_keys/priv/pep-test-linda-0xDCD555B6055ADE22.rev");
   32.15  
   32.16 -    status = import_key(session, rev.c_str(), rev.length(), NULL);
   32.17 +    status = import_key(session, rev.c_str(), rev.length(), NULL, NULL, NULL);
   32.18      ASSERT_EQ(status , PEP_TEST_KEY_IMPORT_SUCCESS);
   32.19  
   32.20      pEp_identity* post = new_identity("linda@example.org", NULL, NULL, NULL);
    33.1 --- a/test/src/RevokeRegenAttachTest.cc	Tue May 12 09:48:39 2020 +0200
    33.2 +++ b/test/src/RevokeRegenAttachTest.cc	Tue May 12 14:28:24 2020 +0200
    33.3 @@ -70,7 +70,7 @@
    33.4  
    33.5                  // Engine is up. Keep on truckin'
    33.6                  string recip_key = slurp("test_keys/pub/pep-test-alice-0x6FF00E97_pub.asc");
    33.7 -                PEP_STATUS status = import_key(session, recip_key.c_str(), recip_key.size(), NULL);
    33.8 +                PEP_STATUS status = import_key(session, recip_key.c_str(), recip_key.size(), NULL, NULL, NULL);
    33.9                  ASSERT_EQ(status, PEP_TEST_KEY_IMPORT_SUCCESS);                
   33.10              }
   33.11  
    34.1 --- a/test/src/UpdateIdAndMyselfTest.cc	Tue May 12 09:48:39 2020 +0200
    34.2 +++ b/test/src/UpdateIdAndMyselfTest.cc	Tue May 12 14:28:24 2020 +0200
    34.3 @@ -258,7 +258,7 @@
    34.4      // 1. create original identity
    34.5      const string alex_pub_key = slurp("test_keys/pub/pep.test.alexander-0x26B54E4E_pub.asc");
    34.6  
    34.7 -    PEP_STATUS statuspub = import_key(session, alex_pub_key.c_str(), alex_pub_key.length(), NULL);
    34.8 +    PEP_STATUS statuspub = import_key(session, alex_pub_key.c_str(), alex_pub_key.length(), NULL, NULL, NULL);
    34.9      ASSERT_EQ(statuspub, PEP_TEST_KEY_IMPORT_SUCCESS);
   34.10  
   34.11      pEp_identity* alex = new_identity(alex_address, alex_fpr, alex_userid, alex_username);
   34.12 @@ -451,7 +451,7 @@
   34.13      const char* bella_username = "Annabella the Great";
   34.14      const string bella_pub_key = slurp("test_keys/pub/pep.test.bella-0xAF516AAE_pub.asc");
   34.15  
   34.16 -    statuspub = import_key(session, bella_pub_key.c_str(), bella_pub_key.length(), NULL);
   34.17 +    statuspub = import_key(session, bella_pub_key.c_str(), bella_pub_key.length(), NULL, NULL, NULL);
   34.18      ASSERT_EQ(statuspub, PEP_TEST_KEY_IMPORT_SUCCESS);
   34.19  
   34.20      pEp_identity* bella = new_identity(bella_address, bella_fpr, bella_userid, bella_username);
   34.21 @@ -500,7 +500,7 @@
   34.22      const char* bernd_username = "Bernd das Brot der Ultimative Testkandidat";
   34.23      const string bernd_pub_key = slurp("test_keys/pub/bernd.das.brot-0xCAFAA422_pub.asc");
   34.24  
   34.25 -    statuspub = import_key(session, bernd_pub_key.c_str(), bernd_pub_key.length(), NULL);
   34.26 +    statuspub = import_key(session, bernd_pub_key.c_str(), bernd_pub_key.length(), NULL, NULL, NULL);
   34.27      ASSERT_EQ(statuspub, PEP_TEST_KEY_IMPORT_SUCCESS);
   34.28  
   34.29      pEp_identity* bernd = new_identity(bernd_address, bernd_fpr, bernd_userid, bernd_username);
    35.1 --- a/test/src/UserIDAliasTest.cc	Tue May 12 09:48:39 2020 +0200
    35.2 +++ b/test/src/UserIDAliasTest.cc	Tue May 12 14:28:24 2020 +0200
    35.3 @@ -94,8 +94,8 @@
    35.4      const string alice_pub_key = slurp("test_keys/pub/pep-test-alice-0x6FF00E97_pub.asc");
    35.5      const string alice_priv_key = slurp("test_keys/priv/pep-test-alice-0x6FF00E97_priv.asc");
    35.6  
    35.7 -    PEP_STATUS statuspub = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL);
    35.8 -    PEP_STATUS statuspriv = import_key(session, alice_priv_key.c_str(), alice_priv_key.length(), NULL);
    35.9 +    PEP_STATUS statuspub = import_key(session, alice_pub_key.c_str(), alice_pub_key.length(), NULL, NULL, NULL);
   35.10 +    PEP_STATUS statuspriv = import_key(session, alice_priv_key.c_str(), alice_priv_key.length(), NULL, NULL, NULL);
   35.11      ASSERT_EQ(statuspub , PEP_TEST_KEY_IMPORT_SUCCESS);
   35.12      ASSERT_EQ(statuspriv , PEP_TEST_KEY_IMPORT_SUCCESS);
   35.13  
    36.1 --- a/test/src/test_util.cc	Tue May 12 09:48:39 2020 +0200
    36.2 +++ b/test/src/test_util.cc	Tue May 12 14:28:24 2020 +0200
    36.3 @@ -72,7 +72,7 @@
    36.4      const std::string key = slurp(fname);
    36.5      PEP_STATUS status = (key.empty() ? PEP_KEY_NOT_FOUND : PEP_STATUS_OK);
    36.6      if (status == PEP_STATUS_OK)
    36.7 -        status = import_key(session, key.c_str(), key.size(), NULL);
    36.8 +        status = import_key(session, key.c_str(), key.size(), NULL, NULL, NULL);
    36.9      return status;
   36.10  }
   36.11  
   36.12 @@ -450,7 +450,7 @@
   36.13  }
   36.14  bool slurp_and_import_key(PEP_SESSION session, const char* key_filename) {
   36.15      std::string keyfile = slurp(key_filename);
   36.16 -    if (import_key(session, keyfile.c_str(), keyfile.size(), NULL) != PEP_TEST_KEY_IMPORT_SUCCESS)
   36.17 +    if (import_key(session, keyfile.c_str(), keyfile.size(), NULL, NULL, NULL) != PEP_TEST_KEY_IMPORT_SUCCESS)
   36.18          return false;
   36.19      return true;
   36.20  }