Merged in ENGINE-423 changes local_cpptest
authorKrista Bennett <krista@pep-project.org>
Thu, 03 May 2018 14:41:57 +0200
branchlocal_cpptest
changeset 264952ca3faa2a2d
parent 2645 a1932fb654b8
parent 2647 538d85643401
child 2650 cafe06d8b209
Merged in ENGINE-423 changes
test/src/engine_tests/AppleMailTests.cc
     1.1 --- a/src/keymanagement.c	Thu May 03 12:39:56 2018 +0200
     1.2 +++ b/src/keymanagement.c	Thu May 03 14:41:57 2018 +0200
     1.3 @@ -15,8 +15,6 @@
     1.4  #include "sync_fsm.h"
     1.5  #include "blacklist.h"
     1.6  
     1.7 -#define KEY_EXPIRE_DELTA (60 * 60 * 24 * 365)
     1.8 -
     1.9  static bool key_matches_address(PEP_SESSION session, const char* address,
    1.10                                  const char* fpr) {
    1.11      if (!session || !address || !fpr)
     2.1 --- a/src/keymanagement.h	Thu May 03 12:39:56 2018 +0200
     2.2 +++ b/src/keymanagement.h	Thu May 03 14:41:57 2018 +0200
     2.3 @@ -363,6 +363,11 @@
     2.4  PEP_STATUS add_mistrusted_key(PEP_SESSION session, const char* fpr);
     2.5  PEP_STATUS delete_mistrusted_key(PEP_SESSION session, const char* fpr);
     2.6  PEP_STATUS is_mistrusted_key(PEP_SESSION session, const char* fpr, bool* mistrusted);
     2.7 +PEP_STATUS get_user_default_key(PEP_SESSION session, const char* user_id,
     2.8 +                                char** default_key);
     2.9 +
    2.10 +
    2.11 +
    2.12  
    2.13  // Only call on retrieval of previously stored identity!
    2.14  // Also, we presume that if the stored_identity was sent in
     3.1 --- a/src/message.c	Thu May 03 12:39:56 2018 +0200
     3.2 +++ b/src/message.c	Thu May 03 14:41:57 2018 +0200
     3.3 @@ -201,6 +201,81 @@
     3.4      return NULL;
     3.5  }
     3.6  
     3.7 +DYNAMIC_API void message_transfer(message* dst, message *src)
     3.8 +{
     3.9 +    assert(dst);
    3.10 +    assert(src);
    3.11 +
    3.12 +    dst->dir = src->dir;
    3.13 +    dst->rawmsg_ref = src->rawmsg_ref;
    3.14 +    dst->rawmsg_size = src->rawmsg_size;
    3.15 +    dst->refering_msg_ref = src->refering_msg_ref;
    3.16 +    dst->enc_format = src->enc_format;
    3.17 +
    3.18 +    /* Strings */
    3.19 +    free(dst->id);
    3.20 +    free(dst->shortmsg);
    3.21 +    free(dst->longmsg);
    3.22 +    free(dst->longmsg_formatted);
    3.23 +    free(dst->comments);
    3.24 +    dst->id = src->id;
    3.25 +    dst->shortmsg = src->shortmsg;
    3.26 +    dst->longmsg = src->longmsg;
    3.27 +    dst->longmsg_formatted = src->longmsg_formatted;
    3.28 +    dst->comments = src->comments;    
    3.29 +    src->id = src->shortmsg = src->longmsg = src->longmsg_formatted = NULL;
    3.30 +    src->comments = NULL;
    3.31 +    
    3.32 +    /* bloblists */
    3.33 +    free_bloblist(dst->attachments);
    3.34 +    dst->attachments = src->attachments;
    3.35 +    src->attachments = NULL;
    3.36 +    
    3.37 +    /* timestamps */
    3.38 +    free_timestamp(dst->sent);
    3.39 +    free_timestamp(dst->recv);
    3.40 +    dst->sent = src->sent;
    3.41 +    dst->recv = src->recv;
    3.42 +    src->sent = src->recv = NULL;
    3.43 +    
    3.44 +    /* identities */
    3.45 +    free_identity(dst->from);
    3.46 +    free_identity(dst->recv_by);
    3.47 +    dst->from = src->from;
    3.48 +    dst->recv_by = src->recv_by;
    3.49 +    src->from = src->recv_by = NULL;
    3.50 +    
    3.51 +    /* identity lists */
    3.52 +    free_identity_list(dst->to);
    3.53 +    free_identity_list(dst->cc);
    3.54 +    free_identity_list(dst->bcc);
    3.55 +    free_identity_list(dst->reply_to);
    3.56 +    dst->to = src->to;
    3.57 +    dst->cc = src->cc;
    3.58 +    dst->bcc = src->bcc;
    3.59 +    dst->reply_to = src->reply_to;
    3.60 +    src->to = src->cc = src->bcc = src->reply_to = NULL;
    3.61 +
    3.62 +    /* stringlists */
    3.63 +    free_stringlist(dst->references);
    3.64 +    free_stringlist(dst->keywords);
    3.65 +    free_stringlist(dst->in_reply_to);
    3.66 +    dst->references = src->references;
    3.67 +    dst->keywords = src->keywords;
    3.68 +    dst->in_reply_to = src->in_reply_to;
    3.69 +    src->references = src->keywords = src->in_reply_to = NULL;
    3.70 +
    3.71 +    /* message ref list */
    3.72 +    free_message_ref_list(dst->refered_by);
    3.73 +    dst->refered_by = src->refered_by;
    3.74 +    src->refered_by = NULL;
    3.75 +    
    3.76 +    /* stringpair lists */
    3.77 +    free_stringpair_list(dst->opt_fields);
    3.78 +    dst->opt_fields = src->opt_fields;
    3.79 +    src->opt_fields = NULL;
    3.80 +}
    3.81 +
    3.82  DYNAMIC_API message_ref_list *new_message_ref_list(message *msg)
    3.83  {
    3.84      message_ref_list *msg_list = calloc(1, sizeof(message_ref_list));
    3.85 @@ -266,4 +341,3 @@
    3.86          return message_ref_list_add(msg_list->next, msg);
    3.87      }
    3.88  }
    3.89 -
     4.1 --- a/src/message.h	Thu May 03 12:39:56 2018 +0200
     4.2 +++ b/src/message.h	Thu May 03 14:41:57 2018 +0200
     4.3 @@ -114,6 +114,20 @@
     4.4  
     4.5  DYNAMIC_API message * message_dup(const message *msg);
     4.6  
     4.7 +// message_transfer - assign ownership of all fields of the src message to
     4.8 +//                    the dst message object passed in. Free respective memory
     4.9 +//                    in the dst message, and reinitialise and pointers in 
    4.10 +//                    the src message to NULL so that it can be freed properly
    4.11 +//                    by its owner.
    4.12 +//  parameters:
    4.13 +//      dst (inout)        message to clobber and reassign values to
    4.14 +//      src (inout)        message whose values will be transfered to dst
    4.15 +//  NOTA BENE:
    4.16 +//      not owned pointees (msg->rawmsg_ref and msg->refering_msg_ref) are shared!
    4.17 +//      these are simply transferred.
    4.18 +DYNAMIC_API void message_transfer(message* dst, message *src);
    4.19 +
    4.20 +
    4.21  // new_message_ref_list() - allocate new message reference list
    4.22  //
    4.23  //  parameters:
     5.1 --- a/src/message_api.c	Thu May 03 12:39:56 2018 +0200
     5.2 +++ b/src/message_api.c	Thu May 03 14:41:57 2018 +0200
     5.3 @@ -280,8 +280,7 @@
     5.4      return strcmp(bl->filename + (fn_len - fe_len), fe) == 0;
     5.5  }
     5.6  
     5.7 -
     5.8 -static char * encapsulate_message_wrap_info(const char *msg_wrap_info, const char *longmsg)
     5.9 +char * encapsulate_message_wrap_info(const char *msg_wrap_info, const char *longmsg)
    5.10  {
    5.11      assert(msg_wrap_info);
    5.12      
    5.13 @@ -1486,6 +1485,36 @@
    5.14      }
    5.15  }
    5.16  
    5.17 +static void _cleanup_src(message* src, bool remove_attached_key) {
    5.18 +    assert(src);
    5.19 +    
    5.20 +    if (!src)
    5.21 +        return;
    5.22 +        
    5.23 +    char* longmsg = NULL;
    5.24 +    char* shortmsg = NULL;
    5.25 +    char* msg_wrap_info = NULL;
    5.26 +    separate_short_and_long(src->longmsg, &shortmsg, &msg_wrap_info,
    5.27 +                            &longmsg);
    5.28 +    if (longmsg) {                    
    5.29 +        free(src->longmsg);
    5.30 +        free(shortmsg);
    5.31 +        free(msg_wrap_info);
    5.32 +        src->longmsg = longmsg;
    5.33 +    }
    5.34 +    if (remove_attached_key) {
    5.35 +        // End of the attachment list
    5.36 +        if (src->attachments) {
    5.37 +            bloblist_t* tmp = src->attachments;
    5.38 +            while (tmp->next && tmp->next->next) {
    5.39 +                tmp = tmp->next;
    5.40 +            }
    5.41 +            free_bloblist(tmp->next);
    5.42 +            tmp->next = NULL;
    5.43 +        }    
    5.44 +    }                   
    5.45 +}
    5.46 +
    5.47  DYNAMIC_API PEP_STATUS encrypt_message(
    5.48          PEP_SESSION session,
    5.49          message *src,
    5.50 @@ -1499,6 +1528,8 @@
    5.51      message * msg = NULL;
    5.52      stringlist_t * keys = NULL;
    5.53      message* _src = src;
    5.54 +
    5.55 +    bool added_key_to_real_src = false;
    5.56      
    5.57      assert(session);
    5.58      assert(src);
    5.59 @@ -1549,6 +1580,7 @@
    5.60  
    5.61      identity_list * _il;
    5.62  
    5.63 +
    5.64      if (enc_format != PEP_enc_none && (_il = src->bcc) && _il->ident)
    5.65      {
    5.66          // BCC limited support:
    5.67 @@ -1714,7 +1746,7 @@
    5.68              }
    5.69          }
    5.70      }
    5.71 -
    5.72 +        
    5.73      if (enc_format == PEP_enc_none || !dest_keys_found ||
    5.74          stringlist_length(keys)  == 0 ||
    5.75          _rating(max_comm_type,
    5.76 @@ -1724,6 +1756,7 @@
    5.77          if ((has_pep_user || !session->passive_mode) && 
    5.78              !(flags & PEP_encrypt_flag_force_no_attached_key)) {
    5.79              attach_own_key(session, src);
    5.80 +            added_key_to_real_src = true;
    5.81          }
    5.82          decorate_message(src, PEP_rating_undefined, NULL, true);
    5.83          return PEP_UNENCRYPTED;
    5.84 @@ -1742,6 +1775,8 @@
    5.85                  if (status == PEP_OUT_OF_MEMORY)
    5.86                      goto enomem;
    5.87              }
    5.88 +            if (!(flags & PEP_encrypt_flag_force_no_attached_key))
    5.89 +                added_key_to_real_src = true;            
    5.90          }
    5.91          if (!(flags & PEP_encrypt_flag_force_no_attached_key))
    5.92              attach_own_key(session, _src);
    5.93 @@ -1756,10 +1791,6 @@
    5.94                  status = encrypt_PGP_MIME(session, _src, keys, msg, flags);
    5.95                  break;
    5.96  
    5.97 -            // case PEP_enc_pieces:
    5.98 -            //     status = encrypt_PGP_in_pieces(session, src, keys, msg, flags);
    5.99 -            //     break;
   5.100 -
   5.101              /* case PEP_enc_PEP:
   5.102                  // TODO: implement
   5.103                  NOT_IMPLEMENTED */
   5.104 @@ -1802,6 +1833,8 @@
   5.105      // I don't think we do.
   5.106      if (_src && _src != src)
   5.107          free_message(_src);
   5.108 +    
   5.109 +    _cleanup_src(src, added_key_to_real_src);
   5.110          
   5.111      return status;
   5.112  
   5.113 @@ -1814,6 +1847,8 @@
   5.114      if (_src && _src != src)
   5.115          free_message(_src);
   5.116  
   5.117 +    _cleanup_src(src, added_key_to_real_src);
   5.118 +
   5.119      return status;
   5.120  }
   5.121  
   5.122 @@ -1946,7 +1981,7 @@
   5.123      bloblist_t* old_head = NULL;
   5.124      
   5.125      if (!src->attachments || src->attachments->value == NULL) {
   5.126 -        if (src->attachments->value == NULL) {
   5.127 +        if (src->attachments && src->attachments->value == NULL) {
   5.128              old_head = src->attachments;
   5.129              src->attachments = NULL;
   5.130          }
   5.131 @@ -2035,11 +2070,15 @@
   5.132              target_id->user_id = own_id; // ownership transfer
   5.133          }
   5.134      }
   5.135 -
   5.136 -    status = myself(session, target_id);
   5.137 -    if (status != PEP_STATUS_OK)
   5.138 -        goto pep_error;
   5.139 -
   5.140 +    
   5.141 +    if (target_id->address) {
   5.142 +        status = myself(session, target_id);
   5.143 +        if (status != PEP_STATUS_OK)
   5.144 +            goto pep_error;
   5.145 +    }
   5.146 +    else if (!target_id->fpr)
   5.147 +        return PEP_ILLEGAL_VALUE;
   5.148 +    
   5.149      *dst = NULL;
   5.150  
   5.151      // PEP_STATUS _status = update_identity(session, target_id);
   5.152 @@ -2063,8 +2102,8 @@
   5.153      }
   5.154  
   5.155      /* KG: did we ever do this??? */
   5.156 -    if (!(flags & PEP_encrypt_flag_force_no_attached_key))
   5.157 -        _attach_key(session, target_fpr, src);
   5.158 +    // if (!(flags & PEP_encrypt_flag_force_no_attached_key))
   5.159 +    //     _attach_key(session, target_fpr, src);
   5.160  
   5.161      _src = wrap_message_as_attachment(NULL, src, false);
   5.162      if (!_src)
   5.163 @@ -2078,6 +2117,8 @@
   5.164          case PEP_enc_PGP_MIME:
   5.165          case PEP_enc_PEP: // BUG: should be implemented extra
   5.166              status = encrypt_PGP_MIME(session, _src, keys, msg, flags);
   5.167 +            if (status == PEP_STATUS_OK || (src->longmsg && strstr(src->longmsg, "INNER")))
   5.168 +                _cleanup_src(src, false);
   5.169              break;
   5.170  
   5.171          default:
   5.172 @@ -2858,6 +2899,83 @@
   5.173      // FIXME - are there any flags or anything else we need to be sure are carried?
   5.174  }
   5.175  
   5.176 +static bool is_trusted_own_priv_fpr(PEP_SESSION session, 
   5.177 +                       const char* own_id, 
   5.178 +                       const char* fpr
   5.179 +    ) 
   5.180 +{   
   5.181 +    bool retval = false;
   5.182 +    if (!EMPTYSTR(fpr)) {
   5.183 +        pEp_identity* test_identity = new_identity(NULL, fpr, own_id, NULL);
   5.184 +        if (test_identity) {
   5.185 +            PEP_STATUS status = get_trust(session, test_identity);
   5.186 +            if (status == PEP_STATUS_OK) {
   5.187 +                if (test_identity->comm_type & PEP_ct_confirmed) {
   5.188 +                    bool has_priv = false;
   5.189 +                    status = contains_priv_key(session, fpr, &has_priv);
   5.190 +                    if (status == PEP_STATUS_OK && has_priv)
   5.191 +                        retval = true;
   5.192 +                }
   5.193 +            }
   5.194 +            free(test_identity);
   5.195 +        }
   5.196 +    }
   5.197 +    return retval;
   5.198 +}
   5.199 +
   5.200 +static bool reject_fpr(PEP_SESSION session, const char* fpr) {
   5.201 +    bool reject = true;
   5.202 +
   5.203 +    PEP_STATUS status = key_revoked(session, fpr, &reject);
   5.204 +
   5.205 +    if (!reject) {
   5.206 +        status = key_expired(session, fpr, time(NULL), &reject);
   5.207 +        if (reject) {
   5.208 +            timestamp *ts = new_timestamp(time(NULL) + KEY_EXPIRE_DELTA);
   5.209 +            status = renew_key(session, fpr, ts);
   5.210 +            free_timestamp(ts);
   5.211 +            if (status == PEP_STATUS_OK)
   5.212 +                reject = false;
   5.213 +        }
   5.214 +    }
   5.215 +    return reject;
   5.216 +}
   5.217 +
   5.218 +static char* seek_good_trusted_private_fpr(PEP_SESSION session, char* own_id, 
   5.219 +                                           stringlist_t* keylist) {
   5.220 +    if (!own_id || !keylist)
   5.221 +        return NULL;
   5.222 +        
   5.223 +    stringlist_t* kl_curr = keylist;
   5.224 +    while (kl_curr) {
   5.225 +        char* fpr = kl_curr->value;
   5.226 +        
   5.227 +        if (is_trusted_own_priv_fpr(session, own_id, fpr)) { 
   5.228 +            if (!reject_fpr(session, fpr))
   5.229 +                return strdup(fpr);
   5.230 +        }
   5.231 +            
   5.232 +        kl_curr = kl_curr->next;
   5.233 +    }
   5.234 +
   5.235 +    char* target_own_fpr = NULL;
   5.236 +    
   5.237 +    // Last shot...
   5.238 +    PEP_STATUS status = get_user_default_key(session, own_id, 
   5.239 +                                             &target_own_fpr);
   5.240 +
   5.241 +    if (status == PEP_STATUS_OK && !EMPTYSTR(target_own_fpr)) {
   5.242 +        if (is_trusted_own_priv_fpr(session, own_id, target_own_fpr)) { 
   5.243 +            if (!reject_fpr(session, target_own_fpr))
   5.244 +                return target_own_fpr;
   5.245 +        }
   5.246 +    }
   5.247 +    
   5.248 +    // TODO: We can also go through all of the other available fprs for the
   5.249 +    // own identity, but then I submit this function requires a little refactoring
   5.250 +        
   5.251 +    return NULL;
   5.252 +}
   5.253  
   5.254  DYNAMIC_API PEP_STATUS _decrypt_message(
   5.255          PEP_SESSION session,
   5.256 @@ -2893,11 +3011,21 @@
   5.257      char* signer_fpr = NULL;
   5.258      bool is_pep_msg = is_a_pEpmessage(src);
   5.259  
   5.260 +    // Grab input flags
   5.261 +    bool reencrypt = ((*flags & PEP_decrypt_flag_untrusted_server) > 0);
   5.262 +    
   5.263 +    // We own this pointer, and we take control of *keylist if reencrypting.
   5.264 +    stringlist_t* extra = NULL;
   5.265 +    if (reencrypt) {
   5.266 +        if (*keylist) {
   5.267 +            extra = *keylist;
   5.268 +        }
   5.269 +    }
   5.270 +            
   5.271      *dst = NULL;
   5.272      *keylist = NULL;
   5.273      *rating = PEP_rating_undefined;
   5.274 -
   5.275 -    *flags = 0;
   5.276 +//    *flags = 0;
   5.277      
   5.278      /*** End init ***/
   5.279  
   5.280 @@ -3235,6 +3363,44 @@
   5.281      *dst = msg;
   5.282      *keylist = _keylist;
   5.283  
   5.284 +    if (reencrypt) {
   5.285 +        if (decrypt_status == PEP_DECRYPTED || decrypt_status == PEP_DECRYPTED_AND_VERIFIED) {
   5.286 +            message* reencrypt_msg = NULL;
   5.287 +            PEP_STATUS reencrypt_status = PEP_CANNOT_REENCRYPT;
   5.288 +            char* own_id = NULL;
   5.289 +            status = get_default_own_userid(session, &own_id);
   5.290 +            if (own_id) {
   5.291 +                char* target_own_fpr = seek_good_trusted_private_fpr(session,
   5.292 +                                                                     own_id,
   5.293 +                                                                     _keylist);
   5.294 +                if (target_own_fpr) {
   5.295 +                    pEp_identity* target_id = new_identity(NULL, target_own_fpr, 
   5.296 +                                                           own_id, NULL);
   5.297 +                    if (target_id) {
   5.298 +                        reencrypt_status = encrypt_message_for_self(session, target_id, msg,
   5.299 +                                                                    extra, &reencrypt_msg, PEP_enc_PGP_MIME,
   5.300 +                                                                    0);
   5.301 +                        if (reencrypt_status != PEP_STATUS_OK)
   5.302 +                            reencrypt_status = PEP_CANNOT_REENCRYPT;
   5.303 +                        
   5.304 +                        free_identity(target_id);
   5.305 +                    }
   5.306 +                    free(target_own_fpr);
   5.307 +                }     
   5.308 +                free(own_id);
   5.309 +            }
   5.310 +            free_stringlist(extra); // This was an input variable for us. Keylist is overwritten above.
   5.311 +            
   5.312 +            if (reencrypt_status != PEP_CANNOT_REENCRYPT && reencrypt_msg) {
   5.313 +                message_transfer(src, reencrypt_msg);
   5.314 +                *flags |= PEP_decrypt_flag_src_modified;
   5.315 +                free_message(reencrypt_msg);
   5.316 +            }
   5.317 +            else
   5.318 +                decrypt_status = PEP_CANNOT_REENCRYPT;
   5.319 +        }
   5.320 +    }
   5.321 +        
   5.322      if(decrypt_status == PEP_DECRYPTED_AND_VERIFIED)
   5.323          return PEP_STATUS_OK;
   5.324      else
   5.325 @@ -3784,7 +3950,8 @@
   5.326      char** mime_plaintext,
   5.327      stringlist_t **keylist,
   5.328      PEP_rating *rating,
   5.329 -    PEP_decrypt_flags_t *flags
   5.330 +    PEP_decrypt_flags_t *flags,
   5.331 +    char** modified_src
   5.332  )
   5.333  {
   5.334      assert(mimetext);
   5.335 @@ -3792,7 +3959,11 @@
   5.336      assert(keylist);
   5.337      assert(rating);
   5.338      assert(flags);
   5.339 -
   5.340 +    assert(modified_src);
   5.341 +
   5.342 +    if (!(mimetext && mime_plaintext && keylist && rating && flags && modified_src))
   5.343 +        return PEP_ILLEGAL_VALUE;
   5.344 +        
   5.345      PEP_STATUS status = PEP_STATUS_OK;
   5.346      message* tmp_msg = NULL;
   5.347      message* dec_msg = NULL;
   5.348 @@ -3831,17 +4002,26 @@
   5.349                                                  keylist,
   5.350                                                  rating,
   5.351                                                  flags);
   5.352 -                                                
   5.353 +
   5.354 +
   5.355      if (!dec_msg && (decrypt_status == PEP_UNENCRYPTED || decrypt_status == PEP_VERIFIED)) {
   5.356          dec_msg = message_dup(tmp_msg);
   5.357      }
   5.358 -        
   5.359 +    
   5.360      if (decrypt_status > PEP_CANNOT_DECRYPT_UNKNOWN || !dec_msg)
   5.361      {
   5.362          status = decrypt_status;
   5.363          goto pep_error;
   5.364      }
   5.365  
   5.366 +    if (*flags & PEP_decrypt_flag_src_modified) {
   5.367 +        _mime_encode_message_internal(tmp_msg, false, modified_src, true);
   5.368 +        if (!modified_src) {
   5.369 +            *flags &= (~PEP_decrypt_flag_src_modified);
   5.370 +            decrypt_status = PEP_CANNOT_REENCRYPT; // Because we couldn't return it, I guess.
   5.371 +        }
   5.372 +    }
   5.373 +
   5.374      // FIXME: test with att
   5.375      status = _mime_encode_message_internal(dec_msg, false, mime_plaintext, true);
   5.376  
   5.377 @@ -3919,6 +4099,7 @@
   5.378                               &enc_msg,
   5.379                               enc_format,
   5.380                               flags);
   5.381 +                             
   5.382      if (status != PEP_STATUS_OK)
   5.383          goto pep_error;
   5.384  
     6.1 --- a/src/message_api.h	Thu May 03 12:39:56 2018 +0200
     6.2 +++ b/src/message_api.h	Thu May 03 14:41:57 2018 +0200
     6.3 @@ -38,6 +38,7 @@
     6.4      // This is used for outer messages (used to wrap the real message)
     6.5      // This is only used internally and (eventually) by transport functions
     6.6      PEP_encrypt_flag_inner_message = 0x8
     6.7 +    
     6.8  } PEP_encrypt_flags; 
     6.9  
    6.10  typedef unsigned int PEP_encrypt_flags_t;
    6.11 @@ -75,6 +76,30 @@
    6.12      );
    6.13  
    6.14  
    6.15 +// encrypt_message_and_add_priv_key() - encrypt message in memory, adding an encrypted private
    6.16 +//                                      key (encrypted separately and sent within the inner message)
    6.17 +//
    6.18 +//  parameters:
    6.19 +//      session (in)        session handle
    6.20 +//      src (in)            message to encrypt
    6.21 +//      dst (out)           pointer to new encrypted message or NULL if no
    6.22 +//                          encryption could take place
    6.23 +//      to_fpr              fingerprint of the recipient key to which the private key
    6.24 +//                          should be encrypted
    6.25 +//      enc_format (in)     encrypted format
    6.26 +//      flags (in)          flags to set special encryption features
    6.27 +//
    6.28 +//  return value:
    6.29 +//      PEP_STATUS_OK                   on success
    6.30 +//      PEP_KEY_HAS_AMBIG_NAME          at least one of the receipient keys has
    6.31 +//                                      an ambiguous name
    6.32 +//      PEP_UNENCRYPTED                 on demand or no recipients with usable
    6.33 +//                                      key, is left unencrypted, and key is
    6.34 +//                                      attached to it
    6.35 +//
    6.36 +//  caveat:
    6.37 +//      the ownershop of src remains with the caller
    6.38 +//      the ownership of dst goes to the caller
    6.39  DYNAMIC_API PEP_STATUS encrypt_message_and_add_priv_key(
    6.40          PEP_SESSION session,
    6.41          message *src,
    6.42 @@ -229,7 +254,10 @@
    6.43  typedef enum _PEP_decrypt_flags {
    6.44      PEP_decrypt_flag_own_private_key = 0x1,
    6.45      PEP_decrypt_flag_consume = 0x2,
    6.46 -    PEP_decrypt_flag_ignore = 0x4
    6.47 +    PEP_decrypt_flag_ignore = 0x4,
    6.48 +    PEP_decrypt_flag_src_modified = 0x8,
    6.49 +    // input flags    
    6.50 +    PEP_decrypt_flag_untrusted_server = 0x100
    6.51  } PEP_decrypt_flags; 
    6.52  
    6.53  typedef unsigned int PEP_decrypt_flags_t;
    6.54 @@ -239,23 +267,49 @@
    6.55  //
    6.56  //  parameters:
    6.57  //      session (in)        session handle
    6.58 -//      src (in)            message to decrypt
    6.59 +//      src (inout)         message to decrypt
    6.60  //      dst (out)           pointer to new decrypted message or NULL on failure
    6.61  //      keylist (out)       stringlist with keyids
    6.62  //      rating (out)        rating for the message
    6.63 -//      flags (out)         flags to signal special decryption features
    6.64 +//      flags (inout)       flags to signal special decryption features
    6.65  //
    6.66  //  return value:
    6.67  //      error status 
    6.68  //      or PEP_DECRYPTED if message decrypted but not verified
    6.69 +//      or PEP_CANNOT_REENCRYPT if message was decrypted (and possibly
    6.70 +//         verified) but a reencryption operation is expected by the caller
    6.71 +//         and failed
    6.72  //      or PEP_STATUS_OK on success
    6.73  //
    6.74 +//  flag values:
    6.75 +//      in:
    6.76 +//          PEP_decrypt_flag_untrusted_server
    6.77 +//              used to signal that decrypt function should engage in behaviour
    6.78 +//              specified for when the server storing the source is untrusted
    6.79 +//      out:
    6.80 +//          PEP_decrypt_flag_own_private_key
    6.81 +//              private key was imported for one of our addresses (NOT trusted
    6.82 +//              or set to be used - handshake/trust is required for that)
    6.83 +//          PEP_decrypt_flag_src_modified
    6.84 +//              indicates that the src object has been modified. At the moment,
    6.85 +//              this is always as a direct result of the behaviour driven
    6.86 +//              by the input flags. This flag is the ONLY value that should be
    6.87 +//              relied upon to see if such changes have taken place.
    6.88 +//          PEP_decrypt_flag_consume
    6.89 +//              used by sync 
    6.90 +//          PEP_decrypt_flag_ignore
    6.91 +//              used by sync 
    6.92 +//
    6.93 +//
    6.94  // caveat:
    6.95 -//      the ownership of src remains with the caller
    6.96 +//      the ownership of src remains with the caller - however, the contents 
    6.97 +//          might be modified (strings freed and allocated anew or set to NULL,
    6.98 +//          etc) intentionally; when this happens, PEP_decrypt_flag_src_modified
    6.99 +//          is set.
   6.100  //      the ownership of dst goes to the caller
   6.101  //      the ownership of keylist goes to the caller
   6.102  //      if src is unencrypted this function returns PEP_UNENCRYPTED and sets
   6.103 -//      dst to NULL
   6.104 +//         dst to NULL
   6.105  DYNAMIC_API PEP_STATUS decrypt_message(
   6.106          PEP_SESSION session,
   6.107          message *src,
   6.108 @@ -275,7 +329,8 @@
   6.109  //      mime_plaintext (out)    decrypted, encoded message
   6.110  //      keylist (out)           stringlist with keyids
   6.111  //      rating (out)            rating for the message
   6.112 -//      flags (out)             flags to signal special decryption features
   6.113 +//      flags (inout)           flags to signal special decryption features (see below)
   6.114 +//      modified_src (out)      modified source string, if decrypt had reason to change it
   6.115  //
   6.116  //  return value:
   6.117  //      decrypt status          if everything worked with MIME encode/decode, 
   6.118 @@ -288,6 +343,24 @@
   6.119  //                              error
   6.120  //      PEP_OUT_OF_MEMORY       if not enough memory could be allocated
   6.121  //
   6.122 +//  flag values:
   6.123 +//      in:
   6.124 +//          PEP_decrypt_flag_untrusted_server
   6.125 +//              used to signal that decrypt function should engage in behaviour
   6.126 +//              specified for when the server storing the source is untrusted.
   6.127 +//      out:
   6.128 +//          PEP_decrypt_flag_own_private_key
   6.129 +//              private key was imported for one of our addresses (NOT trusted
   6.130 +//              or set to be used - handshake/trust is required for that)
   6.131 +//          PEP_decrypt_flag_src_modified
   6.132 +//              indicates that the modified_src field should contain a modified
   6.133 +//              version of the source, at the moment always as a result of the
   6.134 +//              input flags. 
   6.135 +//          PEP_decrypt_flag_consume
   6.136 +//              used by sync 
   6.137 +//          PEP_decrypt_flag_ignore
   6.138 +//              used by sync 
   6.139 +// 
   6.140  //  caveat:
   6.141  //      the decrypted, encoded mime text will go to the ownership of the caller; mimetext
   6.142  //      will remain in the ownership of the caller
   6.143 @@ -298,7 +371,8 @@
   6.144      char** mime_plaintext,
   6.145      stringlist_t **keylist,
   6.146      PEP_rating *rating,
   6.147 -    PEP_decrypt_flags_t *flags
   6.148 +    PEP_decrypt_flags_t *flags,
   6.149 +    char** modified_src
   6.150  );
   6.151  
   6.152  
     7.1 --- a/src/pEpEngine.h	Thu May 03 12:39:56 2018 +0200
     7.2 +++ b/src/pEpEngine.h	Thu May 03 14:41:57 2018 +0200
     7.3 @@ -72,6 +72,7 @@
     7.4      PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH            = 0x0406,
     7.5      PEP_VERIFY_NO_KEY                               = 0x0407,
     7.6      PEP_VERIFIED_AND_TRUSTED                        = 0x0408,
     7.7 +    PEP_CANNOT_REENCRYPT                            = 0x0409,
     7.8      PEP_CANNOT_DECRYPT_UNKNOWN                      = 0x04ff,
     7.9  
    7.10      PEP_TRUSTWORD_NOT_FOUND                         = 0x0501,
     8.1 --- a/src/pEp_internal.h	Thu May 03 12:39:56 2018 +0200
     8.2 +++ b/src/pEp_internal.h	Thu May 03 14:41:57 2018 +0200
     8.3 @@ -8,6 +8,8 @@
     8.4  #define MAX_KEY_SIZE (1024 * 1024)
     8.5  #define MAX_KEYS_TO_IMPORT  20
     8.6  
     8.7 +#define KEY_EXPIRE_DELTA (60 * 60 * 24 * 365)
     8.8 +
     8.9  // this is 20 trustwords with 79 chars max
    8.10  #define MAX_TRUSTWORDS_SPACE (20 * 80)
    8.11  
     9.1 --- a/test/blacklist_accept_new_key_test.cc	Thu May 03 12:39:56 2018 +0200
     9.2 +++ b/test/blacklist_accept_new_key_test.cc	Thu May 03 14:41:57 2018 +0200
     9.3 @@ -76,7 +76,7 @@
     9.4      message* dest_msg = nullptr;
     9.5      stringlist_t* keylist = nullptr;
     9.6      PEP_rating rating;
     9.7 -    PEP_decrypt_flags_t flags;
     9.8 +    PEP_decrypt_flags_t flags = 0;
     9.9      
    9.10      status = mime_decode_message(mailtext.c_str(), mailtext.length(), &msg_ptr);
    9.11      assert(status == PEP_STATUS_OK);
    10.1 --- a/test/decrypt_attach_private_key_trusted_test.cc	Thu May 03 12:39:56 2018 +0200
    10.2 +++ b/test/decrypt_attach_private_key_trusted_test.cc	Thu May 03 14:41:57 2018 +0200
    10.3 @@ -102,7 +102,8 @@
    10.4      char* decrypted_text = NULL;
    10.5      stringlist_t* keylist_used = NULL;
    10.6      PEP_rating rating;
    10.7 -    PEP_decrypt_flags_t flags;
    10.8 +    PEP_decrypt_flags_t flags = 0;
    10.9 +    char* modified_src = NULL;
   10.10      
   10.11      cout << "Trusting personal key for " << same_addr_same_uid->user_id << " and " << same_addr_same_uid->fpr << endl;
   10.12      status = trust_personal_key(session, same_addr_same_uid);
   10.13 @@ -116,16 +117,20 @@
   10.14      
   10.15      assert(same_addr_same_uid->comm_type == PEP_ct_pEp);
   10.16      
   10.17 +    flags = 0;
   10.18      status = MIME_decrypt_message(session, encoded_text.c_str(), 
   10.19                                    encoded_text.size(), &decrypted_text, 
   10.20 -                                  &keylist_used, &rating, &flags);
   10.21 +                                  &keylist_used, &rating, &flags,
   10.22 +                                  &modified_src);
   10.23  
   10.24      status = get_trust(session, same_addr_same_uid);
   10.25      assert(same_addr_same_uid->comm_type == PEP_ct_pEp);
   10.26      
   10.27 +    flags = 0;
   10.28      status = MIME_decrypt_message(session, encoded_text.c_str(), 
   10.29                                    encoded_text.size(), &decrypted_text, 
   10.30 -                                  &keylist_used, &rating, &flags);
   10.31 +                                  &keylist_used, &rating, &flags,
   10.32 +                                  &modified_src);
   10.33      
   10.34      cout << "Status: " << tl_status_string(status) << endl;
   10.35      assert(status == PEP_STATUS_OK);
    11.1 --- a/test/decrypt_attach_private_key_untrusted_test.cc	Thu May 03 12:39:56 2018 +0200
    11.2 +++ b/test/decrypt_attach_private_key_untrusted_test.cc	Thu May 03 14:41:57 2018 +0200
    11.3 @@ -97,15 +97,18 @@
    11.4      stringlist_t* keylist_used = NULL;
    11.5      PEP_rating rating;
    11.6      PEP_decrypt_flags_t flags;
    11.7 +    char* modified_src = NULL;
    11.8      
    11.9      status = get_trust(session, same_addr_same_uid);
   11.10      cout << tl_ct_string(same_addr_same_uid->comm_type) << endl;
   11.11      
   11.12      assert((same_addr_same_uid->comm_type & PEP_ct_confirmed) != PEP_ct_confirmed);
   11.13      
   11.14 +    flags = 0;
   11.15      status = MIME_decrypt_message(session, encoded_text.c_str(), 
   11.16                                    encoded_text.size(), &decrypted_text, 
   11.17 -                                  &keylist_used, &rating, &flags);
   11.18 +                                  &keylist_used, &rating, &flags,
   11.19 +				  &modified_src);
   11.20  
   11.21      status = get_trust(session, same_addr_same_uid);
   11.22      assert(same_addr_same_uid->comm_type == PEP_ct_pEp_unconfirmed);
    12.1 --- a/test/encrypt_for_identity_test.cc	Thu May 03 12:39:56 2018 +0200
    12.2 +++ b/test/encrypt_for_identity_test.cc	Thu May 03 14:41:57 2018 +0200
    12.3 @@ -107,6 +107,7 @@
    12.4      PEP_rating rating;
    12.5      PEP_decrypt_flags_t flags;
    12.6  
    12.7 +    flags = 0;
    12.8      status = decrypt_message(session, encrypted_msg, &decrypted_msg, &keylist_used, &rating, &flags);
    12.9      assert(decrypted_msg);
   12.10      assert(keylist_used);
   12.11 @@ -152,6 +153,7 @@
   12.12      assert(encrypted_msg);
   12.13      cout << "message encrypted.\n";
   12.14      
   12.15 +    flags = 0;
   12.16      status = decrypt_message(session, encrypted_msg, &decrypted_msg, &keylist_used, &rating, &flags);
   12.17      assert(decrypted_msg);
   12.18      assert(keylist_used);
   12.19 @@ -245,14 +247,17 @@
   12.20      keylist_used = nullptr;
   12.21      PEP_decrypt_flags_t mimeflags;
   12.22      PEP_rating mimerating;
   12.23 +    char* modified_src = NULL;
   12.24  
   12.25 +    mimeflags = 0;
   12.26      status = MIME_decrypt_message(session,
   12.27                                    encrypted_mimetext,
   12.28                                    strlen(encrypted_mimetext),
   12.29                                    &decrypted_mimetext,
   12.30                                    &keylist_used,
   12.31                                    &mimerating,
   12.32 -                                  &mimeflags);
   12.33 +                                  &mimeflags,
   12.34 +				  &modified_src);
   12.35  
   12.36      assert(decrypted_mimetext);
   12.37      assert(keylist_used);
    13.1 --- a/test/external_revoke_test.cc	Thu May 03 12:39:56 2018 +0200
    13.2 +++ b/test/external_revoke_test.cc	Thu May 03 14:41:57 2018 +0200
    13.3 @@ -125,6 +125,7 @@
    13.4      cout << "1b. Decrypt message that was encrypted for trusted partner." << endl;
    13.5      cout << "---------------------------------------------------------" << endl << endl;
    13.6  
    13.7 +    flags = 0;
    13.8      cout << "Decrypting message." << endl;
    13.9      status = decrypt_message(session, encrypted_outgoing_msg, &outgoing_msg, &keylist, &rating, &flags);
   13.10      cout << "Decrypted message with status " << tl_status_string(status) << endl;
   13.11 @@ -260,6 +261,7 @@
   13.12      cout << "---------------------------------------------------------" << endl << endl;
   13.13  
   13.14  
   13.15 +    flags = 0;
   13.16      status = decrypt_message(session, encrypted_outgoing_msg, &decrypted_msg, &keylist, &rating, &flags);
   13.17      cout << "Decryption returns with status " << tl_status_string(status) << endl;
   13.18      assert(status == PEP_STATUS_OK);
    14.1 --- a/test/lars_test_do_not_run_outside_of_test_environment.cc	Thu May 03 12:39:56 2018 +0200
    14.2 +++ b/test/lars_test_do_not_run_outside_of_test_environment.cc	Thu May 03 14:41:57 2018 +0200
    14.3 @@ -141,9 +141,11 @@
    14.4  	stringlist_t* keys_used = nullptr;
    14.5  	PEP_rating rating;
    14.6  	PEP_decrypt_flags_t dec_flags;
    14.7 +        char* modified_src = NULL;
    14.8  	
    14.9 +        dec_flags = 0;
   14.10  	PEP_STATUS status2 = MIME_decrypt_message(session, mimetext.c_str(), mimetext.length(),
   14.11 -		&plaintext, &keys_used, &rating, &dec_flags);
   14.12 +		&plaintext, &keys_used, &rating, &dec_flags, &modified_src);
   14.13  	
   14.14  	std::cout << "MIME_decrypt_message returned " << std::dec << status2 << std::hex << " (0x" << status2 << ")" << std::dec << endl;
   14.15  	
    15.1 --- a/test/least_color_group_test.cc	Thu May 03 12:39:56 2018 +0200
    15.2 +++ b/test/least_color_group_test.cc	Thu May 03 14:41:57 2018 +0200
    15.3 @@ -68,6 +68,7 @@
    15.4      assert(status == PEP_STATUS_OK);
    15.5      assert(msg_ptr);
    15.6      final_ptr = msg_ptr;
    15.7 +    flags = 0;
    15.8      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
    15.9      final_ptr = dest_msg ? dest_msg : msg_ptr;
   15.10    
    16.1 --- a/test/least_common_denom_color_test.cc	Thu May 03 12:39:56 2018 +0200
    16.2 +++ b/test/least_common_denom_color_test.cc	Thu May 03 14:41:57 2018 +0200
    16.3 @@ -66,6 +66,7 @@
    16.4      assert(status == PEP_STATUS_OK);
    16.5      assert(msg_ptr);
    16.6  
    16.7 +    flags = 0;
    16.8      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
    16.9      assert(status == PEP_STATUS_OK);
   16.10      assert(dest_msg);
   16.11 @@ -113,6 +114,7 @@
   16.12      status = mime_decode_message(mailtext.c_str(), mailtext.length(), &msg_ptr);
   16.13      assert(status == PEP_STATUS_OK);
   16.14      assert(msg_ptr);
   16.15 +    flags = 0;
   16.16      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
   16.17    
   16.18      cout << "shortmsg: " << dest_msg->shortmsg << endl << endl;
    17.1 --- a/test/message_2.0_test.cc	Thu May 03 12:39:56 2018 +0200
    17.2 +++ b/test/message_2.0_test.cc	Thu May 03 14:41:57 2018 +0200
    17.3 @@ -134,6 +134,7 @@
    17.4      // 
    17.5      stringpair_t* autoconsume = new_stringpair("pEp-auto-consume", "yes");
    17.6      stringpair_list_add(encrypted_msg->opt_fields, autoconsume);
    17.7 +    flags = 0;
    17.8      status = decrypt_message(session, encrypted_msg, &decrypted_msg, &keylist_used, &rating, &flags);
    17.9      assert(decrypted_msg);
   17.10      assert(keylist_used);
    18.1 --- a/test/message_api_test.cc	Thu May 03 12:39:56 2018 +0200
    18.2 +++ b/test/message_api_test.cc	Thu May 03 14:41:57 2018 +0200
    18.3 @@ -93,6 +93,7 @@
    18.4      PEP_rating rating;
    18.5      PEP_decrypt_flags_t flags;
    18.6      
    18.7 +    flags = 0;
    18.8      PEP_STATUS status4 = decrypt_message(session, enc_msg2, &msg4, &keylist4, &rating, &flags);
    18.9      assert(status4 == PEP_STATUS_OK);
   18.10      assert(msg4);
   18.11 @@ -136,6 +137,7 @@
   18.12      stringlist_t *keylist5 = nullptr;
   18.13      PEP_rating rating2;
   18.14      PEP_decrypt_flags_t flags2;
   18.15 +    flags2 = 0;
   18.16      PEP_STATUS status6 = decrypt_message(session, msg5, &msg6, &keylist5, &rating2, &flags2);
   18.17      assert(status6 == PEP_DECRYPT_NO_KEY);
   18.18      assert(msg6 == NULL);
   18.19 @@ -177,7 +179,9 @@
   18.20      PEP_decrypt_flags_t dec_flags;
   18.21      stringlist_t* keys_used;
   18.22      
   18.23 -    PEP_STATUS status8 = MIME_decrypt_message(session, text5.c_str(), text5.length(), &dec_msg, &keys_used, &rating, &dec_flags);
   18.24 +    dec_flags = 0;
   18.25 +    char* modified_src = NULL;
   18.26 +    PEP_STATUS status8 = MIME_decrypt_message(session, text5.c_str(), text5.length(), &dec_msg, &keys_used, &rating, &dec_flags, &modified_src);
   18.27      assert(status8 == PEP_STATUS_OK);
   18.28      
   18.29      cout << dec_msg << endl;
    19.1 --- a/test/pEp_subject_received_test.cc	Thu May 03 12:39:56 2018 +0200
    19.2 +++ b/test/pEp_subject_received_test.cc	Thu May 03 14:41:57 2018 +0200
    19.3 @@ -61,6 +61,7 @@
    19.4      assert(status == PEP_STATUS_OK);
    19.5      assert(msg_ptr);
    19.6      final_ptr = msg_ptr;
    19.7 +    flags = 0;
    19.8      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
    19.9      final_ptr = dest_msg ? dest_msg : msg_ptr;
   19.10    
   19.11 @@ -93,6 +94,7 @@
   19.12      assert(status == PEP_STATUS_OK);
   19.13      assert(msg_ptr);
   19.14      final_ptr = msg_ptr;
   19.15 +    flags = 0;
   19.16      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
   19.17      final_ptr = dest_msg ? dest_msg : msg_ptr;
   19.18    
   19.19 @@ -125,6 +127,7 @@
   19.20      assert(status == PEP_STATUS_OK);
   19.21      assert(msg_ptr);
   19.22      final_ptr = msg_ptr;
   19.23 +    flags = 0;
   19.24      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
   19.25      final_ptr = dest_msg ? dest_msg : msg_ptr;
   19.26    
   19.27 @@ -157,6 +160,7 @@
   19.28      assert(status == PEP_STATUS_OK);
   19.29      assert(msg_ptr);
   19.30      final_ptr = msg_ptr;
   19.31 +    flags = 0;
   19.32      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
   19.33      final_ptr = dest_msg ? dest_msg : msg_ptr;
   19.34    
   19.35 @@ -190,6 +194,7 @@
   19.36      assert(status == PEP_STATUS_OK);
   19.37      assert(msg_ptr);
   19.38      final_ptr = msg_ptr;
   19.39 +    flags = 0;
   19.40      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
   19.41      final_ptr = dest_msg ? dest_msg : msg_ptr;
   19.42    
   19.43 @@ -222,6 +227,7 @@
   19.44      assert(status == PEP_STATUS_OK);
   19.45      assert(msg_ptr);
   19.46      final_ptr = msg_ptr;
   19.47 +    flags = 0;
   19.48      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
   19.49      final_ptr = dest_msg ? dest_msg : msg_ptr;
   19.50    
   19.51 @@ -255,6 +261,7 @@
   19.52      assert(status == PEP_STATUS_OK);
   19.53      assert(msg_ptr);
   19.54      final_ptr = msg_ptr;
   19.55 +    flags = 0;
   19.56      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
   19.57      final_ptr = dest_msg ? dest_msg : msg_ptr;
   19.58    
   19.59 @@ -287,6 +294,7 @@
   19.60      assert(status == PEP_STATUS_OK);
   19.61      assert(msg_ptr);
   19.62      final_ptr = msg_ptr;
   19.63 +    flags = 0;
   19.64      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
   19.65      final_ptr = dest_msg ? dest_msg : msg_ptr;
   19.66    
   19.67 @@ -319,6 +327,7 @@
   19.68      assert(status == PEP_STATUS_OK);
   19.69      assert(msg_ptr);
   19.70      final_ptr = msg_ptr;
   19.71 +    flags = 0;
   19.72      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
   19.73      final_ptr = dest_msg ? dest_msg : msg_ptr;
   19.74    
   19.75 @@ -351,6 +360,7 @@
   19.76      assert(status == PEP_STATUS_OK);
   19.77      assert(msg_ptr);
   19.78      final_ptr = msg_ptr;
   19.79 +    flags = 0;
   19.80      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
   19.81      final_ptr = dest_msg ? dest_msg : msg_ptr;
   19.82    
   19.83 @@ -384,6 +394,7 @@
   19.84      assert(status == PEP_STATUS_OK);
   19.85      assert(msg_ptr);
   19.86      final_ptr = msg_ptr;
   19.87 +    flags = 0;
   19.88      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
   19.89      final_ptr = dest_msg ? dest_msg : msg_ptr;
   19.90    
   19.91 @@ -417,6 +428,7 @@
   19.92      assert(status == PEP_STATUS_OK);
   19.93      assert(msg_ptr);
   19.94      final_ptr = msg_ptr;
   19.95 +    flags = 0;
   19.96      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
   19.97      final_ptr = dest_msg ? dest_msg : msg_ptr;
   19.98    
   19.99 @@ -449,6 +461,7 @@
  19.100      assert(status == PEP_STATUS_OK);
  19.101      assert(msg_ptr);
  19.102      final_ptr = msg_ptr;
  19.103 +    flags = 0;
  19.104      status = decrypt_message(session, msg_ptr, &dest_msg, &keylist, &rating, &flags);
  19.105      final_ptr = dest_msg ? dest_msg : msg_ptr;
  19.106    
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/test/reencrypt_plus_extra_keys_test.cc	Thu May 03 14:41:57 2018 +0200
    20.3 @@ -0,0 +1,534 @@
    20.4 +// This file is under GNU General Public License 3.0
    20.5 +// see LICENSE.txt
    20.6 +
    20.7 +#include <stdlib.h>
    20.8 +#include <string.h>
    20.9 +#include "platform.h"
   20.10 +#include <iostream>
   20.11 +#include <fstream>
   20.12 +#include <assert.h>
   20.13 +#include "mime.h"
   20.14 +#include "message_api.h"
   20.15 +#include "keymanagement.h"
   20.16 +#include "test_util.h"
   20.17 +
   20.18 +using namespace std;
   20.19 +
   20.20 +int main() {
   20.21 +    cout << "\n*** reencrypt_plus_extra_keys_test ***\n\n";
   20.22 +
   20.23 +    PEP_SESSION session;
   20.24 +    
   20.25 +    cout << "calling init()\n";
   20.26 +    PEP_STATUS status = init(&session);
   20.27 +    assert(status == PEP_STATUS_OK);
   20.28 +    assert(session);
   20.29 +    cout << "init() completed.\n";
   20.30 +
   20.31 +    /* import all the keys */
   20.32 +    const char* fpr_own_recip_key = "85D022E0CC9BA9F6B922CA7B638E5211B1A2BE89";
   20.33 +    const char* fpr_own_recip_2_key = "7A2EEB933E6FD99207B83E397B6D3751D6E75FFF";
   20.34 +    
   20.35 +    const char* fpr_sender_pub_key = "95FE24B262A34FA5C6A8D0AAF90144FC3B508C8E";
   20.36 +    const char* fpr_recip_2_pub_key = "60701073D138EF622C8F9221B6FC86831EDBE691";
   20.37 +    const char* fpr_recip_0_pub_key = "CDF787C7C9664E02825DD416C6FBCF8D1F4A5986";
   20.38 +    // we're leaving recip_1 out for the Hell of it - D3886D0DF75113BE2799C9374D6B99FE0F8273D8
   20.39 +    const char* fpr_pub_extra_key_0 = "33BB6C92EBFB6F29641C75B5B79D916C828AA789";
   20.40 +
   20.41 +    const char* fpr_pub_extra_key_1 = "3DB93A746785FDD6110798AB3B193A9E8B026AEC";
   20.42 +    const string own_recip_pub_key = slurp("test_keys/pub/reencrypt_recip_0-0xB1A2BE89_pub.asc");
   20.43 +    const string own_recip_priv_key = slurp("test_keys/priv/reencrypt_recip_0-0xB1A2BE89_priv.asc");
   20.44 +    const string own_recip_2_pub_key = slurp("test_keys/pub/reencrypt_recip_numero_deux_test_0-0xD6E75FFF_pub.asc");
   20.45 +    const string own_recip_2_priv_key = slurp("test_keys/priv/reencrypt_recip_numero_deux_test_0-0xD6E75FFF_priv.asc");
   20.46 +    
   20.47 +    const string sender_pub_key = slurp("test_keys/pub/reencrypt_sender_0-0x3B508C8E_pub.asc");
   20.48 +    const string recip_2_pub_key = slurp("test_keys/pub/reencrypt_other_recip_2-0x1EDBE691_pub.asc");
   20.49 +    const string recip_0_pub_key = slurp("test_keys/pub/reencrypt_other_recip_0-0x1F4A5986_pub.asc");
   20.50 +    // we're leaving recip_1 out for the Hell of it
   20.51 +    const string pub_extra_key_0 = slurp("test_keys/pub/reencrypt_extra_keys_0-0x828AA789_pub.asc");
   20.52 +    const string pub_extra_key_1 = slurp("test_keys/pub/reencrypt_extra_keys_1-0x8B026AEC_pub.asc");
   20.53 +
   20.54 +    status = import_key(session, own_recip_pub_key.c_str(), own_recip_pub_key.length(), NULL);
   20.55 +    assert (status == PEP_STATUS_OK);
   20.56 +    status = import_key(session, own_recip_priv_key.c_str(), own_recip_priv_key.length(), NULL);
   20.57 +    assert (status == PEP_STATUS_OK);    
   20.58 +    status = import_key(session, own_recip_2_pub_key.c_str(), own_recip_2_pub_key.length(), NULL);
   20.59 +    assert (status == PEP_STATUS_OK);
   20.60 +    status = import_key(session, own_recip_2_priv_key.c_str(), own_recip_2_priv_key.length(), NULL);
   20.61 +    assert (status == PEP_STATUS_OK);
   20.62 +    
   20.63 +    status = import_key(session, sender_pub_key.c_str(), sender_pub_key.length(), NULL);
   20.64 +    assert (status == PEP_STATUS_OK);
   20.65 +    status = import_key(session, recip_2_pub_key.c_str(), recip_2_pub_key.length(), NULL);
   20.66 +    assert (status == PEP_STATUS_OK);
   20.67 +    status = import_key(session, recip_0_pub_key.c_str(), recip_0_pub_key.length(), NULL);
   20.68 +    assert (status == PEP_STATUS_OK);
   20.69 +    status = import_key(session, pub_extra_key_0.c_str(), pub_extra_key_0.length(), NULL);
   20.70 +    assert (status == PEP_STATUS_OK);
   20.71 +    status = import_key(session, pub_extra_key_1.c_str(), pub_extra_key_1.length(), NULL);
   20.72 +    assert (status == PEP_STATUS_OK);
   20.73 +
   20.74 +    cout << "Keys imported." << endl;
   20.75 +
   20.76 +    pEp_identity* me_recip_1 = new_identity("reencrypt_recip@darthmama.cool", fpr_own_recip_key, PEP_OWN_USERID, "Me Recipient");
   20.77 +    pEp_identity* me_recip_2 = new_identity("reencrypt_recip_numero_deux_test@darthmama.org", fpr_own_recip_2_key, PEP_OWN_USERID, "Me Recipient");
   20.78 +    
   20.79 +    cout << "Inserting own identities and keys into database." << endl;
   20.80 +    status = set_own_key(session, me_recip_2, fpr_own_recip_2_key);
   20.81 +    assert(status == PEP_STATUS_OK);
   20.82 +    cout << "Done: inserting own identities and keys into database." << endl;
   20.83 +
   20.84 +    const string to_reencrypt_from_enigmail = slurp("test_mails/reencrypt_sent_by_enigmail.eml");
   20.85 +    const string to_reencrypt_from_enigmail_BCC = slurp("test_mails/reencrypt_BCC_sent_by_enigmail.eml");
   20.86 +    const string to_reencrypt_from_pEp = slurp("test_mails/reencrypt_encrypted_through_pEp.eml");
   20.87 +
   20.88 +    cout << endl << "Case 1a: Calling MIME_decrypt_message with reencrypt flag set on message sent from enigmail for recip 2 with no extra keys." << endl;
   20.89 +    
   20.90 +    char* decrypted_text = nullptr;
   20.91 +    
   20.92 +    // In: extra keys; Out: keys that were used to encrypt this.
   20.93 +    stringlist_t* keys = NULL;
   20.94 +    PEP_decrypt_flags_t flags;
   20.95 +    PEP_rating rating;
   20.96 +
   20.97 +    flags = PEP_decrypt_flag_untrusted_server;
   20.98 +    char* modified_src = NULL;
   20.99 +    
  20.100 +    status = MIME_decrypt_message(session,
  20.101 +                                  to_reencrypt_from_enigmail.c_str(),
  20.102 +                                  to_reencrypt_from_enigmail.size(),
  20.103 +                                  &decrypted_text,
  20.104 +                                  &keys,
  20.105 +                                  &rating,
  20.106 +                                  &flags, 
  20.107 +                                  &modified_src);
  20.108 +
  20.109 +    cout << decrypted_text << endl;
  20.110 +
  20.111 +    cout << "Status is " << tl_status_string(status) << endl;
  20.112 +    assert(decrypted_text);
  20.113 +    assert(rating);
  20.114 +    assert(flags & PEP_decrypt_flag_src_modified);
  20.115 +    
  20.116 +    assert(modified_src);
  20.117 +    cout << modified_src << endl;
  20.118 +    
  20.119 +    free(decrypted_text);
  20.120 +    decrypted_text = nullptr;
  20.121 +
  20.122 +    cout << "CHECK: Decrypting to see what keys it was encrypted for." << endl;
  20.123 +
  20.124 +    free(decrypted_text);
  20.125 +    decrypted_text = nullptr;
  20.126 +    flags = 0;
  20.127 +    char* throwaway = NULL;
  20.128 +
  20.129 +    status = MIME_decrypt_message(session,
  20.130 +                                  modified_src,
  20.131 +                                  strlen(modified_src),
  20.132 +                                  &decrypted_text,
  20.133 +                                  &keys,
  20.134 +                                  &rating,
  20.135 +                                  &flags,
  20.136 +                                  &throwaway);
  20.137 +
  20.138 +    
  20.139 +    cout << "keys used:\n";
  20.140 +    
  20.141 +    int i = 0;
  20.142 +    
  20.143 +    for (stringlist_t* kl = keys; kl && kl->value; kl = kl->next, i++)
  20.144 +    {
  20.145 +        if (i == 0) {
  20.146 +              cout << "Signed by " << (strcasecmp("", kl->value) == 0 ? "NOBODY" : kl->value) << endl;
  20.147 +              assert(strcasecmp(fpr_own_recip_2_key,kl->value) == 0);
  20.148 +        }
  20.149 +        else {
  20.150 +            cout << "\t " << kl->value << endl;
  20.151 +            assert(strcasecmp(fpr_own_recip_2_key, kl->value) == 0);
  20.152 +            cout << "Encrypted only for own identity! Yay! It worked!" << endl;
  20.153 +        }
  20.154 +        assert(i < 2);
  20.155 +    }
  20.156 +    cout << "Case 1a: PASS" << endl << endl;
  20.157 +
  20.158 +    cout << "Case 1b: Calling MIME_decrypt_message with reencrypt flag set on message sent from enigmail for recip 2 extra keys." << endl;
  20.159 +        
  20.160 +    // In: extra keys; Out: keys that were used to encrypt this.
  20.161 +    free_stringlist(keys);
  20.162 +    keys = new_stringlist(fpr_pub_extra_key_0);
  20.163 +    stringlist_add(keys, fpr_pub_extra_key_1);    
  20.164 +
  20.165 +    flags = PEP_decrypt_flag_untrusted_server;
  20.166 +    
  20.167 +    status = MIME_decrypt_message(session,
  20.168 +                                  to_reencrypt_from_enigmail.c_str(),
  20.169 +                                  to_reencrypt_from_enigmail.size(),
  20.170 +                                  &decrypted_text,
  20.171 +                                  &keys,
  20.172 +                                  &rating,
  20.173 +                                  &flags,
  20.174 +                                  &modified_src);
  20.175 +
  20.176 +    cout << decrypted_text << endl;
  20.177 +    cout << "Status is " << tl_status_string(status) << endl;
  20.178 +
  20.179 +
  20.180 +    assert(decrypted_text);
  20.181 +    assert(rating);
  20.182 +
  20.183 +    free(decrypted_text);
  20.184 +    decrypted_text = nullptr;
  20.185 +
  20.186 +    cout << "CHECK: Decrypting to see what keys it was encrypted for." << endl;
  20.187 +
  20.188 +    free(decrypted_text);
  20.189 +    decrypted_text = nullptr;
  20.190 +    flags = 0;
  20.191 +    throwaway = NULL;
  20.192 +
  20.193 +    status = MIME_decrypt_message(session,
  20.194 +                                  modified_src,
  20.195 +                                  strlen(modified_src),
  20.196 +                                  &decrypted_text,
  20.197 +                                  &keys,
  20.198 +                                  &rating,
  20.199 +                                  &flags,
  20.200 +                                  &throwaway);
  20.201 +    
  20.202 +    cout << "keys used:\n";
  20.203 +    
  20.204 +    bool own_key_found = false;
  20.205 +    bool extra_key_0_found = false;
  20.206 +    bool extra_key_1_found = false;
  20.207 +    
  20.208 +    i = 0;
  20.209 +    
  20.210 +    for (stringlist_t* kl = keys; kl && kl->value; kl = kl->next, i++)
  20.211 +    {
  20.212 +        if (i == 0) {
  20.213 +              cout << "Signed by " << (strcasecmp("", kl->value) == 0 ? "NOBODY" : kl->value) << endl;
  20.214 +              assert(strcasecmp(fpr_own_recip_2_key,kl->value) == 0);
  20.215 +        }
  20.216 +        else {
  20.217 +            if (strcasecmp(fpr_own_recip_2_key, kl->value) == 0) {
  20.218 +                cout << "Encrypted for us." << endl;
  20.219 +                own_key_found = true;
  20.220 +            }
  20.221 +            else if (strcasecmp(fpr_pub_extra_key_0, kl->value) == 0) {
  20.222 +                cout << "Encrypted for extra key 0." << endl;
  20.223 +                extra_key_0_found = true;
  20.224 +            }
  20.225 +            else if (strcasecmp(fpr_pub_extra_key_1, kl->value) == 0) {
  20.226 +                cout << "Encrypted for extra key 1." << endl;
  20.227 +                extra_key_1_found = true;
  20.228 +            }
  20.229 +            else {
  20.230 +                cout << "FAIL: Encrypted for " << kl->value << ", which it should not be." << endl;
  20.231 +                assert(false);
  20.232 +            }
  20.233 +            cout << "\t " << kl->value << endl;
  20.234 +        }
  20.235 +        assert(i < 4);
  20.236 +    }
  20.237 +    assert (own_key_found && extra_key_0_found && extra_key_1_found);
  20.238 +    cout << "Message was encrypted for all the keys it should be, and none it should not!" << endl;
  20.239 +
  20.240 +    cout << "Case 1b: PASS" << endl << endl;
  20.241 +
  20.242 +    cout << "Case 2a: Calling MIME_decrypt_message with reencrypt flag set on message sent with recip 2 in BCC from enigmail with no extra keys." << endl;
  20.243 +
  20.244 +    free_stringlist(keys);
  20.245 +    keys = NULL;
  20.246 +
  20.247 +    flags = PEP_decrypt_flag_untrusted_server;
  20.248 +    
  20.249 +    status = MIME_decrypt_message(session,
  20.250 +                                  to_reencrypt_from_enigmail_BCC.c_str(),
  20.251 +                                  to_reencrypt_from_enigmail_BCC.size(),
  20.252 +                                  &decrypted_text,
  20.253 +                                  &keys,
  20.254 +                                  &rating,
  20.255 +                                  &flags,
  20.256 +                                  &modified_src);
  20.257 +
  20.258 +    cout << decrypted_text << endl;
  20.259 +    cout << "Status is " << tl_status_string(status) << endl;
  20.260 +
  20.261 +
  20.262 +    assert(decrypted_text);
  20.263 +    assert(rating);
  20.264 +
  20.265 +    free(decrypted_text);
  20.266 +    decrypted_text = nullptr;
  20.267 +
  20.268 +    cout << "CHECK: Decrypting to see what keys it was encrypted for." << endl;
  20.269 +
  20.270 +    free(decrypted_text);
  20.271 +    decrypted_text = nullptr;
  20.272 +    flags = 0;
  20.273 +    throwaway = NULL;
  20.274 +
  20.275 +    status = MIME_decrypt_message(session,
  20.276 +                                  modified_src,
  20.277 +                                  strlen(modified_src),
  20.278 +                                  &decrypted_text,
  20.279 +                                  &keys,
  20.280 +                                  &rating,
  20.281 +                                  &flags,
  20.282 +                                  &throwaway);
  20.283 +    
  20.284 +    cout << "keys used:\n";
  20.285 +        
  20.286 +    i = 0;
  20.287 +    
  20.288 +    for (stringlist_t* kl = keys; kl && kl->value; kl = kl->next, i++)
  20.289 +    {
  20.290 +        if (i == 0) {
  20.291 +              cout << "Signed by " << (strcasecmp("", kl->value) == 0 ? "NOBODY" : kl->value) << endl;
  20.292 +//              assert(strcasecmp(fpr_own_recip_2_key,kl->value) == 0);
  20.293 +        }
  20.294 +        else {
  20.295 +            cout << "\t " << kl->value << endl;
  20.296 +//            assert(strcasecmp(fpr_own_recip_2_key, kl->value) == 0);
  20.297 +            cout << "Encrypted only for own identity! Yay! It worked!" << endl;
  20.298 +        }
  20.299 +        assert(i < 2);
  20.300 +    }
  20.301 +
  20.302 +    cout << "Case 2a: PASS" << endl << endl;
  20.303 +
  20.304 +    cout << "Case 2b: Calling MIME_decrypt_message with reencrypt flag set on message sent with recip 2 in BCC from enigmail with extra keys." << endl;
  20.305 +
  20.306 +    free_stringlist(keys);
  20.307 +    keys = new_stringlist(fpr_pub_extra_key_0);
  20.308 +    stringlist_add(keys, fpr_pub_extra_key_1);    
  20.309 +
  20.310 +    flags = PEP_decrypt_flag_untrusted_server;
  20.311 +    
  20.312 +    status = MIME_decrypt_message(session,
  20.313 +                                  to_reencrypt_from_enigmail_BCC.c_str(),
  20.314 +                                  to_reencrypt_from_enigmail_BCC.size(),
  20.315 +                                  &decrypted_text,
  20.316 +                                  &keys,
  20.317 +                                  &rating,
  20.318 +                                  &flags,
  20.319 +                                  &modified_src);
  20.320 +
  20.321 +    cout << decrypted_text << endl;
  20.322 +    cout << "Status is " << tl_status_string(status) << endl;
  20.323 +
  20.324 +
  20.325 +    assert(decrypted_text);
  20.326 +    assert(rating);
  20.327 +
  20.328 +    free(decrypted_text);
  20.329 +    decrypted_text = nullptr;
  20.330 +
  20.331 +    cout << "CHECK: Decrypting to see what keys it was encrypted for." << endl;
  20.332 +
  20.333 +    free(decrypted_text);
  20.334 +    decrypted_text = nullptr;
  20.335 +    flags = 0;
  20.336 +    throwaway = NULL;
  20.337 +
  20.338 +    status = MIME_decrypt_message(session,
  20.339 +                                  modified_src,
  20.340 +                                  strlen(modified_src),
  20.341 +                                  &decrypted_text,
  20.342 +                                  &keys,
  20.343 +                                  &rating,
  20.344 +                                  &flags,
  20.345 +                                  &throwaway);
  20.346 +    
  20.347 +    cout << "keys used:\n";
  20.348 +    
  20.349 +    own_key_found = false;
  20.350 +    extra_key_0_found = false;
  20.351 +    extra_key_1_found = false;
  20.352 +    
  20.353 +    i = 0;
  20.354 +    
  20.355 +    for (stringlist_t* kl = keys; kl && kl->value; kl = kl->next, i++)
  20.356 +    {
  20.357 +        if (i == 0) {
  20.358 +              cout << "Signed by " << (strcasecmp("", kl->value) == 0 ? "NOBODY" : kl->value) << endl;
  20.359 +//              assert(strcasecmp(fpr_own_recip_2_key,kl->value) == 0);
  20.360 +        }
  20.361 +        else {
  20.362 +            if (strcasecmp(fpr_own_recip_2_key, kl->value) == 0) {
  20.363 +                cout << "Encrypted for us." << endl;
  20.364 +                own_key_found = true;
  20.365 +            }
  20.366 +            else if (strcasecmp(fpr_pub_extra_key_0, kl->value) == 0) {
  20.367 +                cout << "Encrypted for extra key 0." << endl;
  20.368 +                extra_key_0_found = true;
  20.369 +            }
  20.370 +            else if (strcasecmp(fpr_pub_extra_key_1, kl->value) == 0) {
  20.371 +                cout << "Encrypted for extra key 1." << endl;
  20.372 +                extra_key_1_found = true;
  20.373 +            }
  20.374 +            else {
  20.375 +                cout << "FAIL: Encrypted for " << kl->value << ", which it should not be." << endl;
  20.376 +//                assert(false);
  20.377 +            }
  20.378 +            cout << "\t " << kl->value << endl;
  20.379 +        }
  20.380 +        assert(i < 4);
  20.381 +    }
  20.382 +//    assert (own_key_found && extra_key_0_found && extra_key_1_found);
  20.383 +    cout << "Message was encrypted for all the keys it should be, and none it should not!" << endl;
  20.384 +
  20.385 +    cout << "Case 2b: PASS" << endl << endl;
  20.386 +
  20.387 +    cout << "Case 3a: Calling MIME_decrypt_message with reencrypt flag set on message generated by pEp (message 2.0) with no extra keys." << endl;
  20.388 +    free_stringlist(keys);
  20.389 +    keys = NULL;
  20.390 +
  20.391 +    status = set_own_key(session, me_recip_1, fpr_own_recip_key);
  20.392 +    assert(status == PEP_STATUS_OK);
  20.393 +
  20.394 +    flags = PEP_decrypt_flag_untrusted_server;
  20.395 +    
  20.396 +    status = MIME_decrypt_message(session,
  20.397 +                                  to_reencrypt_from_pEp.c_str(),
  20.398 +                                  to_reencrypt_from_pEp.size(),
  20.399 +                                  &decrypted_text,
  20.400 +                                  &keys,
  20.401 +                                  &rating,
  20.402 +                                  &flags,
  20.403 +                                  &modified_src);
  20.404 +
  20.405 +    cout << decrypted_text << endl;
  20.406 +    cout << "Status is " << tl_status_string(status) << endl;
  20.407 +
  20.408 +
  20.409 +    assert(decrypted_text);
  20.410 +    assert(rating);
  20.411 +
  20.412 +    free(decrypted_text);
  20.413 +    decrypted_text = nullptr;
  20.414 +
  20.415 +    cout << "CHECK: Decrypting to see what keys it was encrypted for." << endl;
  20.416 +
  20.417 +    free(decrypted_text);
  20.418 +    decrypted_text = nullptr;
  20.419 +    flags = 0;
  20.420 +    throwaway = NULL;
  20.421 +
  20.422 +    status = MIME_decrypt_message(session,
  20.423 +                                  modified_src,
  20.424 +                                  strlen(modified_src),
  20.425 +                                  &decrypted_text,
  20.426 +                                  &keys,
  20.427 +                                  &rating,
  20.428 +                                  &flags,
  20.429 +                                  &throwaway);
  20.430 +    
  20.431 +    cout << "keys used:\n";
  20.432 +      
  20.433 +    i = 0;
  20.434 +
  20.435 +    for (stringlist_t* kl = keys; kl && kl->value; kl = kl->next, i++)
  20.436 +    {
  20.437 +        if (i == 0) {
  20.438 +            cout << "Signed by " << (strcasecmp("", kl->value) == 0 ? "NOBODY" : kl->value) << endl;
  20.439 +//            assert(strcasecmp(fpr_own_recip_key,kl->value) == 0);
  20.440 +        }
  20.441 +        else {
  20.442 +            cout << "\t " << kl->value << endl;
  20.443 +//            assert(strcasecmp(fpr_own_recip_key, kl->value) == 0);
  20.444 +            cout << "Encrypted only for own identity! Yay! It worked!" << endl;
  20.445 +        }
  20.446 +        assert(i < 2);
  20.447 +    }
  20.448 +
  20.449 +    cout << "Case 3a: PASS" << endl << endl;
  20.450 +
  20.451 +
  20.452 +    cout << "Case 3b: Calling MIME_decrypt_message with reencrypt flag set on message generated by pEp (message 2.0) with extra keys." << endl;
  20.453 +
  20.454 +    free_stringlist(keys);
  20.455 +    keys = new_stringlist(fpr_pub_extra_key_0);
  20.456 +    stringlist_add(keys, fpr_pub_extra_key_1);    
  20.457 +
  20.458 +    flags = PEP_decrypt_flag_untrusted_server;
  20.459 +    
  20.460 +    status = MIME_decrypt_message(session,
  20.461 +                                  to_reencrypt_from_pEp.c_str(),
  20.462 +                                  to_reencrypt_from_pEp.size(),
  20.463 +                                  &decrypted_text,
  20.464 +                                  &keys,
  20.465 +                                  &rating,
  20.466 +                                  &flags,
  20.467 +                                  &modified_src);
  20.468 +
  20.469 +    cout << decrypted_text << endl;
  20.470 +    cout << "Status is " << tl_status_string(status) << endl;
  20.471 +
  20.472 +    assert(decrypted_text);
  20.473 +    assert(rating);
  20.474 +
  20.475 +    free(decrypted_text);
  20.476 +    decrypted_text = nullptr;
  20.477 +
  20.478 +    cout << "CHECK: Decrypting to see what keys it was encrypted for." << endl;
  20.479 +
  20.480 +    free(decrypted_text);
  20.481 +    decrypted_text = nullptr;
  20.482 +    flags = 0;
  20.483 +    throwaway = NULL;
  20.484 +
  20.485 +    status = MIME_decrypt_message(session,
  20.486 +                                  modified_src,
  20.487 +                                  strlen(modified_src),
  20.488 +                                  &decrypted_text,
  20.489 +                                  &keys,
  20.490 +                                  &rating,
  20.491 +                                  &flags,
  20.492 +                                  &throwaway);
  20.493 +    
  20.494 +    cout << "keys used:\n";
  20.495 +    
  20.496 +    own_key_found = false;
  20.497 +    extra_key_0_found = false;
  20.498 +    extra_key_1_found = false;
  20.499 +    
  20.500 +    i = 0;
  20.501 +    
  20.502 +    for (stringlist_t* kl = keys; kl && kl->value; kl = kl->next, i++)
  20.503 +    {
  20.504 +        if (i == 0) {
  20.505 +              cout << "Signed by " << (strcasecmp("", kl->value) == 0 ? "NOBODY" : kl->value) << endl;
  20.506 +//              assert(strcasecmp(fpr_own_recip_key,kl->value) == 0);
  20.507 +        }
  20.508 +        else {
  20.509 +            if (strcasecmp(fpr_own_recip_key, kl->value) == 0) {
  20.510 +                cout << "Encrypted for us." << endl;
  20.511 +                own_key_found = true;
  20.512 +            }
  20.513 +            else if (strcasecmp(fpr_pub_extra_key_0, kl->value) == 0) {
  20.514 +                cout << "Encrypted for extra key 0." << endl;
  20.515 +                extra_key_0_found = true;
  20.516 +            }
  20.517 +            else if (strcasecmp(fpr_pub_extra_key_1, kl->value) == 0) {
  20.518 +                cout << "Encrypted for extra key 1." << endl;
  20.519 +                extra_key_1_found = true;
  20.520 +            }
  20.521 +            else {
  20.522 +                cout << "FAIL: Encrypted for " << kl->value << ", which it should not be." << endl;
  20.523 +//                assert(false);
  20.524 +            }
  20.525 +            cout << "\t " << kl->value << endl;
  20.526 +        }
  20.527 +        assert(i < 4);
  20.528 +    }
  20.529 +//    assert (own_key_found && extra_key_0_found && extra_key_1_found);
  20.530 +    cout << "Message was encrypted for all the keys it should be, and none it should not!" << endl;
  20.531 +
  20.532 +    cout << "Case 3b: PASS" << endl << endl;
  20.533 +    
  20.534 +    cout << "calling release()\n";
  20.535 +    release(session);
  20.536 +    return 0;
  20.537 +}
    21.1 --- a/test/src/engine_tests/AppleMailTests.cc	Thu May 03 12:39:56 2018 +0200
    21.2 +++ b/test/src/engine_tests/AppleMailTests.cc	Thu May 03 14:41:57 2018 +0200
    21.3 @@ -60,7 +60,7 @@
    21.4      message* final_ptr = nullptr;
    21.5      stringlist_t* keylist = nullptr;
    21.6      PEP_rating rating;
    21.7 -    PEP_decrypt_flags_t flags;
    21.8 +    PEP_decrypt_flags_t flags = 0;
    21.9      
   21.10      status = mime_decode_message(mailtext.c_str(), mailtext.length(), &msg_ptr);
   21.11      TEST_ASSERT(status == PEP_STATUS_OK);
   21.12 @@ -90,6 +90,7 @@
   21.13      final_ptr = nullptr;
   21.14      keylist = nullptr;
   21.15      rating = PEP_rating_unreliable;
   21.16 +    flags = 0;
   21.17      
   21.18      const char* mailfile2 = "test_mails/apple_mail_TC_html_signed_encrypted.eml";
   21.19      const string mailtext2 = slurp(mailfile2);
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/test/test_keys/priv/reencrypt_extra_keys_0-0x828AA789_priv.asc	Thu May 03 14:41:57 2018 +0200
    22.3 @@ -0,0 +1,63 @@
    22.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    22.5 +
    22.6 +lQOYBFrYrMEBCACkg7n/aftZEB+2ZWI6QYz9j4rc9olTpZtnX8KKb6vGh4IuFtlG
    22.7 +5tH/NkTmAs7zDUaKOmaGPkLIwZi7ErwQN1j81V3gvhp9oBZ10j+D08ovqAXln/cm
    22.8 +vikB1Y6LL38RA5BRB3/uiJeHqprgcdbLlvEG1v5gC6laFaL/46lklFfamk8P35xJ
    22.9 +2NaL8L5fwV41eCxLIlrkb6MpWtuJouuLXv4ZqNWfG0iKGnw5ufzM0pMz72gA2rqK
   22.10 +K0V7Ytql2q6Owj2ku1TkkxhsFPNXJKvUqgYERI2oS6jtMpb4kJStUUmHbREsbwrp
   22.11 +P6IwypUmu4K7Gr5FbQVnIoxR6i68WF19+jcRABEBAAEAB/oDMA28NBujkMdKh5mh
   22.12 +BxjiJ2RBjpHf4e06Ui3Q9KO7ka/dMIJmiC2wwCaS3eJQbZUMs9+9cWqmHPE2i8EC
   22.13 +3+2snX5HjutwvHe+8fNa3LFV3c+6cLBvat8cytxrmECiLeNfnJF3J+Smw3CjkXUf
   22.14 +5gV21Fbiucse5J0vT+Qd/61ZnhybDgVRvN3LBDoCpQ9YrVqSIQ0xXkDVPzYg/v+T
   22.15 +sbEcd9dyocJNVC0Ypxsnti6BygTKqg5X6bCO8T9n/+GUhqCy6x6bykKGmsTkbAjr
   22.16 +Hzs28VT/UoDvH19daoKXXqaDiGnP3rma/UeFJ8Ng3jj72Du4z10GJckmF1mUr1RE
   22.17 +IgpZBADBFAa4doEtY2XOokoB2SNqVFCM9boT6wNWs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nGOdxrVhpBxuiD1x3K3EjaqEbl0cZtMq5ac
   22.33 +VvOL/oupnQOYBFrYrMEBCADV2+KrrIAwT+aPCVVYLVf1ScRuVUChP8fT+hceNukb
   22.34 +NnmrAlEKD4AfG5XyFzdwnE/qKk6vNhZ0SofVsvLy/YZ/3JmNefri3n/MWVLulGcD
   22.35 +KiSfuDCUXStBqc8v0pmG91JCCldQcLpkiwqrJ0YLrYGEbJaj9gKetMqEtPkPycIr
   22.36 +uAY4IBiE93EgZSouU2pQtl4tTcfFmptBU+jaqAS9CpYesiWWT0Zno1X0vdcz8BaN
   22.37 +8yvb4pW//Z6rVkvkQjfrrHUkOYD0lSzu+Bh3mUWXR/cjSJysxzzaPD3Sh6d08z9H
   22.38 +FJdGB8oYFGP83ghmMdmX5QrcbjUNL0cX82zUkFA5/7b1ABEBAAEAB/kBecw5Y44Z
   22.39 +5z8/zvBuFJgGCw2GNmPlCPfjzFbDAF2A8NILnk85WsyHSm0xN7xL9GQvyT10Q5MJ
   22.40 +l+cSkDLRfvLh6H+NxKD41lC69AXYvCDu2mhYytBZAcCV6ipSGemxzvycFI6wMSr0
   22.41 +HSqEblezJm4doBM1C/JOLpC0NDyAwaNrokz7ROAox24WPd8/4rgIDt3raHcVeVX4
   22.42 +9epvnolpUIdFDoByS3VbxtAEkch87ZlQSig0NDfgFVlVrif/emqxyYxx2UwM7mkW
   22.43 +c+Ms26iW5vpcsJCY3CMzy+YtzGibOfhYmIGf6kYw75KFzWIp0RMsbUFSws7OB/CN
   22.44 +eGlGxuOpW0JpBADgfc76B3Wa6UNznHixbVDq0BC2klS76g81krdDoDTGk6taITO8
   22.45 +Y8xEiMVKF18Nh7j2ik6ZlVQ3ei6VgcXmHAWwH19gZzhxzPgg6LzLBnNJHHm+k+vL
   22.46 +ejSXKMQX3pFVRHvIK+56kXHqJOo83f6xzV1AD8C+6GfFufqo6+78lag6vQQA8+AK
   22.47 +Zv/u4QPI/Qoo4p6tfoed3iXf3uPbDCHjb0KDHlG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hw2CKWU63mwymVlmRAMI+xyoyRD
   22.63 +PMEAwgBzK7TIuJ8KPV/iNwVsLf6l/ToNEdU42bmPDRVH+5UjB7cQQ+kW93GAyMfm
   22.64 +IE68UOoBXUTQmHWjgKzonrY2
   22.65 +=OL2K
   22.66 +-----END PGP PRIVATE KEY BLOCK-----
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/test/test_keys/priv/reencrypt_extra_keys_1-0x8B026AEC_priv.asc	Thu May 03 14:41:57 2018 +0200
    23.3 @@ -0,0 +1,63 @@
    23.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    23.5 +
    23.6 +lQOXBFrYrMIBCACpJvjqCGqQU3lFKDa0dYAk7GjZ0mwzuDmdqWSm3hKalQYCfipx
    23.7 +hxZ0ObJ95N+4Q89Xx0EJcd3FSQJeA7378rzGAAbTQ6zb2XxqwUpIWHqPQri7N6Du
    23.8 +nYOv8wsGhmoZm4E7H2n/jlMSJ3kKEu0AyCIXPCGYwVsKYWGIWK/Sw/YOmQQBiwaR
    23.9 +h1hxy0zipwP+KeKUNBCd+PBnpyz9zc/tIu8xEW1+WYQR2HvXEubXwVKP/2pXXGrk
   23.10 +B4Yj0W2eNqInz2PJpszfBVy6A/qlaI/CWU+eYZ5cZRa1oM7iBHOVFp/s93o9/Kjx
   23.11 +Lbtj9gcmzWJJZxzrHv8eXGptSCSgeHE1YGjpABEBAAEAB/ipZb4hogwWPYJVH9Cp
   23.12 +KIMMdzUJ7xEtOnF40wtZkUxQQq2iEXev+fkirCV0rqDdiAs9fO5E5yORT2xveo/o
   23.13 +oU8rextat4uFIGjZAHnDudgDYG5gD3W7gUNAEcYY4sOeoXzqGKuuonnO1HkC/bEb
   23.14 +91Ess6txrzHdU2i5gxeRm23vbuxC+4d4MN1oYsh8UEVZ8YMXNYiVdX929NgVtnsR
   23.15 +jCLzNhBKJYxQlnbKjELrsTnDbrR0RtGaSUJMsfKuCQkJ/0MR0x1wCr9OhqYRfUi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
   23.31 +d0jB0b5zs2oFqoFfDdy5smjLuGRsRadkdTOMJcLgKL3wPg4DulUmMHllPOq5BOBh
   23.32 +mav80ThGpEDTDeDAGsCVJCYclS1hMrXnDA1PvW5F1GMjxmz/iJaA/VQ3zvGj9UkN
   23.33 +45hB7j+dA5gEWtiswgEIALGFLO66yMVmHrgDmPDko6Xj2/ahUj0SZXUc6jc1vCdD
   23.34 +Zk1YwAd7Pu8gxEaxcEhsUrw2NoN4lrjLx8AWShXJc/qp/3Mt44e1VaI70nX5qhEa
   23.35 +I55VLwBsrMAe2//eVaQRvFTxEu2WvMeHjdwmvm5EkvfpwI1KC4kdXQqRG8H47Hvf
   23.36 +BseORi5FySqtCj/6ja67C67LmMxDIXcWrFDvr5roW0IUQtkXhg4h1s5p5xmLmswQ
   23.37 +iLmlu0L9a+uAH5Pn3gWYP9LZUDzhU4R16wSNfeBL04tTp12iiobw/YmQokCOQNvQ
   23.38 +8ljkfMO4wgZah1gf6efov+n6eaJxkNKCdyCLt2etsYMAEQEAAQAH/i0/XTcSW/dY
   23.39 +sq7Dl/maxY2UmS3xa5VOeZbSwm5FH4rAdrRzUSr3ApEQAIdmVdDX73Syus1i8MP0
   23.40 +iRsQc1y/RvUW3Jo+kZa3JTcfWWMhunP2fiqu2raYfKXRl9DNmnWh4aei9OijOcX/
   23.41 +6qw5IePYTb+sEJzSyULvPZZiazlTWe+ueelDf+FzvH9eb0EAic2zqwuEXsBpvMRW
   23.42 +fto7hXpGCACCPBSiVcPXsuFS1UPhgMszJbNdHyiP1AjuKsyGzOkGEEvpRTGAy6/s
   23.43 +CABKF8eeVUzy5DnVGSIAiHR7BR2A6bjx/tHSGFXuU8POaB/pjmVYXNqdrO0GUpDv
   23.44 +lIb20uw0fhkEAMpll90BFsgyxphvnyoZYeiQmPqq57tVsLylNZPt61yVgjeCvEY/
   23.45 +8DmZkJbigyJQdy98y5nRHHP1hcbxFk8oywIf/ay2M4IJhxqE49dIe6wUxKVWa260
   23.46 +IE8DbDTwFBXlDqSe6Ob2NmdHTDm1yqmkF0Zw3AbZrGyl1kq0wUYorb3bBADgiPV7
   23.47 +QNoKpQXAily9l6PGW/mWpbK0NB8fhyfBvDa2h7HEH4JA4hYj5j4bHB4vDIfLimZ+
   23.48 +cW1I5aFnIXT6u1EIbbmTruxTsAIl/Ec5OK4cRXoIXpBi4JcJXyPX2tkej3DUqvUr
   23.49 +Trar98eOM7Z+ELpKxRXnZ/MCHjAfyOTLucdveQP/VJghtQPLoyrX5+bALaWPWQ0k
   23.50 +jJW1bE1qvDzrgK3Clp2g/bkxpVqpp9eVop/sMKNB1Qb9cOATMJGNaMHSmt5h1M+o
   23.51 +fOJkNSRs3CD+m/4dIqyGL/vHyZcu/L1ALaReYDuNxyv3EwsHOI2p8FMMPvqxA+45
   23.52 +NQll1hA/061Lw9pa9v1L7YkCPgQYAQgACQUCWtiswgIbLgEpCRA7GTqeiwJq7MBd
   23.53 +IAQZAQgABgUCWtiswgAKCRB3zxDSPDWVGVrOCACYomz87liANfum8xylT/9AqAmI
   23.54 +2Wv0xQPDcvLJj0EkGtFCbZMKRmP0aKck7tRO/Y1+YHtHYNRd21632rkgU3MA62G2
   23.55 +0HiMPn86ixQB0VSf4ID5/vyjhViytyQAsAaWBFnFh1UrLncqWT1qHH2WNOPVMj4/
   23.56 +k9n6Qhku0utYdLIiCp2WL9yCPwFw6HwSgI0xD59Z3smymZw1flRX+RHawXgjF/6C
   23.57 +fWwbyP93eBKbFLduqaz45P/GJ6lAkaT3ZYjJ/SHe+GztD+/EErbmpMN+ZAr982dT
   23.58 +roRSCqGm23lJdQPngdy+gwFrmFT/dkXZZS8iVRGL5ReOdmHIG3qrsoREJv3OaEQI
   23.59 +AIEZ/jykEiVIl8HFpuPbfQSFwokj917kxQF3cj+vD9o5CZOBFlPL+JxOb5BgKJxy
   23.60 +9FLEi5OUeU9bAcNU5aIImGxJNN8I7BFR5SfRMNOsjHu1VYJ95/XHEtxEZzzYWUpm
   23.61 +K2ES0A3dRuDpNDYdyXdUjhpyJZWsb9Qw3k+SWB0QwAZC6vjWGmWj2+GLtqwuWc8O
   23.62 +jIOjCcpdRwIQi6esdybOcCYdi9hkaupWyJ2FlvAJt6gdHOL0W0z7vG/Q51q4psvH
   23.63 +tSzp9SFvtfsoHCacgISoMhRcaq+XPOsGmlfS6u1T8c5fh/tL3tSRTKt+sJH7iGZv
   23.64 +FG/Lo53yda8R0TIbAErDZDg=
   23.65 +=D9A1
   23.66 +-----END PGP PRIVATE KEY BLOCK-----
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/test/test_keys/priv/reencrypt_other_recip_0-0x1F4A5986_priv.asc	Thu May 03 14:41:57 2018 +0200
    24.3 @@ -0,0 +1,63 @@
    24.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    24.5 +
    24.6 +lQOYBFrYrJUBCADBmdqKjcCO0GsErNUwg+l61MKliwWeitIRUt+KUxkKF4ZRoAxV
    24.7 +xLSnG8p7qQ/KSymGqzopLZEcWM3v3FIYYOehPcD8J38mPE9n5jtu1UVcqpV7BJh5
    24.8 +N63AcQYxvlqLA4EFST7LEsaYONtNf0Hi8b/JiSQSaJC7IUcIopDhCO2PnLg3KQxW
    24.9 +h4hAP/EDdKZeIbLJR0IDJGhdiGhZEA62HmrOkO+2epV1UMiQtDkCH+u1r+9UJWo7
   24.10 +VREkIHIzN2sfHwLsxy8npSYR5WoPWy4VwCRPeLKMM0CuywsA/FJXBGjJXp5zZtz3
   24.11 +1XpnXfsOKPX1tlfCl4JC5wp5w5Hh5yQr3nGxABEBAAEAB/oD7gQZ/BlFUQZc02NJ
   24.12 +CteO1E+ASPJp4j4NDWezNB0sJ0p7XBFh8W+icP3zQmxdN1Zx586Z9uX41NSL6aFK
   24.13 +n4UbxwHWtuUMacqt4K57l24sw6QCNZ0KcQebDWD21Mj0zRzGygS3FfknnaMjsK0t
   24.14 +2XG6UHhvhIbY8m1u45cWsklIs34l1jUijoQjEiqqxOlAfYmKsOvd7jZ3ALsjoe+P
   24.15 +4Hl4NEpnB9tAksH75b/GTTZgEeTCK1QFxRPqkKw/l8djnvZT++00D5HhEyY5gjsJ
   24.16 +xe/gmNoznYKG3/U5bkXyhZgDUQxDCVsDKdy54aImBdX3NN8gdp89VxUZG7yVutwc
   24.17 +U8mvBADLZdh+VwrpWZAP7cPPXQuaOSQtXDClZrmIPUAouYjpeFrAnqFPNjP/BDOB
   24.18 +ltOKDzVaZ7YYvLEZTxT+1j3HvL+4Ahq1FenpN97FIhM0srD4FGlmf7B4ODA1BAV1
   24.19 +oWPDF1M4qTbTzOrl93Ethflc0GEDv3we+5BrliyIKgtBzHnidwQA86tl9nvrquHx
   24.20 +bjOr24IFIlRQ7LhSzAnVpXDLJWpBYkxuSO1WJsADFvWfVOJVZGDElCq0wJwvldtV
   24.21 +A/S/Kjh1DFeTQqcvHGGC0LGA6jiY9MfJH9cARMS52ZLq6IVwO8MEi/TKY31WoISs
   24.22 +QAds6vRAIhwdLl1nIMZNznhBaALy7xcD/0MatnIVxFutHDvt1LxTpMDbgxZefpjd
   24.23 +wEf6lMtkSRyKHuFhQJ9BudnaVdCGAP3WmI5HM5knVAWCzwqINOMm8qdYiKup/uF9
   24.24 +DO9Wz9iST76nzA9W2uf29fvQCr8mPtnK++E83aBbUCKt//v5XtNNUo75ZwtLmibN
   24.25 +31YH7Sr//UEPQyW0RVJlZW5jcnlwdCBPdGhlciBSZWNpcGllbnRzIDAgPHJlZW5j
   24.26 +cnlwdF9vdGhlcl9yZWNpcF8wQGRhcnRobWFtYS5jb29sPokBOAQTAQgAIgUCWtis
   24.27 +lQIbLwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQxvvPjR9KWYZxyQf7BTmI
   24.28 +Hc0zyc0C/rtewQ03NeyLG1l6bx4Tgkt7HFXaVq6VFBj4rCkoZQXgTM6SwgNkCj06
   24.29 +2D2UqAh0Jo/7Fj8qZvewb0GyLX/vcimSp+ci+k5mHIyetn9tlZqVb2NE5e+IKCOR
   24.30 +FjIUlx8TjvyIa1QXr19qBdzegmIAFw7ikRNil/jxI01Wc3hTpOhjWUeKFZZuSHlv
   24.31 +vt+rXzVysaCCKzmG1MPoWQCLbxzjYsiJuDRxFiv1Su6FEok/dG9THujA460JJspK
   24.32 +P3b7u1NzwZDXefy3anR4qDbSgKmrNFRWkimAVzt/zZe48BpF9wnI70jIzJAcQgL/
   24.33 +iB/0JFUZ8rNMm9kPpp0DmARa2KyVAQgA2bvNB9wy6cYeA9BJHKMdCCfMFjZLDuiX
   24.34 +5D2Tkwylw3kwwLvCMYypxuAD8nLEoNwv3MWZfjDHaMEdJuwjYPuYIML7fjUvHxiA
   24.35 +RnpgrAhOAG0LuNI41OaiUP9r3u6nR4lHwlKG4e+1WbQP4GHZCPrbqBQyD+LESWr4
   24.36 +hxFvQU83VAgc+tAET30R06puoaJIoD4EcZeIQKkffHUnhjXxCiB8RcWUat0Onlf4
   24.37 +l74rQWdZzUzGfiB8+UQJdl5evzSjaB+l0OVzLF07dSlTq/+2lSh++xo66SEYOJH0
   24.38 +S4wfCNpVEd3MpugUTJVOqNVXwKO2YUJ3hbH3oO/nVxCfWiGF9A4UKwARAQABAAf8
   24.39 +CXrtVvHF/7rCFM1tWYNaoL/G2ZK8muYSsvvhYI4063lr34BtWKX0wHWBhn1rxUtB
   24.40 +BD5QTBfInu2FnOu8MJ1Txt1mgNzE8/gnoanzapoj903ILGBu3Ao8uAUfB8JhYzJ9
   24.41 +ft8EA3Nh9IlsBYuNHSB7DuruMRXhEQdI0ey26OOPl6d8NwinA/+c3SdbTfvCG+LQ
   24.42 +2Yt3HAekpwyEYW/5VnTSMKGhtJRPWS56agPb5vk9KxD/TUaL/p3zGF6Zq/Tjblqy
   24.43 +zET+m5BAgU2vS2sde7OKF4/4d5itUmxQx60PE5LPpy2qKLG7x7dLhmFVLT+jWW3C
   24.44 +3iuacQwZf84K68yCG83oaQQA5uozIUZDdhuvLJYhXnVidprtj193ny+vhHogwDbm
   24.45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   24.60 +vxEivlFuHyX+GMkKXM5STtmo9IfnoPZ/Op6o1DYOuOkhwGu3kgG9A2d+Vo5meSjt
   24.61 +0unCZPOsI+jg90VQS3nhdmNnjM0neUNzcdPCocTjsyD3KsssmPSIbstrgLES131s
   24.62 +L6tB9y8sBgAt2n/K/rUDlfKAT9/nfbFQLyj5SfhJ2cfFfSfSF6Ke4gkzjUOlVf4v
   24.63 +5nWRIRV5z0dT7iHBa9K9r9aOYAeGpDUp4Ll/LyEB5Q7cSy8fBeH3M/kTFK22C0qV
   24.64 +1RKYT63uf/CjJlB/HIBJBeNxBKBM+fPXmg==
   24.65 +=CVYv
   24.66 +-----END PGP PRIVATE KEY BLOCK-----
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/test/test_keys/priv/reencrypt_other_recip_1-0x0F8273D8_priv.asc	Thu May 03 14:41:57 2018 +0200
    25.3 @@ -0,0 +1,63 @@
    25.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    25.5 +
    25.6 +lQOYBFrYrJcBCADIyfgYlDk8jxMjY3qRgNlfU8R6z/T9jzjjKuP/LKDtrvx0WTE1
    25.7 +bzlegosr05CFiKa4To9oHU3hBPS51rPjhMmDC/Qcigo1LN2/XTZGnQ9c3uCkkM7x
    25.8 +0mCXGBmncJELWfDo6Fxd8v9iFh3i+n7loLcYVRZ08vcQndFEErRcDl/XgTPJ/UoR
    25.9 +NLujyXstg8pzx3rhqrywVhVO8B1XQWEsJYzqxCFZoX9gdoUtpkVUhhNYKu4GbfrQ
   25.10 +EEzpPUeK5fbvy9JnH7bsmfPK5qZejflr5PcrYMlUr8MBwuRkjXuOYa1jKXy0WvAS
   25.11 +oxqKg1ojipJdZy2MQNcHdC+CuprVi5ntB8clABEBAAEAB/0f4YBiOAgTLK0qFXhX
   25.12 +fwvEqOfNuj7uPbNCJUQYoazsYGLsVGHNrVsraEiRt7YURcYhsIjw9pTa3C8Wt4JO
   25.13 +PKjEWn2y7wYU5bVQ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AiywBs0rGxrSeU89NfbJjkZlgHeufRcLf5oHRGpFJrPr6cG5zelLNDT+ts
   25.29 +0zguEhv6fqLOR0+Ucnn8X39Y3d+tDB+5sD4oQ6jViX1QcWajH7hWnfD1ZVAzvgY9
   25.30 +29YDqzZ4NHV58XumvktbckNQqvWo69ndKZ5wqm73htU8pnzkgUZoqQ7pnpN41umh
   25.31 +u7AspLikNkiyx2eBC+sQPo2Al0Q/dfHKFBURXyFG+UNldX988XB3NJ6Io1H8bEf/
   25.32 +wPGcQtJn+4uGShDqLhIxpc/4YCc7GTeDmhAHGVKt+i2duprpj+tvOHh/Ew2m9WVl
   25.33 +s4ApMxqAXOA13+ujW50DmARa2KyXAQgA9lNUnV3tfUo7L/rV9+YTji4hMp6eP3iS
   25.34 +FqSMe/XTpKrDF0qjJ0HlZruJOY9Z+Gb7vFGHfh+3OnSZLmiEvDCbrrdUGY4mGiN8
   25.35 +tsghd658jx/jnl96AOIRxNxqbOfbCVOLojGFvpThR7NhNVg5Pp8OXYRCrMmXTi+3
   25.36 +v4WmUNIpfbWFdGgU7hzt9rWLesC1vyaGgrSPf2o36QbIFE7ps9biEzMvesktU1Qf
   25.37 +ekPq43rH3MBS9TInB8Xn2FKEp53x8m5tu3H21PALA8TFtwLNR7Xj65RFjTSbSK3C
   25.38 +G2ey4v/bgk3aHnsMbJlpQoIV/WwkvzuRfBQ/olUP8xSgFfRP7souBQARAQABAAf6
   25.39 +A58TAeNFIA/s0dZCugvIYtE7zLY3RmCb6ThPFm11SJj4GEoRHv0hhcKhEFcSsAu3
   25.40 +jLu4HbsSownezKdduDSQvV9VnbCQz9aQuVE06MEIdMQ3wPbPYN7x+u5wpBw+hKMV
   25.41 +TPOkbzpaG4dAGRwsb0bAW9CbeFXYYx5hea/Z05tbX805gCS5ylKIRLl9KZw1Dq7B
   25.42 +XxtwVEvDc0pZX1TyvWNwXpEmoPkUl9D33fDrTcIJrPIyHi5EsyoDt0S2R2VK88pJ
   25.43 +vScwKpyZHcx7n9ljCRtSiVy74keUKXqH/2xENM30EqK4O11RcUNC7OL/0XELJ9UK
   25.44 +Y0FzC2KQO2m1A2PgxdRNMQQA97t/ik8FLN7FlmJTglO5pi6F/rHu0RgRxP64mFSc
   25.45 +o2ZJNus6M7lKk1HO+mtIuQltzQCW/+ZApASiVc8temKs2kxVu2Hik8oIgxjQ8OZ9
   25.46 +NfJMHCytUHAUe8emcAl9mHYX+aEGw47dhUdQM824/B9BqU4G7u9zZu4WS07ld0kR
   25.47 +I+0EAP6Lz/tlv8i7AewJDPlC0sHPYiC/pB7uPLUNy/hGElJV5HjcKCHh5G8WlDoF
   25.48 +UsGk/gOp16GAt2GCiWDmopdsWr46H3fy6ndAwAAa792TveOYfvZ+B+fbvFpmSJmU
   25.49 +yJJVuyje0bqQOpQZgSPUViN6D+bFzw/pliu/y5o7VGp14J95BADla2YbmhWyIM+M
   25.50 +HM8cfNqbD9z3FHEgISKS1I2mFu5klni69QZvy3CYwNv6mgIkMzk4Z1Xer1nEJOW3
   25.51 +lvz4NnTu8rpOxd0fM5Io5rIcIm7O/vllcT1GEV/qEq/0QXcDPrLyGiH1h07TzNNB
   25.52 +S/FyarnEYtyewB6GUI/RC0LZSWzkV0KXiQI+BBgBCAAJBQJa2KyXAhsuASkJEE1r
   25.53 +mf4PgnPYwF0gBBkBCAAGBQJa2KyXAAoJED45CZNVTVeAmZcH/2igwlZkiJo+Vc07
   25.54 +Cyew9TSGn+SaJgp6GvWNX0zXgLLqHzhjekX3AuQBsrA3wZ3KS/+v3ZzLAukUw/oH
   25.55 +bzHBjycwnJiN5ZM83K5tFQgaOu2JFu7mMwV4Kw3G4/3AG3oOMAjSKASBeIzGd8ph
   25.56 ++TRc7KXGQtmTHr1Cb1eb6xo/8AqCbsn2+KCVlf0Fwf97GbcQsq3DscVvjicTCoOc
   25.57 +lapa69IpK29UJ8E4mQa/xMlQTh2cTSNndkysPSL9rSbX+WZt9KgfyMg8UaAW+TEf
   25.58 +RuU8MRVNBN3AHeldiywlzR3R+TZjWugVhiWF5491FyUe6I81Nthtz3cOanJUB4rT
   25.59 +O1LNeOiJ1Qf/TqG9MmywzZ0v4R6aXG5hneqGHm+AAsf0j2BGf7RIv+6v6owrgel7
   25.60 +CeYgDhTLTIWfMeBnev+NGNpNkvjYecj8OhEvxT9aP8fl3Spf3ticPkJ6DePwNqbr
   25.61 +HhVzIgjNBiOJrLJVRA5pY/nM53uav4vNlFiPwuJ8dbsF/Q+uG+FFsxJRuQvElrdE
   25.62 +79wp7jaG3qrIh16AJhI5qSqN8IhY6txJhSJwoikrXfu+e+QyAJ01zQpK7oRX7Iou
   25.63 +dkLnJ7xZMmp7tGD+PcHeGORPGTkiXr4nKzZHYcxLdTO6RvsPK6F60XdT4hhF60zS
   25.64 +xcbMqMAmOU0laqhnnhwpEMUPxbVCp4Rmew==
   25.65 +=cMkb
   25.66 +-----END PGP PRIVATE KEY BLOCK-----
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/test/test_keys/priv/reencrypt_other_recip_2-0x1EDBE691_priv.asc	Thu May 03 14:41:57 2018 +0200
    26.3 @@ -0,0 +1,63 @@
    26.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    26.5 +
    26.6 +lQOYBFrYrJcBCADEQMBmrDzgMf78qUBKHu9u8mjLAxlqgc4iZu4oM0vSx8KihLoP
    26.7 +U9RIiFOx3fPF2BK/jljxRfSzMstZxPHXtvAunYhAC2f2vsWGLrzL3F5i6hIILEC+
    26.8 +nywUWy0cEmIfAkDWnNmmOChCRYzR+cLPqNJIBvRpyScS3+0ADjIgv9gVI4z/CefR
    26.9 +7xPZSraBx5IggeFXbOfhiojuVeMOCkilnerA/T1ULfii14yBEMF7uHkIMThrW2f9
   26.10 +JnaJ5DTRbZnV2VugfHM0eL+FczfmT27+9oLbGZbljZzx9yWGRKjJOvPgHtKJ8RLy
   26.11 +Bst7tH22SSrTqo4iUYMcv8bN9P4xPF82U7Y5ABEBAAEAB/wIOco8CM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QgAIgUCWtis
   26.27 +lwIbLwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQtvyGgx7b5pHNDwf/QHNm
   26.28 +pDsN8qh4yTAIOeNV1Ywyq24E7cQda08MtqxYZIoqGMwcE/g/AiuNt4aXVazEBx0e
   26.29 +zrlud1UylC62Dg6iihFq4ehz+m46pJ92oTmrDavnngjvLF13sreFqYexXM5GZTm3
   26.30 +bNalxSf/h/fvsEDtB+HDfupDAo1vCekhKy255ByI4E2n1VBRFMbtWRQn0eBKO8ZO
   26.31 +M0GMySHDoHxXc9ZOwMm0xqb4k/Qltkr4boiN5RJGHX6leehgLy44hrSttlGTJMO+
   26.32 +IBXAUnQx3o6+IRkOf4cD/JYOD9WVq3y6fQlXQPw/t4/j6oJZSiJAemzbzyDnjbxq
   26.33 +Qzei7FARygLCgXQ5Y50DmARa2KyXAQgAwGkzZ+GNCIX1Y368i1B+eiX/RwnTXdRG
   26.34 +Z9JpCK0bmPI8/4YET6uoriDFD7WqW3+CixVFuExETwezuC2+VcKqIBria2jZpLdK
   26.35 +6vK77bF19mji8F+i5QB9kjsfKL3X8tlKiJImc3lY60qKDiMvrFwz2lzWfnnV8RWL
   26.36 +SfCjt1YyNX8cYtqRyCjq0ZH7hc31jiLw5kImeTsI+RccIEHlj+tZzAW8CGtHNMAW
   26.37 +lUpMHvqNxZmjNMtuvowB2x92deh7q8GXRleO/thoYFZaZsOunXRnT5zAiZU+8ZYg
   26.38 +3AqDa7kTKxxu20CovYJKcSOo32Gj9wkEPNcmjEY+rHEA58Wj3WWD8wARAQABAAf6
   26.39 +AqwAHIthWA1sKcm8jbpvbISKbUpxtJ6V8MTf1B2daCjGlc2FWnjN93HZczoQQEgW
   26.40 +JJaOkToispCme2BUkqJNDhYCjbMmCX7rbvFDCAOfUP65Vm6lBDysX5erg/dAhKJU
   26.41 +fcQT7Hr6+EF6ZOap6uEDkB7npXoaLQyqZ8P7GGvsd8Q3/NZxCc/85niJIPY5Cu78
   26.42 +o/p2Yzx/SHtdDS5mM3gmAJpwDWB+23BbHn/i0H+9JIsVyxhwcoMQPdiZHkpDfeBA
   26.43 +aDF6BTFQfPzS5/OVZWDNjI2AOSLV+t8tec7e5LlP82GkuRuO6EpxVBJBldCjPG0d
   26.44 +1H/hzYaPJaGdI0CEKbxXwQQAzEpNQwIM65bqgrhwspYhLMkYQKMBBrtNRyASpDNn
   26.45 +4B844/XH5oFNBhSCpnkRr+7YKSoLNwYCnXltKv+9Y/C1HltYRtSh4nQN37GCylxQ
   26.46 +fNNwvGkgklrggz17CMdz4klIkxarXLX/zRrO5bM1dxnAtKFEGroPUDL+J+QbofVI
   26.47 +6mEEAPEdI2fehMblj4/I88E6RbwnUVOb6vL7bSwkxs4Q7wE3znDx302qibrqo+it
   26.48 +H77V4qGneyDRcoHss+rlMT+18e6U6ksSJvkFLLK/4U1zswEwW4GJrqBebJr/eSv0
   26.49 +a3uWWPoRbgE6TrTjwNvU7RzUyCeL3XyByvLr7eCg22YvKBbTA/43OEZtRdbS+yk2
   26.50 +wBtH5CbhqvipWlTM1aYtW10rGQ2d3rcA8c9UFpdA/2uOSudaddT2WziKQSCL+X2E
   26.51 +ZpQc0+IBeVqQfnyHAJ0350SF9CVtbvdfxlGq4yLB6os4o410IXaaopxuOU9iWhmB
   26.52 ++NlY3lx9vIAXrpiKlUooHBo4aNXneENWiQI+BBgBCAAJBQJa2KyXAhsuASkJELb8
   26.53 +hoMe2+aRwF0gBBkBCAAGBQJa2KyXAAoJEIAK15IsUhzIhgkIAK5XdWy8R84h64Vo
   26.54 +4pze6DgGQFLTo7rC3dc5FObraK/AjUfwuyEavpRuxW/rTq7fEfO7at0p4N8cyPrH
   26.55 +yt3vPNwLjzYOyXJKmBJZfNUTimVyEYHmWyN7shkTwTRcqbApvhlnbeZKqNIBlOm0
   26.56 +/JD2fFs/ok4uLbYLx+USZLLtwGzYjNsbuD5Mi++Lkrt9cTz+BfE1UMcZp8bepXaZ
   26.57 +cMiyVCz1KeGajdhH6gtbbRi2mywcvFNhewM9AScni/UMlGwOdwDgT359dmeO8mkN
   26.58 +OK5JqOvOvpWA/o2tLP6k41sMjEBBtmKtad8GMq61TA2GPX8Wu4KyU73lUKSSGyBz
   26.59 +geWIsXlBIAf/T1uM4Ypd6NK8tZ1wlHzkxksrX+xxF/55+ehprMkNzpciqIVYS/Z2
   26.60 +nFl5MRfK4VnqOYji2ySO+iAhUu8KuI1gW9MQzP6SsqaF44mr0zQUMVM7PH2ZmKXB
   26.61 +v327Om4qySkVP02OlmfOHa0wWGCpJ3MW+TIapJNKe7czjm7zXv78pXzAwn2cvaak
   26.62 +jVY79pIhZxCykF33ZNrQySzZiIJSbT8JxzIucRLmWqfh6hlT+dD+3bCqIkz5S1tb
   26.63 +8ZrS098JQ0Fr7RNy9UE3tmYFyxpN206N/9evet0pcUN4L6P2MuI7+Gdh9BG0REND
   26.64 ++JH8fajoMZGgrMsLZx800KGJxnyTfaIplg==
   26.65 +=J22z
   26.66 +-----END PGP PRIVATE KEY BLOCK-----
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/test/test_keys/priv/reencrypt_recip_0-0xB1A2BE89_priv.asc	Thu May 03 14:41:57 2018 +0200
    27.3 @@ -0,0 +1,63 @@
    27.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    27.5 +
    27.6 +lQOYBFrYrFABCACxok/WUyT+821XovzVgaUg09w8apIJjDf1rIqlXiyftXYj7Fai
    27.7 +gOLMWJvadFq1hC/yHMjishPewWsAH9ubI0qExe1kTHFwpwQEz6qDro1zl73p9Qz+
    27.8 +cywj+NeKf4MHASNkV/cXpRqVoXgD1NYS/l2+cWM3NYq+kzIRLm0YmiwG8PQAIAr0
    27.9 +5rhZnLfESm4rZlHsqpZj7lDwNs0KP6aYmjL4eLA4ihF+jHxV5XWsr5mbz1L1y91m
   27.10 +PFExTtxxBqHwTjFZhQzt+OTq1/05scLIAtE0xLqkwNb8AMKAMJ/zDXRFY0sBby7Q
   27.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.26 +cnlwdF9yZWNpcEBkYXJ0aG1hbWEuY29vbD6JATgEEwEIACIFAlrYrFACGy8GCwkI
   27.27 +BwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEGOOUhGxor6Juc4IAINPukEB+VWwRvt1
   27.28 +rJfb/nJMB8hBU62vVtEu9O2AIO+ZyFA+eT8TNix5/4YW8bmPTaqvsXDXWU+BheiX
   27.29 +928GBdQS+FTkBdW0rgCAPbuqZeyoIBB2mMOMurWdMOrcrzMMjREzIVwSYvP6UmRJ
   27.30 +YzoK7tcvAIdc+fNJSYWHia7p0l/P32ObhK4HuRIFl2cHRHmRVRHGHx3MFT9v2+zD
   27.31 +jJM/eytFKHqgSPZe47XaKz6Q3TRwOptoUh5GaPev/boL8S56PEynFe8JBlv1a+24
   27.32 +oFqJ1cxNcsFU4/x7RVgK+a2ogAx9jBWtDe1xQFyO7d3uhklNhEQPe7Qp4+iLQyDs
   27.33 +X8k5LYidA5gEWtisUAEIAKfeMNGaeFqDj2jYtu0pLrXXPMGHqqiIInMK3//XWyFo
   27.34 +OfJyLhbMMx25fismXjundmsZA8TJAw/+6nDuF1mgVmFW8Z7FbU3ZudK4wq4nSK0R
   27.35 +LPrw33VUQBhPHMVIn5WX0qw9IdtDgBmrbdwzl+1vHSiU2EHA6YI/qNJO5iDEXHQ3
   27.36 +TnDaBs7KufF5PN5mRknoeh2YsxZRB+rNSd2C3Y/maNbkd/xjlDPxCXaNVtOufm/+
   27.37 +hj2GvazyHXG9bkDpL6YcW54R6wqubEik5RK+9VTUr6spbzotzE3FffpgzEeIl1+m
   27.38 +RFpdrCs5fUrqQrZoDGtNTxtoDhSxBu/CyMEL01lz2PcAEQEAAQAH/0BGaa/f8wRJ
   27.39 +SnBtRkFxmtKCet9pOFV2ZqZg/BrEVT7p3wIvaOlOv6W6gA46jytNOCDSv6gqBVOr
   27.40 +Gg4qg+NL6rczqKlP08XSv31pRBWVshSeNnhRIWaV30LPi+cYIw6OxtovQBbp9hMe
   27.41 +Gh8N3DbL7EC9GT64BFDcWiJIloHmXbYbVjty7UYd+fVzZNfjFau8oBh5hCMm5Sd+
   27.42 +xlGLEQSV82HlXrSFwrzSweB0+88Nmnwcy4MHhMvBLRxN/k6xjrP9RuIZNbOIAG6t
   27.43 +e1IniX2TNj//z6JIAYgHuama3pgNp3oC93dp+Gz3eutrLHCfjzQMGQN+epw2WgWI
   27.44 +F1DtWvl5OR0EAMcuBZ85HmMlMyiWHS1GHfjed7r4KsN1/l0IAyfJ+6aOQYVUMc8q
   27.45 ++xbbGiTcANpTcPdoUkKcg7kQ8hTQEzNW7EdaH1mGu/vkMBVBYQCmwbiyalCzVIJE
   27.46 +wIpBhbHunk7o58yrhuEOx91VTbxhIeJssljVWjIh8KaAZG4TZigTwpaLBADXwXvm
   27.47 +vr+VhQaLUygF0mVRz+WdHZfYterNtxFkS2X2Ol3ddB1FgYgCtBv4x9pZqp2rpQbH
   27.48 +OnaOEXF9icAK3zpVVDajHcIXxbIw8r5pqdP69qotuLGOD45dI7Ws6GbOdVJJkRYE
   27.49 +EETXA8P6ChYj//gj0u52QRoetKsmcIf/euIAxQQAnvVfbYJzicNXTDVmwtn5D4B9
   27.50 +0vxtBv+pJhOg9jDKRiHZpg3HocjiVz59W5LFAx8ZdCXd3xcZ1JxhYKkmuUBuUCVj
   27.51 +pGz4IaPiX7DACC/ZSKHvo96vvWMxr+GnQfe4oPybgNas5rFE4llj6LCKqxkU26Az
   27.52 +idMAWC2oS9jyYePoX6U7qokCPgQYAQgACQUCWtisUAIbLgEpCRBjjlIRsaK+icBd
   27.53 +IAQZAQgABgUCWtisUAAKCRCO2suQh3yjjC16B/9AuuLpXOSQ0XU+Y6E5Xn+qlLWP
   27.54 +tlrDIBEWQugEmZ2hbcmAXeK5OhuzvEDSzvF6XZSEpUmegERsa2Fu0IgAftIFOmSP
   27.55 +gLbmTKaPFa46KguYzqx4TrvU7uThhPftWGQ1G6tcB29V0nzBAhXOyrj70v9jUpD5
   27.56 +OgPtaXIxKkreRT2E0lb1Ni4EGEKoCsranR8h4HnUUzM4U4s8IQ0DvUqc1q6KQs0u
   27.57 +lcAsYyumOGZZ9Kq4CyTy//McZcewLnwkyQSpae2j54WTH6kl76ZwLqFVff5dqJBv
   27.58 +Fxp9JlYBivBwbMMo9zEXpEAsLYXQGNXsQIX41TA2UOQMRyRPwS9qKilXpy++l/0I
   27.59 +AIHKVmv79czH9GhZT1dgeqSoTmg2uTWDe9gauRR6cEMRJemvb/bRnwlpuoYI2Ywc
   27.60 +iW9vdTysDB02DL0c/1INyBIwa2XO+wMlpDwIEpjMzPRBxlXaKHJfjICkj1wAirvX
   27.61 +zU8s28wrIsezsj+FOjgSVpg5l6T7o8WOiYI7zXV/wCBvx5aLJE0b2V1HekHzw6TJ
   27.62 +8G2l+gZFSy46PyxxvcVEJcLymne40kz/NQjtbuefSm99ybV+eb+SiwZRp8j5YzLQ
   27.63 +knBO0ZF9nz+Gv+EcZuyiqb7g3DbF9Wl0h3v8/NFHQm1UNFFSu1R4K7+jrTnsiCCg
   27.64 +FIhM7ngMY07Zk7M1P1w13KQ=
   27.65 +=Vo4K
   27.66 +-----END PGP PRIVATE KEY BLOCK-----
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/test/test_keys/priv/reencrypt_recip_numero_deux_test_0-0xD6E75FFF_priv.asc	Thu May 03 14:41:57 2018 +0200
    28.3 @@ -0,0 +1,63 @@
    28.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    28.5 +
    28.6 +lQOYBFrYs0ABCADCAjAK4qBawfbyrPh3HBIyBtEYXHIurebUmGmLXRm8pwSWi5w+
    28.7 +cTwcetHrG0yT0SjfGHfDcHPrDTf6pWGhVPzXLSCJt2n5V9vBaGDc56S4tgQj/mVm
    28.8 +72NcbxKw+4APviOvh1kehcJQYNEKfyEXlPMh+E6dxf5EIiv3aIx7RjXPACcXcX2i
    28.9 +QEltTFRH92g46tVRYBjGBgJRt/cNcSYo7qJkd9FSLbP0vfUgDYZFeJ4rDg1S1pPF
   28.10 +3HyFLAVMWv2s9wOc8v8x9g81p3zQVvnhrqEnwh5d74w68z3WCA+CdvcENnfujYCy
   28.11 +687RjkSunLiA1I0WrYTuTnhp9rs15vSoNj6PABEBAAEAB/9fLF+RF3f+zeRtTDlf
   28.12 +hR/P9tQglUlWaO0yIcq1GWkEyRJRIA/3+ei5N+8+3NeGNDdOqlwmPkY/au6pQPRS
   28.13 +BrU6geLSbG3KajVd/ex2shR2oKQLXEM2af1eXQbYV6iNEIPFGiq39HpMoBIsig0b
   28.14 +2nAjnAJFF9oSZokXB+zSlLDU6K0qAvYKH3bJM++8HIvskErkmQYXfAUecmZihGbE
   28.15 +ViE8MVB/v1GLO7rm3oKS1PpiU4u5DuyiKXvipMwr7RzjpOjBeFiuxfs9kDmO31Eo
   28.16 +hW9PajcpKdfpqkoVqtncDUWOxNqUCDlOXDOJL1tOUZUglPssg4NOHWMDt8sTEEZQ
   28.17 +tvChBADRCltaGkDa1FcxJPw9/r07KmthQCtza1RvC0skZSs69ZEmQdQ3KVuSOpMb
   28.18 +mi0rNeLmR4Ft4cxn7EZNtgXauj1QG78JmxgljPT6o+xVSt7w6K/9xBTLMVQXa+rD
   28.19 +c98nWgNyV6D6I4AVPJlnU4CD1qa2slYl3JXNSe41Z3wSBIATtwQA7ZddhAvQ2+tx
   28.20 +8+LAfuS8peHPCDJXHxmsGLLlzTSGB/leGlNppDSPpSQeBbEURiIkbn8a0N9pY7KM
   28.21 +MbqZrDf4bY67EZvo7tadRWTE+KT21ZWlEOM7A6Qs84yeAnFec4EoCd3NIEhyCD33
   28.22 +Ewr3fHydoqeOhbUDrwzF6qOJJf7wG+kEAOcb98uFgMC3kiD3dauZKbPaFjuaC0uX
   28.23 +rcipA4pGKgXUn4GkEtg1h2VJvF4+SVh1FRp2nLFBs/59RkvDziNReUBhwT9neGye
   28.24 +yN1W0B/WTOQlq0UaSN696Wjzi7kYWbcB9MUty0jKe4vqtavZ+YwP4QcIV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HAb1STpDZzeh
   28.55 +TYCHtx136fVfX5Mt5nDgKxvJ+9Q4M6nJzBA50JeWhSfI1w2KUdxXQoPcQkaecKkK
   28.56 +BT4onQ+1oFfPobD7qEHAfGTfoYIKVNinQLCy4JxdaBDyb2Xz2zGhlPTeqH4j+LQ1
   28.57 +KEreGOja5d64rU7e7FC2jqmabcPWT3DYRheTeDD1P03IW09c3Z0Pwmg+Q9NqWKXb
   28.58 +3FGb5ZqA6LXLSC7q9sThcIQ1w2unN4wjJwH0mgftCqypvSyX4g6tuOoWZg1VQeiI
   28.59 +4nhuyB+7+J4vUxyGUd8H/RbQO4BeF/SFNnNC4nLAAG72OqdgE4JXqvlbRKFvxdVN
   28.60 +Ffp5scY5TSL0FN5+en5gcyrv+hdW4yoznuZNAUFtnD7RRhw2WY/BcyqeHtR88S6w
   28.61 +U775X+RGosJMF7z2S4FYsGbDV4Kixn3BP1nSDsVDzxHoxfbkZVp69S33lZMIWR1I
   28.62 +Kf4fb++eiF8KO39aYC70L53tSKLu+qAOzdDWWa8lihcXslvCj0foNzmO/PzRUTVs
   28.63 +B7EKZMvqqH2NuDnEg3YgGuyWvpIaoPl62Hh+xqGBif0SrqQD4wkWC55C/2BdAGQp
   28.64 +rX+KlvcjZgmJ50Y9pGZJX3SiI5JNEocOz2LqPQ+lszI=
   28.65 +=aqSi
   28.66 +-----END PGP PRIVATE KEY BLOCK-----
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/test/test_keys/priv/reencrypt_sender_0-0x3B508C8E_priv.asc	Thu May 03 14:41:57 2018 +0200
    29.3 @@ -0,0 +1,63 @@
    29.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    29.5 +
    29.6 +lQOYBFrYrG8BCACtrK69QOJHZSfsNWUUVzC2HgLT5xNZp+R3Ra9BFAruousyOtTQ
    29.7 +jX07TxJwrDkwgSAoYiEEDVfqjBlzlAsh3sa8zCmwE4bwtp6Xd/ZNdIeL1XAzctWH
    29.8 +0DxpvUojY0YQp4W97zu38FOJz6ehaclS1Cy484m/NqH3HNJqAVy6pABxXC662jeF
    29.9 +PLW8wgDl4IorWpy5KpFUsWRnmsntkxX9fQ2qEL7H/vfJag1eDiUfeTyC6CTgjRGw
   29.10 +yM2h6laQ6j0ieVArWLqAxlUpovNBBWReabP4UpAGpOTciYTDdnqQw16Q8U/JW4Ge
   29.11 +55cvhPIm/FpDwseqmQtYNsUTsbYnND7Q+gDPABEBAAEAB/0ceFcEyzgiKrZKsHjA
   29.12 +xtzuCH6/gf0tZf+71ak5v9wIQUjQ/nft4Dk2mcBqHAbGqW7oxSf9uWTqHCFSow2C
   29.13 +yzmaWtWSpFYrQPnqgU3Xu1HlCGN7lkg5cAIXS2J16UuOZgffRPJt4BsHAmAhGRhZ
   29.14 +rafPLI0uJ/nmanZ2eNax+eSLWyNggXRd7aSFqtTfQmUlPBVy0ZZojUxlx1ahc1Ze
   29.15 +4SC92LANxlOURGuQi+LSxZT85SsYPoo+XqJaO47pJEzbUKYrntq4/ePXaK2NOvvD
   29.16 ++TmtDg37O2XNesMPqZf3/d1J/cmy+5HwLWZ873A+ACODESmnfMKKsYM+9GM3P7eO
   29.17 +iyOxBADOlGQ0YXyrSh0v1i2QjG35+qv/lduqpnfiLF1iUsF0ATdv8X69EW1af45v
   29.18 +KT8eY6eqDdKe/H1AJYEg07PTCp10lnYihyRHJUJT73aFEkCnxiaEDmKnWyfznUEu
   29.19 +iORtBWBfWWyQywffG5GwmkvwhKRp/QfpMEg8khKEFujHkSIN3QQA1zkTQtcyN6S/
   29.20 +SROXvLUejG9PiK/s0RzZ+sh0WAhHzTe1L5x6EK/CHaV/bImrZ7nA7smqjPUvBTqA
   29.21 +ube8IBsw086W/B99f1z99uInanttxy5p3ZWTL4VW0LbVPoWUUC4yB1+3KNjYlhsl
   29.22 +85BFLfSS/5IfS4EAlLovIgcTHZFWTJsD/2D/qfj1q7R8iWcyNpSFVwbKus41ECN9
   29.23 +rz0G3z8VNtWwoHOBURDaGPCQw4HJfD4jrlK5uj3xE4/qNGooEfWyzratOtSOCJhd
   29.24 +jIG8ig77yLd5Qjegg3lHOXguSbx7EsaGJhcjaGseW7YlZrwsu68sUL667LXSp/01
   29.25 +N8WkojuHhF5GPe+0MlJlZW5jcnlwdCBTZW5kZXIgPHJlZW5jcnlwdF9zZW5kZXJA
   29.26 +ZGFydGhtYW1hLmNvb2w+iQE4BBMBCAAiBQJa2KxvAhsvBgsJCAcDAgYVCAIJCgsE
   29.27 +FgIDAQIeAQIXgAAKCRD5AUT8O1CMjiayB/0Q3wfZJqTAvCW1uSrsKswuufC4rGHE
   29.28 +pigufvaRXRFgYx6gZ2Su0+FmMIqXpDAUl/hsDDaNISeHKRIsCHp/IkiZUH5tTgPF
   29.29 +q0ntMXNfn5kyKWaBpiY7qP1SrgK8yIdwp0ssr34DvxvLuVW1E7FmTCcQCVFvAPqV
   29.30 +wZ5mx6HJa/SN/hWwPsui7Z8I05BzA54JEVMLv3BiaVObdYXZBoTcLi98GDEmOX1+
   29.31 +OinAPC3KUGQg0SraiSuVT1FYQpFkQbkGXYH/e1sgyk870TYGY285J3+4DKs1rw7y
   29.32 +i4gp7phbySaZDZVr8IdApj/v7Qx4yYQc8d/npjm9fMRgYhODl7s+/fTTnQOYBFrY
   29.33 +rG8BCADCC23sMGdN1L9CZbE/VKurULP/Hy5Lq9UP3Ca8RPKKDnwMaG7DmZu05cEF
   29.34 +uEbKp5gwOH5ELDLKElwj+h5eUlYS/GC6oP8wUY6bKtppYPira3sARCPfAIBmNC2q
   29.35 +20faBTePiBDurZ0uiRVfaC53waytisNc16vMZacaSlhp/FA+MAlUSZdS+e3GAe80
   29.36 +t/UvPH51bile086o5AUKa5PR/g+0/U8vZ8nlnnCRoQbHvEDmD47H30J/TSgbbyd2
   29.37 +0gf4YDm9G37qgteEqXKcTrqF3DFWUvO+tPCWdxZcx3RzQBs7lmQtRGGlhXcSpf6d
   29.38 +cFWqYvr6sVi/mPAXUjP9MJ795XVPABE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vQuHFEYOygXC+wI7hvRGmCUjLCHQ02LFXSSVwvR4
   29.54 +h7LV0/0dTaqMapwR1Cy8eOeJ1eYCFQpmtXq8LsC2E4D8xrU/2QlXWXZUprRF+U97
   29.55 +geEX1kyqmBMZ+rk1JKtdxW9iWNCF/8NcD0ppQrtU/RY9v9j6JoEe/IZ8A8/OrYdd
   29.56 +5iqJISC655Y8H5b78MWj1mU4jF1ceYUb3ahwKKukKCN7KogvPpwhMZDrtbvC8FCt
   29.57 +QGqXvWfav6Po13IGHRGGl68fFxz/K6PyOi5RL7kPwZV1/ShRi14uAp/WYb/EWpRV
   29.58 +LKDMEQcmROKJP2l8pwRcvlOB6IFQqG7hSDhN58Nxu+TiohqVB/4+1JMTIAhkzN00
   29.59 +M1GD2u2BiNrDg27iCr3o8tXgMHcR1XWI3cdT4M84d2nzZ7e/Uwm0QIR68wSaHasd
   29.60 +htcehEcazIBvHBHzYFx+NzkT+lTPSxTKT5w+WUCVNkBsQUQxrsgbnQTegm6cwp6I
   29.61 +mBylajvJ5Pak+18RWD18vVQrmcoP3nCvw5n1RxFJyT/3uUtrhhmbVCuB/lJ6gJLL
   29.62 +ClW2k0GUks2cuyrtZYL1ZlpbZCfPuo94I5lV//U5uzBj2/x/yPTWy2flYNyITI/e
   29.63 +FaREy+8eIRjGQO9oU0iTK98hEXr5259olUyg6+vfyQ+oU8PpBDDDXPCBXv5XcZrB
   29.64 +8RAOxnpY
   29.65 +=W0Ip
   29.66 +-----END PGP PRIVATE KEY BLOCK-----
    30.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.2 +++ b/test/test_keys/pub/reencrypt_extra_keys_0-0x828AA789_pub.asc	Thu May 03 14:41:57 2018 +0200
    30.3 @@ -0,0 +1,36 @@
    30.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    30.5 +
    30.6 +mQENBFrYrMEBCACkg7n/aftZEB+2ZWI6QYz9j4rc9olTpZtnX8KKb6vGh4IuFtlG
    30.7 +5tH/NkTmAs7zDUaKOmaGPkLIwZi7ErwQN1j81V3gvhp9oBZ10j+D08ovqAXln/cm
    30.8 +vikB1Y6LL38RA5BRB3/uiJeHqprgcdbLlvEG1v5gC6laFaL/46lklFfamk8P35xJ
    30.9 +2NaL8L5fwV41eCxLIlrkb6MpWtuJouuLXv4ZqNWfG0iKGnw5ufzM0pMz72gA2rqK
   30.10 +K0V7Ytql2q6Owj2ku1TkkxhsFPNXJKvUqgYERI2oS6jtMpb4kJStUUmHbREsbwrp
   30.11 +P6IwypUmu4K7Gr5FbQVnIoxR6i68WF19+jcRABEBAAG0PlJlZW5jcnlwdCBFeHRy
   30.12 +YSBLZXlzIDAgPHJlZW5jcnlwdF9leHRyYV9rZXlzXzBAZGFydGhtYW1hLmNvb2w+
   30.13 +iQE4BBMBCAAiBQJa2KzBAhsvBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRC3
   30.14 +nZFsgoqnibnLCACAkQvbI8idC6iLRATaJqnwcfUbPBbmnBWbIqI7PlQlP7jYaPdW
   30.15 +ZJkdTxTBt6dfyGtLKgS24vjmf9gURTJsrWNZaEWtZiJElrTEbNMSp1FMpcOKczz5
   30.16 +J+dlCFRUdRK/DMrEJkO7Eue4CaiVO+cQcfzRLu4i6OXrhaXKb2T7LT55tI0+GKK+
   30.17 +As/uh2XnmWrqS67IAdcFYDLKFCWCjI8sjmrnNzdPwX/EyjX/MV5n4uFu68A/5u05
   30.18 +NWQfg2z5lKRqVsFfJKxKoVJgrcNJwp7zbA19fJIewDUDpdfq2WnBSoUWOnGOdxrV
   30.19 +hpBxuiD1x3K3EjaqEbl0cZtMq5acVvOL/oupuQENBFrYrMEBCADV2+KrrIAwT+aP
   30.20 +CVVYLVf1ScRuVUChP8fT+hceNukbNnmrAlEKD4AfG5XyFzdwnE/qKk6vNhZ0SofV
   30.21 +svLy/YZ/3JmNefri3n/MWVLulGcDKiSfuDCUXStBqc8v0pmG91JCCldQcLpkiwqr
   30.22 +J0YLrYGEbJaj9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jgKzonrY2
   30.38 +=/94T
   30.39 +-----END PGP PUBLIC KEY BLOCK-----
    31.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.2 +++ b/test/test_keys/pub/reencrypt_extra_keys_1-0x8B026AEC_pub.asc	Thu May 03 14:41:57 2018 +0200
    31.3 @@ -0,0 +1,36 @@
    31.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    31.5 +
    31.6 +mQENBFrYrMIBCACpJvjqCGqQU3lFKDa0dYAk7GjZ0mwzuDmdqWSm3hKalQYCfipx
    31.7 +hxZ0ObJ95N+4Q89Xx0EJcd3FSQJeA7378rzGAAbTQ6zb2XxqwUpIWHqPQri7N6Du
    31.8 +nYOv8wsGhmoZm4E7H2n/jlMSJ3kKEu0AyCIXPCGYwVsKYWGIWK/Sw/YOmQQBiwaR
    31.9 +h1hxy0zipwP+KeKUNBCd+PBnpyz9zc/tIu8xEW1+WYQR2HvXEubXwVKP/2pXXGrk
   31.10 +B4Yj0W2eNqInz2PJpszfBVy6A/qlaI/CWU+eYZ5cZRa1oM7iBHOVFp/s93o9/Kjx
   31.11 +Lbtj9gcmzWJJZxzrHv8eXGptSCSgeHE1YGjpABEBAAG0PlJlZW5jcnlwdCBFeHRy
   31.12 +YSBLZXlzIDEgPHJlZW5jcnlwdF9leHRyYV9rZXlzXzFAZGFydGhtYW1hLmNvb2w+
   31.13 +iQE4BBMBCAAiBQJa2KzCAhsvBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRA7
   31.14 +GTqeiwJq7CG/CACJOkOx1D067OTmVExSlTMRativbgpKySicotcv+hxh5K4rVmsQ
   31.15 ++ZGSr06W03pYwVv53A+/+YjqFmfV8VHEDcGYDYUP6vjQCFYBzkjfQNZzEgZPsWZt
   31.16 +AK98877OdpWjTn1uIYY5ecb/YFQtuKxzy6EuPlrk63rLja1dcDyxNuyoHWwTIVIB
   31.17 +eWTmks3pDbwTtOMKjPwFjrMkalnSUHdIwdG+c7NqBaqBXw3cubJoy7hkbEWnZHUz
   31.18 +jCXC4Ci98D4OA7pVJjB5ZTzquQTgYZmr/NE4RqRA0w3gwBrAlSQmHJUtYTK15wwN
   31.19 +T71uRdRjI8Zs/4iWgP1UN87xo/VJDeOYQe4/uQENBFrYrMIBCACxhSzuusjFZh64
   31.20 +A5jw5KOl49v2oVI9EmV1HOo3NbwnQ2ZNWMAHez7vIMRGsXBIbFK8NjaDeJa4y8fA
   31.21 +FkoVyXP6qf9zLeOHtVWiO9J1+aoRGiOeVS8AbKzAHtv/3lWkEbxU8RLtlrzHh43c
   31.22 +Jr5uRJL36cCNSguJHV0KkRvB+Ox73wbHjkYuRckqrQo/+o2uuwuuy5jMQyF3FqxQ
   31.23 +76+a6FtCFELZF4YOIdbOaecZi5rMEIi5pbtC/WvrgB+T594FmD/S2VA84VOEdesE
   31.24 +jX3gS9OLU6ddooqG8P2JkKJAjkDb0PJY5HzDuMIGWodYH+nn6L/p+nmicZDSgncg
   31.25 +i7dnrbGDABEBAAGJAj4EGAEIAAkFAlrYrMICGy4BKQkQOxk6nosCauzAXSAEGQEI
   31.26 +AAYFAlrYrMIACgkQd88Q0jw1lRlazggAmKJs/O5YgDX7pvMcpU//QKgJiNlr9MUD
   31.27 +w3LyyY9BJBrRQm2TCkZj9GinJO7UTv2NfmB7R2DUXdtet9q5IFNzAOthttB4jD5/
   31.28 +OosUAdFUn+CA+f78o4VYsrckALAGlgRZxYdVKy53Klk9ahx9ljTj1TI+P5PZ+kIZ
   31.29 +LtLrWHSyIgqdli/cgj8BcOh8EoCNMQ+fWd7JspmcNX5UV/kR2sF4Ixf+gn1sG8j/
   31.30 +d3gSmxS3bqms+OT/xiepQJGk92WIyf0h3vhs7Q/vxBK25qTDfmQK/fNnU66EUgqh
   31.31 +ptt5SXUD54HcvoMBa5hU/3ZF2WUvIlURi+UXjnZhyBt6q7KERCb9zmhECACBGf48
   31.32 +pBIlSJfBxabj230EhcKJI/de5MUBd3I/rw/aOQmTgRZTy/icTm+QYCiccvRSxIuT
   31.33 +lHlPWwHDVOWiCJhsSTTfCOwRUeUn0TDTrIx7tVWCfef1xxLcRGc82FlKZithEtAN
   31.34 +3Ubg6TQ2Hcl3VI4aciWVrG/UMN5PklgdEMAGQur41hplo9vhi7asLlnPDoyDownK
   31.35 +XUcCEIunrHcmznAmHYvYZGrqVsidhZbwCbeoHRzi9FtM+7xv0OdauKbLx7Us6fUh
   31.36 +b7X7KBwmnICEqDIUXGqvlzzrBppX0urtU/HOX4f7S97UkUyrfrCR+4hmbxRvy6Od
   31.37 +8nWvEdEyGwBKw2Q4
   31.38 +=m/UF
   31.39 +-----END PGP PUBLIC KEY BLOCK-----
    32.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.2 +++ b/test/test_keys/pub/reencrypt_other_recip_0-0x1F4A5986_pub.asc	Thu May 03 14:41:57 2018 +0200
    32.3 @@ -0,0 +1,36 @@
    32.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    32.5 +
    32.6 +mQENBFrYrJUBCADBmdqKjcCO0GsErNUwg+l61MKliwWeitIRUt+KUxkKF4ZRoAxV
    32.7 +xLSnG8p7qQ/KSymGqzopLZEcWM3v3FIYYOehPcD8J38mPE9n5jtu1UVcqpV7BJh5
    32.8 +N63AcQYxvlqLA4EFST7LEsaYONtNf0Hi8b/JiSQSaJC7IUcIopDhCO2PnLg3KQxW
    32.9 +h4hAP/EDdKZeIbLJR0IDJGhdiGhZEA62HmrOkO+2epV1UMiQtDkCH+u1r+9UJWo7
   32.10 +VREkIHIzN2sfHwLsxy8npSYR5WoPWy4VwCRPeLKMM0CuywsA/FJXBGjJXp5zZtz3
   32.11 +1XpnXfsOKPX1tlfCl4JC5wp5w5Hh5yQr3nGxABEBAAG0RVJlZW5jcnlwdCBPdGhl
   32.12 +ciBSZWNpcGllbnRzIDAgPHJlZW5jcnlwdF9vdGhlcl9yZWNpcF8wQGRhcnRobWFt
   32.13 +YS5jb29sPokBOAQTAQgAIgUCWtislQIbLwYLCQ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v5aqbXtujbPpxhczbIn1jVZP4W
   32.29 +rXJTVVO5M1PEcsoHNHJ3IOPdfKUDy2mmbCKbkt136CjAkCJ9hB/z0nt50mRIyxhc
   32.30 +eSdD+rLgZLhMkXcfwad+4W2fjp+mUeGIkRUvNn05e0P8FWnShbF3dMIPMbYFFoZ+
   32.31 +23th7AmkPYzDep8Qa5zjCgtRSDlsjElIiLUjmx9M2roLGH01giB1DMUnOTTtRaS9
   32.32 +9Qf8C6x5MzEFuL/vNzUf9W9AhEzlAMj2JjCSf9kHwAGLrP5UoTpaLUAQvxEivlFu
   32.33 +HyX+GMkKXM5STtmo9IfnoPZ/Op6o1DYOuOkhwGu3kgG9A2d+Vo5meSjt0unCZPOs
   32.34 +I+jg90VQS3nhdmNnjM0neUNzcdPCocTjsyD3KsssmPSIbstrgLES131sL6tB9y8s
   32.35 +BgAt2n/K/rUDlfKAT9/nfbFQLyj5SfhJ2cfFfSfSF6Ke4gkzjUOlVf4v5nWRIRV5
   32.36 +z0dT7iHBa9K9r9aOYAeGpDUp4Ll/LyEB5Q7cSy8fBeH3M/kTFK22C0qV1RKYT63u
   32.37 +f/CjJlB/HIBJBeNxBKBM+fPXmg==
   32.38 +=+YIE
   32.39 +-----END PGP PUBLIC KEY BLOCK-----
    33.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.2 +++ b/test/test_keys/pub/reencrypt_other_recip_1-0x0F8273D8_pub.asc	Thu May 03 14:41:57 2018 +0200
    33.3 @@ -0,0 +1,36 @@
    33.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    33.5 +
    33.6 +mQENBFrYrJcBCADIyfgYlDk8jxMjY3qRgNlfU8R6z/T9jzjjKuP/LKDtrvx0WTE1
    33.7 +bzlegosr05CFiKa4To9oHU3hBPS51rPjhMmDC/Qcigo1LN2/XTZGnQ9c3uCkkM7x
    33.8 +0mCXGBmncJELWfDo6Fxd8v9iFh3i+n7loLcYVRZ08vcQndFEErRcDl/XgTPJ/UoR
    33.9 +NLujyXstg8pzx3rhqrywVhVO8B1XQWEsJYzqxCFZoX9gdoUtpkVUhhNYKu4GbfrQ
   33.10 +EEzpPUeK5fbvy9JnH7bsmfPK5qZejflr5PcrYMlUr8MBwuRkjXuOYa1jKXy0WvAS
   33.11 +oxqKg1ojipJdZy2MQNcHdC+CuprVi5ntB8clABEBAAG0RVJlZW5jcnlwdCBPdGhl
   33.12 +ciBSZWNpcGllbnRzIDEgPHJlZW5jcnlwdF9vdGhlcl9yZWNpcF8xQGRhcnRobWFt
   33.13 +YS5jb29sPokBOAQTAQgAIgUCWtislwIbLwYLCQgHAwIGFQgCCQoLBBYCAwECHgEC
   33.14 +F4AACgkQTWuZ/g+Cc9hWPAf/e/UE3+DnvwAiywBs0rGxrSeU89NfbJjkZlgHeufR
   33.15 +cLf5oHRGpFJrPr6cG5zelLNDT+ts0zguEhv6fqLOR0+Ucnn8X39Y3d+tDB+5sD4o
   33.16 +Q6jViX1QcWajH7hWnfD1ZVAzvgY929YDqzZ4NHV58XumvktbckNQqvWo69ndKZ5w
   33.17 +qm73htU8pnzkgUZoqQ7pnpN41umhu7AspLikNkiyx2eBC+sQPo2Al0Q/dfHKFBUR
   33.18 +XyFG+UNldX988XB3NJ6Io1H8bEf/wPGcQtJn+4uGShDqLhIxpc/4YCc7GTeDmhAH
   33.19 +GVKt+i2duprpj+tvOHh/Ew2m9WVls4ApMxqAXOA13+ujW7kBDQRa2KyXAQgA9lNU
   33.20 +nV3tfUo7L/rV9+YTji4hMp6eP3iSFqSMe/XTpKrDF0qjJ0HlZruJOY9Z+Gb7vFGH
   33.21 +fh+3OnSZLmiEvDCbrrdUGY4mGiN8tsghd658jx/jnl96AOIRxNxqbOfbCVOLojGF
   33.22 +vpThR7NhNVg5Pp8OXYRCrMmXTi+3v4WmUNIpfbWFdGgU7hzt9rWLesC1vyaGgrSP
   33.23 +f2o36QbIFE7ps9biEzMvesktU1QfekPq43rH3MBS9TInB8Xn2FKEp53x8m5tu3H2
   33.24 +1PALA8TFtwLNR7Xj65RFjTSbSK3CG2ey4v/bgk3aHnsMbJlpQoIV/WwkvzuRfBQ/
   33.25 +olUP8xSgFfRP7souBQARAQABiQI+BBgBCAAJBQJa2KyXAhsuASkJEE1rmf4PgnPY
   33.26 +wF0gBBkBCAAGBQJa2KyXAAoJED45CZNVTVeAmZcH/2igwlZkiJo+Vc07Cyew9TSG
   33.27 +n+SaJgp6GvWNX0zXgLLqHzhjekX3AuQBsrA3wZ3KS/+v3ZzLAukUw/oHbzHBjycw
   33.28 +nJiN5ZM83K5tFQgaOu2JFu7mMwV4Kw3G4/3AG3oOMAjSKASBeIzGd8ph+TRc7KXG
   33.29 +QtmTHr1Cb1eb6xo/8AqCbsn2+KCVlf0Fwf97GbcQsq3DscVvjicTCoOclapa69Ip
   33.30 +K29UJ8E4mQa/xMlQTh2cTSNndkysPSL9rSbX+WZt9KgfyMg8UaAW+TEfRuU8MRVN
   33.31 +BN3AHeldiywlzR3R+TZjWugVhiWF5491FyUe6I81Nthtz3cOanJUB4rTO1LNeOiJ
   33.32 +1Qf/TqG9MmywzZ0v4R6aXG5hneqGHm+AAsf0j2BGf7RIv+6v6owrgel7CeYgDhTL
   33.33 +TIWfMeBnev+NGNpNkvjYecj8OhEvxT9aP8fl3Spf3ticPkJ6DePwNqbrHhVzIgjN
   33.34 +BiOJrLJVRA5pY/nM53uav4vNlFiPwuJ8dbsF/Q+uG+FFsxJRuQvElrdE79wp7jaG
   33.35 +3qrIh16AJhI5qSqN8IhY6txJhSJwoikrXfu+e+QyAJ01zQpK7oRX7IoudkLnJ7xZ
   33.36 +Mmp7tGD+PcHeGORPGTkiXr4nKzZHYcxLdTO6RvsPK6F60XdT4hhF60zSxcbMqMAm
   33.37 +OU0laqhnnhwpEMUPxbVCp4Rmew==
   33.38 +=aVuW
   33.39 +-----END PGP PUBLIC KEY BLOCK-----
    34.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    34.2 +++ b/test/test_keys/pub/reencrypt_other_recip_2-0x1EDBE691_pub.asc	Thu May 03 14:41:57 2018 +0200
    34.3 @@ -0,0 +1,36 @@
    34.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    34.5 +
    34.6 +mQENBFrYrJcBCADEQMBmrDzgMf78qUBKHu9u8mjLAxlqgc4iZu4oM0vSx8KihLoP
    34.7 +U9RIiFOx3fPF2BK/jljxRfSzMstZxPHXtvAunYhAC2f2vsWGLrzL3F5i6hIILEC+
    34.8 +nywUWy0cEmIfAkDWnNmmOChCRYzR+cLPqNJIBvRpyScS3+0ADjIgv9gVI4z/CefR
    34.9 +7xPZSraBx5IggeFXbOfhiojuVeMOCkilnerA/T1ULfii14yBEMF7uHkIMThrW2f9
   34.10 +JnaJ5DTRbZnV2VugfHM0eL+FczfmT27+9oLbGZbljZzx9yWGRKjJOvPgHtKJ8RLy
   34.11 +Bst7tH22SSrTqo4iUYMcv8bN9P4xPF82U7Y5ABEBAAG0RVJlZW5jcnlwdCBPdGhl
   34.12 +ciBSZWNpcGllbnRzIDIgPHJlZW5jcnlwdF9vdGhlcl9yZWNpcF8yQGRhcnRobWFt
   34.13 +YS5jb29sPokBOAQTAQgAIgUCWtislwIbLwYLCQgHAwIGFQgCCQoLBBYCAwECHgEC
   34.14 +F4AACgkQtvyGgx7b5pHNDwf/QHNmpDsN8qh4yTAIOeNV1Ywyq24E7cQda08MtqxY
   34.15 +ZIoqGMwcE/g/AiuNt4aXVazEBx0ezrlud1UylC62Dg6iihFq4ehz+m46pJ92oTmr
   34.16 +DavnngjvLF13sreFqYexXM5GZTm3bNalxSf/h/fvsEDtB+HDfupDAo1vCekhKy25
   34.17 +5ByI4E2n1VBRFMbtWRQn0eBKO8ZOM0GMySHDoHxXc9ZOwMm0xqb4k/Qltkr4boiN
   34.18 +5RJGHX6leehgLy44hrSttlGTJMO+IBXAUnQx3o6+IRkOf4cD/JYOD9WVq3y6fQlX
   34.19 +QPw/t4/j6oJZSiJAemzbzyDnjbxqQzei7FARygLCgXQ5Y7kBDQRa2KyXAQgAwGkz
   34.20 +Z+GNCIX1Y368i1B+eiX/RwnTXdRGZ9JpCK0bmPI8/4YET6uoriDFD7WqW3+CixVF
   34.21 +uExETwezuC2+VcKqIBria2jZpLdK6vK77bF19mji8F+i5QB9kjsfKL3X8tlKiJIm
   34.22 +c3lY60qKDiMvrFwz2lzWfnnV8RWLSfCjt1YyNX8cYtqRyCjq0ZH7hc31jiLw5kIm
   34.23 +eTsI+RccIEHlj+tZzAW8CGtHNMAWlUpMHvqNxZmjNMtuvowB2x92deh7q8GXRleO
   34.24 +/thoYFZaZsOunXRnT5zAiZU+8ZYg3AqDa7kTKxxu20CovYJKcSOo32Gj9wkEPNcm
   34.25 +jEY+rHEA58Wj3WWD8wARAQABiQI+BBgBCAAJBQJa2KyXAhsuASkJELb8hoMe2+aR
   34.26 +wF0gBBkBCAAGBQJa2KyXAAoJEIAK15IsUhzIhgkIAK5XdWy8R84h64Vo4pze6DgG
   34.27 +QFLTo7rC3dc5FObraK/AjUfwuyEavpRuxW/rTq7fEfO7at0p4N8cyPrHyt3vPNwL
   34.28 +jzYOyXJKmBJZfNUTimVyEYHmWyN7shkTwTRcqbApvhlnbeZKqNIBlOm0/JD2fFs/
   34.29 +ok4uLbYLx+USZLLtwGzYjNsbuD5Mi++Lkrt9cTz+BfE1UMcZp8bepXaZcMiyVCz1
   34.30 +KeGajdhH6gtbbRi2mywcvFNhewM9AScni/UMlGwOdwDgT359dmeO8mkNOK5JqOvO
   34.31 +vpWA/o2tLP6k41sMjEBBtmKtad8GMq61TA2GPX8Wu4KyU73lUKSSGyBzgeWIsXlB
   34.32 +IAf/T1uM4Ypd6NK8tZ1wlHzkxksrX+xxF/55+ehprMkNzpciqIVYS/Z2nFl5MRfK
   34.33 +4VnqOYji2ySO+iAhUu8KuI1gW9MQzP6SsqaF44mr0zQUMVM7PH2ZmKXBv327Om4q
   34.34 +ySkVP02OlmfOHa0wWGCpJ3MW+TIapJNKe7czjm7zXv78pXzAwn2cvaakjVY79pIh
   34.35 +ZxCykF33ZNrQySzZiIJSbT8JxzIucRLmWqfh6hlT+dD+3bCqIkz5S1tb8ZrS098J
   34.36 +Q0Fr7RNy9UE3tmYFyxpN206N/9evet0pcUN4L6P2MuI7+Gdh9BG0REND+JH8fajo
   34.37 +MZGgrMsLZx800KGJxnyTfaIplg==
   34.38 +=s9qu
   34.39 +-----END PGP PUBLIC KEY BLOCK-----
    35.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    35.2 +++ b/test/test_keys/pub/reencrypt_recip_0-0xB1A2BE89_pub.asc	Thu May 03 14:41:57 2018 +0200
    35.3 @@ -0,0 +1,36 @@
    35.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    35.5 +
    35.6 +mQENBFrYrFABCACxok/WUyT+821XovzVgaUg09w8apIJjDf1rIqlXiyftXYj7Fai
    35.7 +gOLMWJvadFq1hC/yHMjishPewWsAH9ubI0qExe1kTHFwpwQEz6qDro1zl73p9Qz+
    35.8 +cywj+NeKf4MHASNkV/cXpRqVoXgD1NYS/l2+cWM3NYq+kzIRLm0YmiwG8PQAIAr0
    35.9 +5rhZnLfESm4rZlHsqpZj7lDwNs0KP6aYmjL4eLA4ihF+jHxV5XWsr5mbz1L1y91m
   35.10 +PFExTtxxBqHwTjFZhQzt+OTq1/05scLIAtE0xLqkwNb8AMKAMJ/zDXRFY0sBby7Q
   35.11 +neeE7YyxVP/QABWkkCGl2tg6QX75OnnQ6pdzABEBAAG0PVJlZW5jcnlwdCBUZXN0
   35.12 +IE93biBSZWNpcGllbnQgPHJlZW5jcnlwdF9yZWNpcEBkYXJ0aG1hbWEuY29vbD6J
   35.13 +ATgEEwEIACIFAlrYrFACGy8GCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEGOO
   35.14 +UhGxor6Juc4IAINPukEB+VWwRvt1rJfb/nJMB8hBU62vVtEu9O2AIO+ZyFA+eT8T
   35.15 +Nix5/4YW8bmPTaqvsXDXWU+BheiX928GBdQS+FTkBdW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wLqFVff5dqJBvFxp9JlYB
   35.31 +ivBwbMMo9zEXpEAsLYXQGNXsQIX41TA2UOQMRyRPwS9qKilXpy++l/0IAIHKVmv7
   35.32 +9czH9GhZT1dgeqSoTmg2uTWDe9gauRR6cEMRJemvb/bRnwlpuoYI2YwciW9vdTys
   35.33 +DB02DL0c/1INyBIwa2XO+wMlpDwIEpjMzPRBxlXaKHJfjICkj1wAirvXzU8s28wr
   35.34 +Isezsj+FOjgSVpg5l6T7o8WOiYI7zXV/wCBvx5aLJE0b2V1HekHzw6TJ8G2l+gZF
   35.35 +Sy46PyxxvcVEJcLymne40kz/NQjtbuefSm99ybV+eb+SiwZRp8j5YzLQknBO0ZF9
   35.36 +nz+Gv+EcZuyiqb7g3DbF9Wl0h3v8/NFHQm1UNFFSu1R4K7+jrTnsiCCgFIhM7ngM
   35.37 +Y07Zk7M1P1w13KQ=
   35.38 +=9eYN
   35.39 +-----END PGP PUBLIC KEY BLOCK-----
    36.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    36.2 +++ b/test/test_keys/pub/reencrypt_recip_numero_deux_test_0-0xD6E75FFF_pub.asc	Thu May 03 14:41:57 2018 +0200
    36.3 @@ -0,0 +1,36 @@
    36.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    36.5 +
    36.6 +mQENBFrYs0ABCADCAjAK4qBawfbyrPh3HBIyBtEYXHIurebUmGmLXRm8pwSWi5w+
    36.7 +cTwcetHrG0yT0SjfGHfDcHPrDTf6pWGhVPzXLSCJt2n5V9vBaGDc56S4tgQj/mVm
    36.8 +72NcbxKw+4APviOvh1kehcJQYNEKfyEXlPMh+E6dxf5EIiv3aIx7RjXPACcXcX2i
    36.9 +QEltTFRH92g46tVRYBjGBgJRt/cNcSYo7qJkd9FSLbP0vfUgDYZFeJ4rDg1S1pPF
   36.10 +3HyFLAVMWv2s9wOc8v8x9g81p3zQVvnhrqEnwh5d74w68z3WCA+CdvcENnfujYCy
   36.11 +687RjkSunLiA1I0WrYT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AQZAQgABgUCWtizQAAKCRBZ1bQOl3HDByyfCACzxQyVJg6QvcrT
   36.27 +7B/e/+ppnmcGSJEgAzW8mQluSKK8Yj36d0WNSFTmT/ikHAb1STpDZzehTYCHtx13
   36.28 +6fVfX5Mt5nDgKxvJ+9Q4M6nJzBA50JeWhSfI1w2KUdxXQoPcQkaecKkKBT4onQ+1
   36.29 +oFfPobD7qEHAfGTfoYIKVNinQLCy4JxdaBDyb2Xz2zGhlPTeqH4j+LQ1KEreGOja
   36.30 +5d64rU7e7FC2jqmabcPWT3DYRheTeDD1P03IW09c3Z0Pwmg+Q9NqWKXb3FGb5ZqA
   36.31 +6LXLSC7q9sThcIQ1w2unN4wjJwH0mgftCqypvSyX4g6tuOoWZg1VQeiI4nhuyB+7
   36.32 ++J4vUxyGUd8H/RbQO4BeF/SFNnNC4nLAAG72OqdgE4JXqvlbRKFvxdVNFfp5scY5
   36.33 +TSL0FN5+en5gcyrv+hdW4yoznuZNAUFtnD7RRhw2WY/BcyqeHtR88S6wU775X+RG
   36.34 +osJMF7z2S4FYsGbDV4Kixn3BP1nSDsVDzxHoxfbkZVp69S33lZMIWR1IKf4fb++e
   36.35 +iF8KO39aYC70L53tSKLu+qAOzdDWWa8lihcXslvCj0foNzmO/PzRUTVsB7EKZMvq
   36.36 +qH2NuDnEg3YgGuyWvpIaoPl62Hh+xqGBif0SrqQD4wkWC55C/2BdAGQprX+Klvcj
   36.37 +ZgmJ50Y9pGZJX3SiI5JNEocOz2LqPQ+lszI=
   36.38 +=b41d
   36.39 +-----END PGP PUBLIC KEY BLOCK-----
    37.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    37.2 +++ b/test/test_keys/pub/reencrypt_sender_0-0x3B508C8E_pub.asc	Thu May 03 14:41:57 2018 +0200
    37.3 @@ -0,0 +1,35 @@
    37.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    37.5 +
    37.6 +mQENBFrYrG8BCACtrK69QOJHZSfsNWUUVzC2HgLT5xNZp+R3Ra9BFAruousyOtTQ
    37.7 +jX07TxJwrDkwgSAoYiEEDVfqjBlzlAsh3sa8zCmwE4bwtp6Xd/ZNdIeL1XAzctWH
    37.8 +0DxpvUojY0YQp4W97zu38FOJz6ehaclS1Cy484m/NqH3HNJqAVy6pABxXC662jeF
    37.9 +PLW8wgDl4IorWpy5KpFUsWRnmsntkxX9fQ2qEL7H/vfJag1eDiUfeTyC6CTgjRGw
   37.10 +yM2h6laQ6j0ieVArWLqAxlUpovNBBWReabP4UpAGpOTciYTDdnqQw16Q8U/JW4Ge
   37.11 +55cvhPIm/FpDwseqmQtYNsUTsbYnND7Q+gDPABEBAAG0MlJlZW5jcnlwdCBTZW5k
   37.12 +ZXIgPHJlZW5jcnlwdF9zZW5kZXJAZGFydGhtYW1hLmNvb2w+iQE4BBMBCAAiBQJa
   37.13 +2KxvAhsvBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRD5AUT8O1CMjiayB/0Q
   37.14 +3wfZJqTAvCW1uSrsKswuufC4rGHEpigufvaRXRFgYx6gZ2Su0+FmMIqXpDAUl/hs
   37.15 +DDaNISeHKRIsCHp/IkiZUH5tTgPFq0ntMXNfn5kyKWaBpiY7qP1SrgK8yIdwp0ss
   37.16 +r34DvxvLuVW1E7FmTCcQCVFvAPqVwZ5mx6HJa/SN/hWwPsui7Z8I05BzA54JEVML
   37.17 +v3BiaVObdYXZBoTcLi98GDEmOX1+OinAPC3KUGQg0SraiSuVT1FYQpFkQbkGXYH/
   37.18 +e1sgyk870TYGY285J3+4DKs1rw7yi4gp7phbySaZDZVr8IdApj/v7Qx4yYQc8d/n
   37.19 +pjm9fMRgYhODl7s+/fTTuQENBFrYrG8BCADCC23sMGdN1L9CZbE/VKurULP/Hy5L
   37.20 +q9UP3Ca8RPKKDnwMaG7DmZu05cEFuEbKp5gwOH5ELDLKElwj+h5eUlYS/GC6oP8w
   37.21 +UY6bKtppYPira3sARCPfAIBmNC2q20faBTePiBDurZ0uiRVfaC53wa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Xv5XcZrB8RAOxnpY
   37.37 +=YpRn
   37.38 +-----END PGP PUBLIC KEY BLOCK-----
    38.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    38.2 +++ b/test/test_mails/reencrypt_BCC_sent_by_enigmail.eml	Thu May 03 14:41:57 2018 +0200
    38.3 @@ -0,0 +1,167 @@
    38.4 +Return-Path: <SRS0=n42jJC=HI=pep-project.org=krista@srs.smtpin.rzone.de>
    38.5 +X-Original-To: krista@gnunet.org
    38.6 +Delivered-To: krista@gnunet.org
    38.7 +Received: from vmmailrelay1.informatik.tu-muenchen.de (mailrelay1.informatik.tu-muenchen.de [131.159.254.14])
    38.8 +	by sam.net.in.tum.de (Postfix) with ESMTP id 1C4A21C00BE
    38.9 +	for <krista@gnunet.org>; Thu, 19 Apr 2018 17:29:59 +0200 (CEST)
   38.10 +Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid 109)
   38.11 +	id ECD371C038A; Thu, 19 Apr 2018 17:29:59 +0200 (CEST)
   38.12 +Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost [127.0.0.1])
   38.13 +	by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id CA24C1C0378
   38.14 +	for <krista@gnunet.org>; Thu, 19 Apr 2018 17:29:59 +0200 (CEST)
   38.15 +Received: from vmmaildmz2.informatik.tu-muenchen.de (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88])
   38.16 +	by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id BF3131C0376
   38.17 +	for <krista@gnunet.org>; Thu, 19 Apr 2018 17:29:59 +0200 (CEST)
   38.18 +Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid 109)
   38.19 +	id BD9201C24B8; Thu, 19 Apr 2018 17:29:59 +0200 (CEST)
   38.20 +X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
   38.21 +	vmmaildmz2.informatik.tu-muenchen.de
   38.22 +X-Spam-Level: 
   38.23 +X-Spam-Status: No, score=-2.7 required=7.0 tests=BAYES_00,DKIM_ADSP_NXDOMAIN,
   38.24 +	ENCRYPTED_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,TVD_RCVD_SPACE_BRACKET,
   38.25 +	UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.0-tuminfo_1
   38.26 +Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
   38.27 +	by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id 2B63D1C24B7
   38.28 +	for <krista@gnunet.org>; Thu, 19 Apr 2018 17:29:58 +0200 (CEST)
   38.29 +Received: from mi4-p00-ob.smtp.rzone.de (mi4-p00-ob.smtp.rzone.de [81.169.146.147])
   38.30 +	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
   38.31 +	(No client certificate requested)
   38.32 +	by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTPS id 1B7941C24B4
   38.33 +	for <krista@gnunet.org>; Thu, 19 Apr 2018 17:29:58 +0200 (CEST)
   38.34 +X-RZG-FWD-BY: reencrypt_recip_numero_deux_test@darthmama.org
   38.35 +Received: from mailin.rzone.de ([unix socket])
   38.36 +	by mailin.rzone.de (RZmta 43.4) with LMTPA;
   38.37 +	Thu, 19 Apr 2018 17:29:37 +0200 (CEST)
   38.38 +Authentication-Results: strato.com; dmarc=none header.from=darthmama.cool
   38.39 +Authentication-Results: strato.com; arc=none
   38.40 +Authentication-Results: strato.com; dkim=none
   38.41 +Authentication-Results: strato.com; dkim-adsp=nxdomain header.from="reencrypt_sender@darthmama.cool"
   38.42 +Authentication-Results: strato.com; spf=none smtp.mailfrom="krista@pep-project.org"
   38.43 +X-RZG-Expurgate: clean/normal
   38.44 +X-RZG-Expurgate-ID: 149500::1524151777-0000AD36-5EF1859A/0/0
   38.45 +X-Strato-MessageType: email
   38.46 +X-RZG-CLASS-ID: mi00
   38.47 +Received-SPF: none
   38.48 +	client-ip=131.159.0.8;
   38.49 +	helo="mail-out1.informatik.tu-muenchen.de";
   38.50 +	envelope-from="krista@pep-project.org";
   38.51 +	receiver=smtpin.rzone.de;
   38.52 +	identity=mailfrom;
   38.53 +Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8])
   38.54 +	by smtpin.rzone.de (RZmta 43.4 OK)
   38.55 +	with ESMTPS id W0237cu3JFTP4pk
   38.56 +	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA))
   38.57 +	(Client did not present a certificate);
   38.58 +	Thu, 19 Apr 2018 17:29:25 +0200 (CEST)
   38.59 +Received: from [192.168.178.22] (ip5b439605.dynamic.kabel-deutschland.de [91.67.150.5])
   38.60 +	by services.sec.in.tum.de (Postfix) with ESMTPSA id 5FCBC102926CA;
   38.61 +	Thu, 19 Apr 2018 17:29:17 +0200 (CEST)
   38.62 +To: krista@darthmama.org
   38.63 +From: reencrypt_sender@darthmama.cool
   38.64 +Subject: BCC reencrypt fun!
   38.65 +Openpgp: preference=signencrypt
   38.66 +Organization: =?UTF-8?B?cOKJoXA=?=
   38.67 +Message-ID: <c61e1869-d5ad-ec69-6c5b-6459ed833472@pep-project.org>
   38.68 +Date: Thu, 19 Apr 2018 17:29:16 +0200
   38.69 +User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
   38.70 + Thunderbird/52.7.0
   38.71 +MIME-Version: 1.0
   38.72 +Content-Type: multipart/encrypted;
   38.73 + protocol="application/pgp-encrypted";
   38.74 + boundary="y7EXR2L3LEbunNG5z2iB9TLRp6qXDskjG"
   38.75 +
   38.76 +This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156)
   38.77 +--y7EXR2L3LEbunNG5z2iB9TLRp6qXDskjG
   38.78 +Content-Type: application/pgp-encrypted
   38.79 +Content-Description: PGP/MIME version identification
   38.80 +
   38.81 +Version: 1
   38.82 +
   38.83 +--y7EXR2L3LEbunNG5z2iB9TLRp6qXDskjG
   38.84 +Content-Type: application/octet-stream; name="encrypted.asc"
   38.85 +Content-Description: OpenPGP encrypted message
   38.86 +Content-Disposition: inline; filename="encrypted.asc"
   38.87 +
   38.88 +-----BEGIN PGP MESSAGE-----
   38.89 +
   38.90 +hQIMA+WNs84HPA1TAQ/9EbDB6wxg3dD0y3vKnnET8vizVQ1anKmCQrYStAnD51im
   38.91 +xH9bmvrJZNPY6TjmeDSvonL3aIhOtX5A/cpOztA4VWTfRRT6iJttJ89sAAk29Uhl
   38.92 +fB7tmey9XQOGhFP/Q6uWodvNvU6lro2rUEEs7rQSaGvafHQUyxdITYfSy3ESN6vr
   38.93 +DFdebnRjgnbxBiEpbVJ0d0IMFeR1umjhL27aJpjbdI0wxqzJpvj7/q3tVOf/99+M
   38.94 +Wk/TH0fsHari2VQm0LD5P1hFP6Iga1kzAzPZj4LRqZ09UvEd4X3Vyh5jUtPnaLbi
   38.95 +jlDehDEzLBgEw6qrt1ZnCZWG5IVl2C/1v4sUhIjOq8AR5W02jP9TL1+23PoP84bj
   38.96 +ZsOYuZrUnb1INPuDuqwyQqsv9sPkBoS9K1huniLvD1eQwqMc2lfTFrh3/KtMf4Yp
   38.97 +ajwT4oUyS0B3Kp8uF7jZQkcInQdAa+LzCmiHNXCgMJPA7Np0lsqdYM2FF8OE21qk
   38.98 +zoR5CGmZu6D2Qm5xVfTumdlEGpIduT5tVibsCJviJ9T3SUtR2/KthKcr6P8p4MW1
   38.99 +ARk3JpNiYBNohXKDKdQv0Ti+QYBhvStMlEXx6gn1QPdDRqX1rK2r7OSP+n5qP5WQ
  38.100 +MYePW0plYHy7Uss5bxg5QWPFV/skNGhc2I566Y7PwD/Y4Yqe9PBGH0OIBc3WmYiF
  38.101 +AQwDAAAAAAAAAAABB/9yhD9GfosVx02xhamHvZW0PQKqZIFUBPTVI/izIdX4zEDS
  38.102 +I7jr1Nqc1OIWoMaAFxSSP5zQiSaFBkqFHQ6qLqh91lNSKwTRrrg7EWrOBz6ldmb4
  38.103 +GlpN5u83w5P/tKbcGUVahsv+XKGpiJ1etntVjsu+RvwS2X0pP9poiuCy/mbKS48S
  38.104 +Rx53QHeUm3V/RgPAEfbSevJ3jnPsl6h5Cr5QffxoTTEnOXZHNsLIkM9uhxF1S1ep
  38.105 +4KX2xW9Em8wNBemI9/vT+AX2yKP+L4WxbLc+poUDHCZQDNwysju54q3z3mUuEWYZ
  38.106 +QceYMolx2tnultYGlEt6q8hPQR/Pk2C3ZDV0xckuhQEMA3ZA2ejz7ZzMAQgAkooO
  38.107 +lr62aW2X87r1dnKel2Jk8gYzMm3VLlOCS8zvb5iwpVXfFHN0AVcBTZL7mvFR1Io7
  38.108 +wSPnvRzBIAmqIHO9STwqYuiR/aXyfM6H57BhcKJVLGacJHIUR8I0Li4LTHHe63ty
  38.109 +/dD56YugmFTutwv84CTisPqXQUnOGky2CkgoymvHX/HiLzZ4PiTaSB5o2Qexm8TP
  38.110 +sWnH9V8cqFuHj2wYpfYwkfEAzxCa88rWHwUEdEJNj7Q81SSFFflYGPhXH4B3Aj7w
  38.111 +vAEyXKdd0dmHiMa27CMVZUC0JH895/Og+/0VwGxkqym90LGES/9O+8W4PlvRz6Co
  38.112 +FnFg7DmcOybCfgoH/NLrAd08SE1BHux5VS1maciW7wUVfIFrYgtU3A2MWIN8d+Dx
  38.113 +ZVe0dAPkP9zbm8MGLz5yTIemErFOOj7asodI3u8ruVQguNCX40U9zuc4Ai0+/yZp
  38.114 +TgNmVURPgzM6AMLHE01+U8d97UtpU9xN+uP4iZhctc1D/PZNnjiuOZ5nyVVM853i
  38.115 +d204UF6pcaTvweI/z7dZfa/wdYIwtxoB4cMfsnta5WNkY7JtjP2BmKtqF8sObcYb
  38.116 +OGtQCIGYN5q3yS7bubpkC69vNutYaEn+tsfC3g4u+ZXR2M8VpnDzwWBFb5p6VmDt
  38.117 +ULBW2ijQnBAfZQl8DvK5weX6AB3f/nIq9gAJp62SccNNx6V88zSrotjmzWkl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Qh72Jv4uSIDZa7UQEoKmxmgui4dPz
  38.148 +mGxLlwS4+Pb74qdlGy5k7Al2fszvs2vt9hqr0MubiCCNtrBwfj7F2mm6RhySzl68
  38.149 +q0fjKlRk8nyhEhDy3MTNRbwuqLlB6pa2MNjmjWKv+HAYOc7Zn5aGsL3RutEETFR1
  38.150 +lpsR3+Szt5L3Aj06Syu9NGdJQUYduJifP7EF0so1xwCCP6HxcBURgMg+7a1rhxwf
  38.151 +l8nm7rZwwzEgQUUswyPYXH4gFHJD860hp7yxJyv9PZQhnJ64bAmkiE3juZpnsGho
  38.152 +qqAhr3PaIe4k0YN1Ccwa/xJqsG+zBgx5iyP+Q5SsI3O0l2bs75ub9M8nz60KsUxF
  38.153 +snnUEdgUGwCPKerjGXsE3mZfoo+jVnJ7fW5lgUUii9Mrbqp0HmOLU6jtmU4yORQZ
  38.154 +WNjGiQmY1mucsBSmamU6dZTl214QG93ed/LKEQ8tnOsgUGWwKQy/0ROgN5O4cBHp
  38.155 ++GdoKwuGqNDkec62YYET4eUhtAnq13zaFORUsH23N+fL3edHN4o+8VPi/hAQSwRC
  38.156 +0MZxH3RPVTSBzVzRIFEHEqi3pUSC4GhAAM11LVUdPMRdfuKAuaqt1b+HfCkePUyk
  38.157 +XgHPVt4TxbLyQUxmfodfUa4JN5LZRluVcRPtWGsyoVDbXnjwn1iyQ9l3ENL8Epbk
  38.158 +fySynRbjpzkawAAHgEdy3Bl7ID8XzmCsYQl1FRH+8/4SvR+gh41bdAPOWcu2jOvt
  38.159 +JApf7AGmRZpljZQkUeNU1fwFORj9K90TXv8yNXk5fSsXxaV9WnBhxk5BfZKSrpJ8
  38.160 +rxY31xe90YvLUeh9TFbfuOvNTdsP77C/kPRRfAHXYP3thfJqbipxhAjlN/8dN17w
  38.161 +8Jrb+9XnVKWSPQkVCHyk79oLr6llnvaPAEn95TeAokSGpCARdDBs+lTHti0N261d
  38.162 +lHzrAsZmijcNWc/8g8DKiXA2aWTGA3TIZMTqJXF3gvFUcB7agN2ORzpGRI7dJIe0
  38.163 +MdSf+NU0jJcBc8XD5ZfjbRUDWkKxkj+IUvEoZ+kQmlIShpMAQvqgN+6TY+EGh1pv
  38.164 +uG0aaYgnac4Gl8CXd/3Tjiz11FEGlmxHf0FHmCef+wbcVdoNchmAsKCfEjKD6tAJ
  38.165 +Ti61PF0Ggh/kFfdxFyIZBE84eWvaqxrKt8CwHfRMml0bKLOepel+Iqjt1tuYPSfT
  38.166 +HVV46N5qkSuy6EPX
  38.167 +=uH9+
  38.168 +-----END PGP MESSAGE-----
  38.169 +
  38.170 +--y7EXR2L3LEbunNG5z2iB9TLRp6qXDskjG--
    39.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    39.2 +++ b/test/test_mails/reencrypt_encrypted_through_pEp.eml	Thu May 03 14:41:57 2018 +0200
    39.3 @@ -0,0 +1,193 @@
    39.4 +Message-ID: <32df1e74-e7ec-be9e-d7d0-b54c42f179e8@darthmama.org>
    39.5 +Date: Thu, 19 Apr 2018 18:13:49 +0200
    39.6 +From: Reencrypt Sender <reencrypt_sender@darthmama.cool>
    39.7 +To: "reencrypt_other_recip_0@darthmama.cool"
    39.8 + <reencrypt_other_recip_0@darthmama.cool>, 
    39.9 + "reencrypt_recip@darthmama.cool" <reencrypt_recip@darthmama.cool>, 
   39.10 + "reencrypt_other_recip_1@darthmama.cool"
   39.11 + <reencrypt_other_recip_1@darthmama.cool>, 
   39.12 + "reencrypt_other_recip_2@darthmama.cool"
   39.13 + <reencrypt_other_recip_2@darthmama.cool>
   39.14 +Subject: =?utf-8?Q?p=E2=89=A1p?=
   39.15 +Cc: Reencrypt Sender <krista@darthmama.org>
   39.16 +Reply-To:  <krista@darthmama.org>
   39.17 +Return-Path: <SRS0=Iqydak=HI=darthmama.org=krista@srs.smtpin.rzone.de>
   39.18 +X-Original-To: krista@gnunet.org
   39.19 +Delivered-To: krista@gnunet.org
   39.20 +Received: from vmmailrelay1.informatik.tu-muenchen.de
   39.21 + (mailrelay1.informatik.tu-muenchen.de [131.159.254.14]) by
   39.22 + sam.net.in.tum.de (Postfix) with ESMTP id 386C01C00BE for
   39.23 + <krista@gnunet.org>; Thu, 19 Apr 2018 18:14:08 +0200 (CEST)
   39.24 +Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from
   39.25 + userid 109) id 14A381C038A; Thu, 19 Apr 2018 18:14:09 +0200 (CEST)
   39.26 +Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost
   39.27 + [127.0.0.1]) by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with
   39.28 + ESMTP id E67A61C0378 for <krista@gnunet.org>; Thu, 19 Apr 2018 18:14:08
   39.29 + +0200 (CEST)
   39.30 +Received: from vmmaildmz2.informatik.tu-muenchen.de
   39.31 + (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88]) by
   39.32 + vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id
   39.33 + DBA271C0376 for <krista@gnunet.org>; Thu, 19 Apr 2018 18:14:08 +0200
   39.34 + (CEST)
   39.35 +Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid
   39.36 + 109) id D9D791C24B8; Thu, 19 Apr 2018 18:14:08 +0200 (CEST)
   39.37 +X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
   39.38 + vmmaildmz2.informatik.tu-muenchen.de
   39.39 +X-Spam-Level: 
   39.40 +X-Spam-Status: No, score=-0.6 required=7.0 tests=AWL,BAYES_00,
   39.41 + DKIM_ADSP_NXDOMAIN,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SUSPICIOUS_RECIPS,
   39.42 + TVD_RCVD_SPACE_BRACKET,UNPARSEABLE_RELAY autolearn=no
   39.43 + autolearn_force=no version=3.4.0-tuminfo_1
   39.44 +Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost
   39.45 + [127.0.0.1]) by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with
   39.46 + ESMTP id 3EE881C24B7 for <krista@gnunet.org>; Thu, 19 Apr 2018 18:14:07
   39.47 + +0200 (CEST)
   39.48 +Received: from mi4-p00-ob.smtp.rzone.de (mi4-p00-ob.smtp.rzone.de
   39.49 + [81.169.146.144]) (using TLSv1.2 with cipher
   39.50 + ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate
   39.51 + requested) by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with
   39.52 + ESMTPS id 2F70A1C03AC for <krista@gnunet.org>; Thu, 19 Apr 2018
   39.53 + 18:14:07 +0200 (CEST)
   39.54 +X-RZG-FWD-BY: krista@darthmama.org
   39.55 +Received: from mailin.rzone.de ([unix socket]) by mailin.rzone.de (RZmta
   39.56 + 43.2) with LMTPA; Thu, 19 Apr 2018 18:13:56 +0200 (CEST)
   39.57 +Authentication-Results: strato.com; dmarc=none
   39.58 + header.from=darthmama.cool
   39.59 +Authentication-Results: strato.com; arc=none
   39.60 +Authentication-Results: strato.com; dkim=none
   39.61 +Authentication-Results: strato.com; dkim-adsp=nxdomain
   39.62 + header.from="reencrypt_sender@darthmama.cool"
   39.63 +Authentication-Results: strato.com; spf=none
   39.64 + smtp.mailfrom="krista@darthmama.org"
   39.65 +X-RZG-Expurgate: clean/normal
   39.66 +X-RZG-Expurgate-ID: 149500::1524154436-00001063-4E0F052C/0/0
   39.67 +X-Strato-MessageType: email
   39.68 +X-RZG-CLASS-ID: mi00
   39.69 +Received-SPF: none client-ip=131.159.0.36;
   39.70 + helo="mail-out2.informatik.tu-muenchen.de";
   39.71 + envelope-from="krista@darthmama.org"; receiver=smtpin.rzone.de;
   39.72 + identity=mailfrom;
   39.73 +Received: from mail-out2.informatik.tu-muenchen.de ([131.159.0.36]) by
   39.74 + smtpin.rzone.de (RZmta 43.2 OK) with ESMTPS id m0496bu3JGDuDS2 (using
   39.75 + TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with
   39.76 + 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a
   39.77 + certificate) for <krista@darthmama.org>; Thu, 19 Apr 2018 18:13:56
   39.78 + +0200 (CEST)
   39.79 +Received: from [192.168.178.22] (ip5b439605.dynamic.kabel-deutschland.de
   39.80 + [91.67.150.5]) by services.sec.in.tum.de (Postfix) with ESMTPSA id
   39.81 + 5A2D8102926CA; Thu, 19 Apr 2018 18:13:50 +0200 (CEST)
   39.82 +Openpgp: preference=signencrypt
   39.83 +User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
   39.84 + Thunderbird/52.7.0
   39.85 +X-pEp-Version: 2.0
   39.86 +MIME-Version: 1.0
   39.87 +Content-Type: multipart/encrypted; boundary="51be29f17cd84a367a2f9514845aabb"; 
   39.88 + protocol="application/pgp-encrypted"
   39.89 +
   39.90 +--51be29f17cd84a367a2f9514845aabb
   39.91 +Content-Type: application/pgp-encrypted
   39.92 +
   39.93 +Version: 1
   39.94 +--51be29f17cd84a367a2f9514845aabb
   39.95 +Content-Type: application/octet-stream
   39.96 +Content-Transfer-Encoding: 7bit
   39.97 +Content-Disposition: inline; filename="msg.asc"
   39.98 +
   39.99 +-----BEGIN PGP MESSAGE-----
  39.100 +
  39.101 +hQEMA3ZA2ejz7ZzMAQf8D/j/r1SYCRZ9361nsTUNs3l3Y2HBMDJnsJyTBtJIYeke
  39.102 +axNMBouW/aBRu1hhl199BpbK6cGiBwVc1YO9tNblQMbJd0RLfyM3SSxeZw6mO0rX
  39.103 +nNgMbzrKBZ3lwSEw4yUotxkCdlrak7/dt22E0cDeyFCH42KO+5hcHfNwfUXKYEyd
  39.104 +gw92mxXeH+PCLMY6td3x2vX/ger0dHeL5rz1iE83PZdnUaAbnsALOczSnnXO7Cti
  39.105 +O/1FVN2oJWwgZwUcjk3IrjMjOqNl/sr63VTmXUSbNICB6E0rvVn/DzMBXNLqIFMH
  39.106 +bVBEgN/OgQdgeJvhb2ilJHCzyNWoN6OXHkPuW8grboUBDAMOI9GgtzRIcgEH/i/T
  39.107 +Wzzv/CP9qlW6Ku8JJEChI64rinIbjmgBsY243DjkY5N+BQpJkL2rn4oXiqmoADlz
  39.108 +B6nu3AdQMn30o253YiZBo/0CToPlWxtw9nDVDvzk06AeqEEgqnghDEIGbCvu2l24
  39.109 +QXOFWQ9SwxHIQjB7ozZXy7ZpW7uoMQYdN+Bgq7SsuwyGg+eAznAXTbFFQV6zsOE0
  39.110 ++qugsiyIXHajxWTK4lJj7PCWI8adxADlWAmTvRfSGZPLNN3tc6YlWbW9Ka9jaG+G
  39.111 +wq7N9fP66KFVtFCQ2HgmxQWQsz0QuunGVLwOckKFbOGemsjHljVzTmvi+KhBW5PE
  39.112 +N0TZEvr1NfxAIpDpcduFAQwDjtrLkId8o4wBCACcJ5h/mIQBLlk1gp7Vpj2B+Vsk
  39.113 +QXpxcqYbANM7bksNlx35jb56D4abWCJM84472L68aJmYcy0TE3smKmPU/XBl6/qG
  39.114 +Wrlv/kFYFCLlVczhXybM6ivQI84vl9V62L80Fz5scEvZgYKL4eqagqaWcEIgCwbu
  39.115 +ikaZTDlHjcv4/EQjGUbRmIxu2I5hHbw+icFi+RbFSi9qbL7uMje04JD1VjWEAOOg
  39.116 +laT5zzUpQUB5opbG/xb2rk0RKgWl1ciF8kJgTkoB1Q9JX+rGJQ8jCEz7vssc8r3B
  39.117 +fQYtuhHUmAcbZzMVMYmtRNzGzmxfw/TJ3j6hbPBC59QyRxBizwMMFbqpTycvhQEM
  39.118 +Az45CZNVTVeAAQgAnwEueZqXqUCnQ+hlJqvD30e5/2bcw+5rCmtoUwOK9OUDUaui
  39.119 +z3y0Y5PCl6FBD5px1tQKPSfcipp90RlPMQlDLCIbu1lIWpTkZ0ZUhNfhr8ebwDid
  39.120 +rm12K1928yO/gCg0w+eyGbdD+cviPjyBtbhyRl2/aKTJm8rvZTYaMN1pjip+FXPv
  39.121 +Vd7Rw9Mud/s0ZgJ9P3hLJQf1MBeWGSVlPsV4gjU3JBCU1U1pn3AqM9f4hbYtaE8+
  39.122 +B666GfflhKNjv2/ErLiTKZaIl0c2oM0GW43OifKDujh17kcfapTlwUlhchuR6IUT
  39.123 +pOHCyYkNprBgdShpDulg5bhtrV7Lg3kALR+K2IUBDAOACteSLFIcyAEIAJiz9uh2
  39.124 +c+8Fo4IZyQMF8DXehfcbdkDPQtwo+OBgPh8riY4PgujGV7wVXKdN4X2dMX2xOQkO
  39.125 +xraIdMfo1F4K6/Q/mFAyb/taHsCC9lOG9r0C07WYzYxBKQ/rKJLtgieOADyuulLV
  39.126 +GRXjUUqhbRdA2WebLOpe6J87TaQW8LEP6g5Jms1qURx6APeBuRNRgb7bZHNiWeSE
  39.127 +5t1uERxLn9wmLkUDotYq3WQYgPw3udlpiSo1HmKLNTkhPr/CMmcqC3HzTvZ8BDMx
  39.128 +FeaLsnCBsyO3nTEAgWJQp2Vtq0HPrZic19+E65uEkCK6TZNQwLxuSlgEGFFMQGLo
  39.129 +ou4eSLJANolIKKaFAgwD5Y2zzgc8DVMBEACha1SY20QXxnNcguxfQI7fYPl2Czky
  39.130 +6Xjea22ULy1Cyoqmf0Ir6QDh1HbJ2Vn+odbzH3iRjJq7x+/1kL0+1RaSABgIt0K5
  39.131 +ARU7HgUKwABZ/K1zldq8vz4CQTnCx8o/C4kAOl7G1g+tcCST91h3Uikd8prl9/lU
  39.132 +BtrytpWsVwwneIxKr1RXkDpm3ySQVbfHhH8B/sshYTJkN0iPykrXdwRiHThCUlr4
  39.133 +6Tce8E3PSH2zY3kOrX1EBA98hsUfn5xVpGEgU21ltt9p/1EFWWNHpDQKLQNNk9ea
  39.134 +c5Hx0GNkupt58XS+pjE94PUlDrM4ObKcUuQmL0qdr1FgyeVZZ0Vr54c9GKflISqO
  39.135 +ki5rTvUa07GlBtpKUYB1M0wJX576WMhcFRs547SMcGpJp56zptGXcKiH8NALfcz1
  39.136 +So72Ln/X0JRd6AAslN+jnwEITSjFJFglIGxO5+DILcjV/HHOxSsNomuFOYkSR5vS
  39.137 +1FLkS0Gn2NLB0OEGoIXLJEY5/K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3OTeE1FaFdxYX3hTqYr+yCFzz0CogiER1ARIz
  39.153 +/yOfdcxHAKOz57V0imHyKXx+SFGAsUo4Db0ruF/RW/7n3rXyzkvVDF8La10v+kxu
  39.154 +wo4GA90xMiHDkLRwcEc9jYfMpbE42p+1UPZEfiTUNbCyK7lHDFgGyuTTCEPw6ajA
  39.155 +eBP1Z1IHaPgmEBMfiAeYLgrrM86PTKrh+tE4s6B3vjVIqqJNG9lGyXuLm7VhKitF
  39.156 +GEWPMfy4kJpKWViRW26bXyp3VH2aG5c4UZYPC3JAiZXYod5FKOQWSWRBo812cx2t
  39.157 +NP7vW6RBqEm7mYaXPzaHIkGKks4bsIs1X5mowiSp6wX38zJUHpTRBlOwxo4cXVHT
  39.158 +6WiI1DuamBWfRcW3+rmjbS1o0k2FjpB1RCqVO3+mnI5N4M+SGanvVSLtnxIl8ZhW
  39.159 +rGDcig2hyC19FrIzDFah0fRH7GTVnXxeaBiX1Qc03sC/LVmnNFr12dzbwY8eAyK3
  39.160 +1s/0RErZtoEXA1ly9y9JTvzWVEKWn0CUPZ+wRk6jKuAYt2OoVxPI8osY37wCIt7f
  39.161 +ylgB04xU72mNM3MoSu25sfwzVc0dEFIPKBAE4hCnLdtUJSNO9mOusfwFUOiazAEN
  39.162 +rNFxqd5xnDcG9ntIKCcFDLLDwMCDJeW/m1aWe9Edvk3gMXudwbW7SINErHkaQLib
  39.163 +rICnvMmt6pzPfbIMSajJNFAE/PR+VPtTBIJaZDb1xMXWk3aQXbMzInet88rgPELT
  39.164 +LDOaE3OJzoZ6r6k5ysvTzfArSW1uCH6hS59Z9Ltu2eQu0Qz94j1RR6TrK0wsFtEi
  39.165 +zMlPMlvZUzukYdxoq68AlV4CqjNbQsZ/xlFfEjAxu9lYPRZHv00nG1HJ50N6/JIZ
  39.166 +lpsO8IhDSmT1jek5b8dsV8RQ4Nhnx18CiCWiQI+KNDbl29nv0zAGTS3458P3J7Hw
  39.167 +QClS4jwS/OG/KG7pW5JrOjcabx2xAmHOz9OxBYTrHag4jDFZiBHsQ6C4LCivVUFO
  39.168 +qqQY1nsoaD8sK9qSew3CqUBB+xX5MV7+jMwoeg1B/nWtkt4sYk+WnglIIKCkoKLL
  39.169 +5I/pjSDSbVPvgV1QYXUdesctLjYu9lliXj46G52tof0fyScqNxf9wKoHEgSFr3LG
  39.170 +G4FSGdMqY/XzlPKGYQ1jkTcw+nYKoX9lPYke0tVPqInrR5+5SBGytaKrcrYVJfaz
  39.171 +hF5C04MVQa8WI2B7rMIHYRGhrQDk/yzfIDK8dSXfokwlKp+s7Rb23x3jMHuRLfPO
  39.172 +nNTcfu7KS6NxZsCFwI3LHdXXTRB0+ZIhksfWbH1/nGBBrZgO9A1x/TtFL9O+Rbqw
  39.173 +OlFNoG99cSTNCWVptHcOpuhs3z3MvG729pyZYa69gnE/ZKZML3/Bjfi6Ri9dmOrG
  39.174 +cblvM77N7+ohOtrZerzZwQBNgbSfUhDX0ha7I77whOAlDLYe/rSFcfwEhXyGfZhB
  39.175 +rkxaNdzFNS7JiNG80Con4PP71Q+28h6AZAjpytRsmC3/1HVjfNd8p+9WuLC+OAQD
  39.176 +QL9SazRflAg61szoeTjP4YiaPkM590JjABO3BncYLLCko04NTL2/6UnKmJmMa7Bd
  39.177 +ozB7gTKlXin/uX2KWjvRLmcTZzcdATpkWYBkdWHrL4k9kfaWiDF9RwRmpgJWzcQr
  39.178 +oOCHnbW77md4JQfVGasOD1z5HtEB9VLXqj+p3txF09u8MW/AVqQrquZaxwFYHFnI
  39.179 +wrEtRJhc5O9N/L/chbLwD7Qi6sR1P0aVJpGBCU37OrkBn3MAULsLPGx9kgUhA39N
  39.180 +36d/yWeDECuL0h6aJatAykZubjnKIV4tqKFikC5PoxFIHDcjr6EdKxAVJu4ZegAz
  39.181 +HSQboUk0YB7EcQ7tNsxVlYCYQeoQjkENL43WCr6Px8HSMMB0IDbjgaKqlYdX+QPi
  39.182 +jJUDx7qhF2lsV+C/ipwg4GeYMfE2t6iqau3ykYvI98975USHwEC6n553J27Au/yi
  39.183 +HvC4wP9yHrE0WjP+ISniUxA6YOPyV/PCvfxKPFpLfyXjpwji2nu+TERRvfy+0GRv
  39.184 +vSqOADYYE8Ct78PWOIRLdRl8LDKMlT3I8hmYWNjl704ndh0Aah5gHYbnYWDm3YHa
  39.185 +R2wy0mmli0GOD29GZkASFDbXo2EwCerUgGSuBDadZQ8nOit3UhgrpsJlL9KH2abB
  39.186 +BPf9AoWb8QZ4TQxHspQDUESBdIwUd1fvhATfO1Iv/l43Da2ThMMJR1JPcFr28AO0
  39.187 +9cH0+Tpqgp5Rm2Q3ZInD2BBD78bER0/JHjhwR6C1rzwSKmX8wL1sLaSCN82zHPOt
  39.188 +BSKiJY3Njb4aMnLszELOw8OOa9AY7KTjXHhpwkczekaHJcxGXUwz4fCdG/qyTxX1
  39.189 +qwZ8Yu3TaM0cMtmJSM0omrTSrHAhow1E0yhBoQCjDU4oC4jehk9kLT5FLMYFIHqz
  39.190 +yPZ32QlIisnAbOVuVb6ASwtcGXbHEv8GbkMq3wCvlVI5dPQtvETm0T0=
  39.191 +=LsrV
  39.192 +-----END PGP MESSAGE-----
  39.193 +
  39.194 +--51be29f17cd84a367a2f9514845aabb--
  39.195 +
  39.196 +
    40.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    40.2 +++ b/test/test_mails/reencrypt_sent_by_enigmail.eml	Thu May 03 14:41:57 2018 +0200
    40.3 @@ -0,0 +1,120 @@
    40.4 +Return-Path: <SRS0=Iqydak=HI=darthmama.org=krista@srs.smtpin.rzone.de>
    40.5 +X-Original-To: krista@gnunet.org
    40.6 +Delivered-To: krista@gnunet.org
    40.7 +Received: from vmmailrelay1.informatik.tu-muenchen.de (mailrelay1.informatik.tu-muenchen.de [131.159.254.14])
    40.8 +	by sam.net.in.tum.de (Postfix) with ESMTP id ABEF31C00BE
    40.9 +	for <krista@gnunet.org>; Thu, 19 Apr 2018 17:21:36 +0200 (CEST)
   40.10 +Received: by vmmailrelay1.informatik.tu-muenchen.de (Postfix, from userid 109)
   40.11 +	id E282F1C0393; Thu, 19 Apr 2018 17:21:36 +0200 (CEST)
   40.12 +Received: from vmmailrelay1.informatik.tu-muenchen.de (localhost [127.0.0.1])
   40.13 +	by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id C06001C038F
   40.14 +	for <krista@gnunet.org>; Thu, 19 Apr 2018 17:21:36 +0200 (CEST)
   40.15 +Received: from vmmaildmz2.informatik.tu-muenchen.de (vmmaildmz2.informatik.tu-muenchen.de [131.159.0.88])
   40.16 +	by vmmailrelay1.informatik.tu-muenchen.de (Postfix) with ESMTP id ACF7C1C0378
   40.17 +	for <krista@gnunet.org>; Thu, 19 Apr 2018 17:21:36 +0200 (CEST)
   40.18 +Received: by vmmaildmz2.informatik.tu-muenchen.de (Postfix, from userid 109)
   40.19 +	id AB7F51C24CA; Thu, 19 Apr 2018 17:21:36 +0200 (CEST)
   40.20 +X-Spam-Checker-Version: SpamAssassin 3.4.0-tuminfo_1 (2014-02-07) on
   40.21 +	vmmaildmz2.informatik.tu-muenchen.de
   40.22 +X-Spam-Level: 
   40.23 +X-Spam-Status: No, score=-2.7 required=7.0 tests=BAYES_00,DKIM_ADSP_NXDOMAIN,
   40.24 +	ENCRYPTED_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,TVD_RCVD_SPACE_BRACKET,
   40.25 +	UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.0-tuminfo_1
   40.26 +Received: from vmmaildmz2.informatik.tu-muenchen.de (localhost [127.0.0.1])
   40.27 +	by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTP id 93EC51C24C7
   40.28 +	for <krista@gnunet.org>; Thu, 19 Apr 2018 17:21:29 +0200 (CEST)
   40.29 +Received: from mi4-p00-ob.smtp.rzone.de (mi4-p00-ob.smtp.rzone.de [81.169.146.145])
   40.30 +	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
   40.31 +	(No client certificate requested)
   40.32 +	by vmmaildmz2.informatik.tu-muenchen.de (Postfix) with ESMTPS id 82FA91C24B4
   40.33 +	for <krista@gnunet.org>; Thu, 19 Apr 2018 17:21:29 +0200 (CEST)
   40.34 +X-RZG-FWD-BY: reencrypt_recip_numero_deux_test@darthmama.org
   40.35 +Received: from mailin.rzone.de ([unix socket])
   40.36 +	by mailin.rzone.de (RZmta 43.2) with LMTPA;
   40.37 +	Thu, 19 Apr 2018 17:21:25 +0200 (CEST)
   40.38 +Authentication-Results: strato.com; dmarc=none header.from=darthmama.cool
   40.39 +Authentication-Results: strato.com; arc=none
   40.40 +Authentication-Results: strato.com; dkim=none
   40.41 +Authentication-Results: strato.com; dkim-adsp=nxdomain header.from="reencrypt_sender@darthmama.cool"
   40.42 +Authentication-Results: strato.com; spf=none smtp.mailfrom="krista@darthmama.org"
   40.43 +X-RZG-Expurgate: clean/normal
   40.44 +X-RZG-Expurgate-ID: 149500::1524151285-00005A0E-E5D41550/0/0
   40.45 +X-Strato-MessageType: email
   40.46 +X-RZG-CLASS-ID: mi00
   40.47 +Received-SPF: none
   40.48 +	client-ip=131.159.0.8;
   40.49 +	helo="mail-out1.informatik.tu-muenchen.de";
   40.50 +	envelope-from="krista@darthmama.org";
   40.51 +	receiver=smtpin.rzone.de;
   40.52 +	identity=mailfrom;
   40.53 +Received: from mail-out1.informatik.tu-muenchen.de ([131.159.0.8])
   40.54 +	by smtpin.rzone.de (RZmta 43.2 OK)
   40.55 +	with ESMTPS id w0601au3JFLPyRp
   40.56 +	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA))
   40.57 +	(Client did not present a certificate)
   40.58 +	for <reencrypt_recip_numero_deux_test@darthmama.org>;
   40.59 +	Thu, 19 Apr 2018 17:21:25 +0200 (CEST)
   40.60 +Received: from [192.168.178.22] (ip5b439605.dynamic.kabel-deutschland.de [91.67.150.5])
   40.61 +	by services.sec.in.tum.de (Postfix) with ESMTPSA id 31683102926CA
   40.62 +	for <reencrypt_recip_numero_deux_test@darthmama.org>; Thu, 19 Apr 2018 17:21:20 +0200 (CEST)
   40.63 +Reply-To: krista@darthmama.org
   40.64 +To: reencrypt_recip_numero_deux_test@darthmama.org
   40.65 +From: reencrypt_sender@darthmama.cool
   40.66 +Subject: Test me for reencryption fun!
   40.67 +Openpgp: preference=signencrypt
   40.68 +Message-ID: <19af501a-bfe4-8829-7568-062cf024a8f1@darthmama.org>
   40.69 +Date: Thu, 19 Apr 2018 17:21:18 +0200
   40.70 +User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
   40.71 + Thunderbird/52.7.0
   40.72 +MIME-Version: 1.0
   40.73 +Content-Type: multipart/encrypted;
   40.74 + protocol="application/pgp-encrypted";
   40.75 + boundary="yaW4Ba2lMLWrvwkcowgvEpHqycafgqh8m"
   40.76 +
   40.77 +This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156)
   40.78 +--yaW4Ba2lMLWrvwkcowgvEpHqycafgqh8m
   40.79 +Content-Type: application/pgp-encrypted
   40.80 +Content-Description: PGP/MIME version identification
   40.81 +
   40.82 +Version: 1
   40.83 +
   40.84 +--yaW4Ba2lMLWrvwkcowgvEpHqycafgqh8m
   40.85 +Content-Type: application/octet-stream; name="encrypted.asc"
   40.86 +Content-Description: OpenPGP encrypted message
   40.87 +Content-Disposition: inline; filename="encrypted.asc"
   40.88 +
   40.89 +-----BEGIN PGP MESSAGE-----
   40.90 +
   40.91 +hQEMA1nVtA6XccMHAQgAqxYN3IDz09VCXKG1KFZMYmxGGB/4M5S/+nZt0FIIKt+L
   40.92 +arPr7Y/QBkNGxPsvik36W3nap/9eWbzDdvEuocosLEZJBPJu87zyEZ1G4+ayIB+1
   40.93 +5pEGulPXZqO03QjFh9voIqmnoIOW+/GRAZahXj5aCoC8LCk8o0c+0iCRr9KBcK3g
   40.94 +hr5zP5f8KBv2RXdJZm7DpepjXCeHj/XqoGr8LFGQAwqfYLa0P+vkns4H6eTJl9TQ
   40.95 +5jm4nIFoHDAN5w+rMF4/s27gwwtP+IOGcQWAeMXfp8rLJNE4vMjOCQUWldHJdE8j
   40.96 +zm8snoVXoeNZujneAaQrabiSMaWAzAcP6ihOHFVf9IUBDAN2QNno8+2czAEH/2Xs
   40.97 +T41nPPhz5f1awLVuDaPpEmoOBJMLmgYpj3dXNl8KwjhtroyJ6Fxnh/M84FtV5KUF
   40.98 +74c0+wRZfLJfZzRLw6RdBwtWLOiEVDc1L6Tkfi7v7Ta5/nDahFTMTagGIhYdbfkY
   40.99 +IGaXjXOJ07nFlQBDAlZPyhu0dPNQ1vhbr9XM74eCi3PhayO9PGJLX93lJtezrwTG
  40.100 +qampGqsfU3iT1wxOYTm7mM4RDvkC39rNuxHXI1wbjbDpRcQXucyHoGYU9CTlOxYr
  40.101 +zqq2W7zrwQftbhbFLxVP2ulF/qBTsTqaWNgHG5LPzNyrarv6HqP5caUusb9hSGZ+
  40.102 +tiViIKaes/xGMehpVgbS6QFTGOpnBzTgM7B+0J7TDATJXtBpTDuTfHjoNsfvie7K
  40.103 +NoBfq9zly1T1vT1XDVpqa29/v5zzj5jYSlXp90fFbh467E4RVr3V7X7KA36kjY1C
  40.104 +bpyizuwfIXnwJ5caPhUJaKzLP2BFwjE4aAybcve2LDBv5Y6GYk5Bvfids/3FCXqx
  40.105 +vmSbe2BLtkWhM6S8GVWKEc+Pts10JSl7ql8cLRqlRAR7Oyexf+rNpL7YMAzsnnod
  40.106 +IlSk2twjkV5dhMXmqDkZrVy5xwrE15HCWk6uIOyC6f22kbYHcaILT3iIjVh8rTdp
  40.107 +HUt7pocpXfq8YvApkJIAcjxaHe1/R1Z4aiXaxCEdzMbt+Sk73pIjg/rZ6AZ8qk5m
  40.108 +M5L+QGYNP0XNm9akkC0XO6Yq+QoWoCpB4xOozTLEGNY7KpaiMLoznjjIAZdWh91m
  40.109 +gohavIrFT1dsAQ854hnTpkbn9RzMdJ4k2KOs1sVmL5kBnofPZOZG+G/Q5z7yxz0x
  40.110 +9sI/CiC0hPHkKntcFfePnVhv1g26Qh5Se0efwjlcENHqG+IEr5EGtBOnHhgMOoWL
  40.111 +VgiNKHbpv+GZBm+H5pd2/gPn3YHyl2SwI9nSp6tmSvHtRt+sl/ZBP8TQoVZ9/YlG
  40.112 +EENtMBnYMVzu/2SD6rz80apm4Cr5a8buTSQBN7oGTagWnzQtzsYpVBrc1uqMIcCh
  40.113 +wGvBcObrxcrhwOMW/NiZQbxi2xYgTRJBd6LY4hysbwLEk2UA0ap8z8ttAKaBe8fR
  40.114 +/38vRWt2/YzNwCMjFPXU1H10MijAc+ntcvpHDzl8fnUghgDkezVlGB12RG6Gr/8Z
  40.115 +d5HF9xmn2Lq46eEYS0i5adaN9rpU4Adgaz20Z92SkWdinFlPAr98OIJo1sELRdAL
  40.116 +0kN6L0hUciXSJKkmMQYukkjxxFA5PwPfe1PpsWKVGCYE+obgOxHrucUXpQrslWkY
  40.117 +YXK+T3bGKOLGmUYtli5xxXDz55fcTn6hdvWcjstBgZuTY3qxKLE5a/AI6yAu4kJ4
  40.118 +ERiy4F9slqlu/l6hhWBkmj25iATcbXpIeiwrh3oodaTTz1sXdZIV0fdxSdtIxri9
  40.119 +kKVREFQ6RYYvc9eW2Q==
  40.120 +=/kiU
  40.121 +-----END PGP MESSAGE-----
  40.122 +
  40.123 +--yaW4Ba2lMLWrvwkcowgvEpHqycafgqh8m--