Merged in ENGINE-420
authorKrista Bennett <krista@pep-project.org>
Mon, 16 Apr 2018 12:45:09 +0200
changeset 2604a1288e25cc9d
parent 2589 3c5db90b50e8
parent 2603 a6a06822ec6b
child 2606 6bb1d3db6e36
child 2608 c04e5c003995
Merged in ENGINE-420
     1.1 --- a/.hgignore	Thu Apr 05 16:13:14 2018 +0200
     1.2 +++ b/.hgignore	Mon Apr 16 12:45:09 2018 +0200
     1.3 @@ -61,3 +61,4 @@
     1.4  __pycache__
     1.5  *.pyc
     1.6  test/python_tests/test?
     1.7 +
     2.1 --- a/src/keymanagement.c	Thu Apr 05 16:13:14 2018 +0200
     2.2 +++ b/src/keymanagement.c	Mon Apr 16 12:45:09 2018 +0200
     2.3 @@ -70,7 +70,7 @@
     2.4                  return PEP_OUT_OF_MEMORY;
     2.5              }
     2.6  
     2.7 -            if (_comm_type_key != PEP_ct_compromized &&
     2.8 +            if (_comm_type_key != PEP_ct_compromised &&
     2.9                  _comm_type_key != PEP_ct_unknown)
    2.10              {
    2.11                  if (identity->comm_type == PEP_ct_unknown ||
    2.12 @@ -341,7 +341,7 @@
    2.13          case PEP_ct_key_revoked:
    2.14          case PEP_ct_key_b0rken:
    2.15          case PEP_ct_key_expired:
    2.16 -        case PEP_ct_compromized:
    2.17 +        case PEP_ct_compromised:
    2.18          case PEP_ct_mistrusted:
    2.19              // this only happens when it's all there is
    2.20              status = first_reject_status;
    2.21 @@ -787,7 +787,7 @@
    2.22      
    2.23      // FIXME: This is legacy. I presume it's a notification for the caller...
    2.24      // Revisit once I can talk to Volker
    2.25 -    if (identity->comm_type != PEP_ct_compromized &&
    2.26 +    if (identity->comm_type != PEP_ct_compromised &&
    2.27          identity->comm_type < PEP_ct_strong_but_unconfirmed)
    2.28          if (session->examine_identity)
    2.29              session->examine_identity(identity, session->examine_management);
    2.30 @@ -845,7 +845,7 @@
    2.31                      return PEP_OUT_OF_MEMORY;
    2.32                  }
    2.33                  
    2.34 -                if (_comm_type_key != PEP_ct_compromized &&
    2.35 +                if (_comm_type_key != PEP_ct_compromised &&
    2.36                      _comm_type_key != PEP_ct_unknown)
    2.37                  {
    2.38                      if (identity->comm_type == PEP_ct_unknown ||
    2.39 @@ -1185,7 +1185,7 @@
    2.40          
    2.41          if (status == PEP_STATUS_OK)
    2.42              // cascade that mistrust for anyone using this key
    2.43 -            status = mark_as_compromized(session, ident->fpr);
    2.44 +            status = mark_as_compromised(session, ident->fpr);
    2.45          if (status == PEP_STATUS_OK)
    2.46              status = remove_fpr_as_default(session, ident->fpr);
    2.47          if (status == PEP_STATUS_OK)
    2.48 @@ -1289,7 +1289,10 @@
    2.49      if (!tmp_ident)
    2.50          return PEP_OUT_OF_MEMORY;
    2.51      
    2.52 -    status = update_identity(session, tmp_ident);
    2.53 +    if (is_me(session, tmp_ident))
    2.54 +        status = myself(session, tmp_ident);
    2.55 +    else
    2.56 +        status = update_identity(session, tmp_ident);
    2.57      
    2.58      if (status != PEP_STATUS_OK)
    2.59          goto pep_free;
     3.1 --- a/src/message_api.c	Thu Apr 05 16:13:14 2018 +0200
     3.2 +++ b/src/message_api.c	Mon Apr 16 12:45:09 2018 +0200
     3.3 @@ -1059,7 +1059,7 @@
     3.4      else if (ct == PEP_ct_key_not_found)
     3.5          return PEP_rating_have_no_key;
     3.6  
     3.7 -    else if (ct == PEP_ct_compromized)
     3.8 +    else if (ct == PEP_ct_compromised)
     3.9          return PEP_rating_under_attack;
    3.10  
    3.11      else if (ct == PEP_ct_mistrusted)
    3.12 @@ -1259,8 +1259,8 @@
    3.13  {
    3.14      PEP_STATUS status = PEP_STATUS_OK;
    3.15  
    3.16 -    if (max_comm_type == PEP_ct_compromized)
    3.17 -        return PEP_ct_compromized;
    3.18 +    if (max_comm_type == PEP_ct_compromised)
    3.19 +        return PEP_ct_compromised;
    3.20  
    3.21      if (max_comm_type == PEP_ct_mistrusted)
    3.22          return PEP_ct_mistrusted;
    3.23 @@ -1271,8 +1271,8 @@
    3.24          status = myself(session, ident);
    3.25  
    3.26      if (status == PEP_STATUS_OK) {
    3.27 -        if (ident->comm_type == PEP_ct_compromized)
    3.28 -            return PEP_ct_compromized;
    3.29 +        if (ident->comm_type == PEP_ct_compromised)
    3.30 +            return PEP_ct_compromised;
    3.31          else if (ident->comm_type == PEP_ct_mistrusted)
    3.32              return PEP_ct_mistrusted;
    3.33          else
    3.34 @@ -1812,6 +1812,181 @@
    3.35      return status;
    3.36  }
    3.37  
    3.38 +DYNAMIC_API PEP_STATUS encrypt_message_and_add_priv_key(
    3.39 +        PEP_SESSION session,
    3.40 +        message *src,
    3.41 +        message **dst,
    3.42 +        const char* to_fpr,
    3.43 +        PEP_enc_format enc_format,
    3.44 +        PEP_encrypt_flags_t flags
    3.45 +    )
    3.46 +{
    3.47 +    assert(session);
    3.48 +    assert(src);
    3.49 +    assert(dst);
    3.50 +    assert(to_fpr);
    3.51 +        
    3.52 +    if (!session || !src || !dst || !to_fpr)
    3.53 +        return PEP_ILLEGAL_VALUE;
    3.54 +        
    3.55 +    if (enc_format == PEP_enc_none)
    3.56 +        return PEP_ILLEGAL_VALUE;
    3.57 +    
    3.58 +    if (src->cc || src->bcc)
    3.59 +        return PEP_ILLEGAL_VALUE;
    3.60 +        
    3.61 +    if (!src->to || src->to->next)
    3.62 +        return PEP_ILLEGAL_VALUE;
    3.63 +        
    3.64 +    if (!src->from->address || !src->to->ident || !src->to->ident->address)
    3.65 +        return PEP_ILLEGAL_VALUE;
    3.66 +            
    3.67 +    if (!strcasecmp(src->from->address, src->to->ident->address) == 0)
    3.68 +        return PEP_ILLEGAL_VALUE;
    3.69 +    
    3.70 +    stringlist_t* keys = NULL;
    3.71 +
    3.72 +    char* own_id = NULL;
    3.73 +    char* default_id = NULL;
    3.74 +    
    3.75 +    PEP_STATUS status = get_default_own_userid(session, &own_id);
    3.76 +    
    3.77 +    if (!own_id)
    3.78 +        return PEP_UNKNOWN_ERROR; // Probably a DB error at this point
    3.79 +        
    3.80 +    if (src->from->user_id) {
    3.81 +        if (strcmp(src->from->user_id, own_id) != 0) {
    3.82 +            status = get_userid_alias_default(session, src->from->user_id, &default_id);
    3.83 +            if (status != PEP_STATUS_OK || !default_id || strcmp(default_id, own_id) != 0) {
    3.84 +                status = PEP_ILLEGAL_VALUE;
    3.85 +                goto pep_free;
    3.86 +            }
    3.87 +        }        
    3.88 +    }
    3.89 +    
    3.90 +    // Ok, we are at least marginally sure the initial stuff is ok.
    3.91 +        
    3.92 +    // Let's get our own, normal identity
    3.93 +    pEp_identity* own_identity = identity_dup(src->from);
    3.94 +    status = myself(session, own_identity);
    3.95 +
    3.96 +    if (status != PEP_STATUS_OK)
    3.97 +        goto pep_free;
    3.98 +
    3.99 +    // Ok, now we know the address is an own address. All good. Then...
   3.100 +    char* own_private_fpr = own_identity->fpr;
   3.101 +    own_identity->fpr = strdup(to_fpr);
   3.102 +    
   3.103 +    status = get_trust(session, own_identity);
   3.104 +    
   3.105 +    if (status != PEP_STATUS_OK) {
   3.106 +        if (status == PEP_CANNOT_FIND_IDENTITY)
   3.107 +            status = PEP_ILLEGAL_VALUE;
   3.108 +        goto pep_free;
   3.109 +    }
   3.110 +        
   3.111 +    if ((own_identity->comm_type & PEP_ct_confirmed) != PEP_ct_confirmed) {
   3.112 +        status = PEP_ILLEGAL_VALUE;
   3.113 +        goto pep_free;
   3.114 +    }
   3.115 +                
   3.116 +    // Ok, so all the things are now allowed.
   3.117 +    // So let's get our own private key and roll with it.
   3.118 +    char* priv_key_data = NULL;
   3.119 +    size_t priv_key_size = 0;
   3.120 +    
   3.121 +    status = export_secret_key(session, own_private_fpr, &priv_key_data, 
   3.122 +                                &priv_key_size);
   3.123 +
   3.124 +    if (status != PEP_STATUS_OK)
   3.125 +        goto pep_free;
   3.126 +    
   3.127 +    if (!priv_key_data) {
   3.128 +        status = PEP_CANNOT_EXPORT_KEY;
   3.129 +        goto pep_free;
   3.130 +    }
   3.131 +    
   3.132 +    // Ok, fine... let's encrypt yon blob
   3.133 +    keys = new_stringlist(own_private_fpr);
   3.134 +    if (!keys) {
   3.135 +        status = PEP_OUT_OF_MEMORY;
   3.136 +        goto pep_free;
   3.137 +    }
   3.138 +    
   3.139 +    stringlist_add(keys, to_fpr);
   3.140 +    
   3.141 +    char* encrypted_key_text = NULL;
   3.142 +    size_t encrypted_key_size = 0;
   3.143 +    
   3.144 +    if (flags & PEP_encrypt_flag_force_unsigned)
   3.145 +        status = encrypt_only(session, keys, priv_key_data, priv_key_size,
   3.146 +                              &encrypted_key_text, &encrypted_key_size);
   3.147 +    else
   3.148 +        status = encrypt_and_sign(session, keys, priv_key_data, priv_key_size,
   3.149 +                                  &encrypted_key_text, &encrypted_key_size);
   3.150 +    
   3.151 +    if (!encrypted_key_text) {
   3.152 +        status = PEP_UNKNOWN_ERROR;
   3.153 +        goto pep_free;
   3.154 +    }
   3.155 +
   3.156 +    // We will have to delete this before returning, as we allocated it.
   3.157 +    bloblist_t* created_bl = NULL;
   3.158 +    bloblist_t* created_predecessor = NULL;
   3.159 +    
   3.160 +    bloblist_t* old_head = NULL;
   3.161 +    
   3.162 +    if (!src->attachments || src->attachments->value == NULL) {
   3.163 +        if (src->attachments->value == NULL) {
   3.164 +            old_head = src->attachments;
   3.165 +            src->attachments = NULL;
   3.166 +        }
   3.167 +        src->attachments = new_bloblist(encrypted_key_text, encrypted_key_size,
   3.168 +                                        "application/octet-stream", 
   3.169 +                                        "file://pEpkey.asc.pgp");
   3.170 +        created_bl = src->attachments;
   3.171 +    } 
   3.172 +    else {
   3.173 +        bloblist_t* tmp = src->attachments;
   3.174 +        while (tmp && tmp->next) {
   3.175 +            tmp = tmp->next;
   3.176 +        }
   3.177 +        created_predecessor = tmp;                                    
   3.178 +        created_bl = bloblist_add(tmp, 
   3.179 +                                  encrypted_key_text, encrypted_key_size,
   3.180 +                                  "application/octet-stream", 
   3.181 +                                   "file://pEpkey.asc.pgp");
   3.182 +    }
   3.183 +    
   3.184 +    if (!created_bl) {
   3.185 +        status = PEP_OUT_OF_MEMORY;
   3.186 +        goto pep_free;
   3.187 +    }
   3.188 +            
   3.189 +    // Ok, it's in there. Let's do this.        
   3.190 +    status = encrypt_message(session, src, keys, dst, enc_format, 0);
   3.191 +    
   3.192 +    // Delete what we added to src
   3.193 +    free_bloblist(created_bl);
   3.194 +    if (created_predecessor)
   3.195 +        created_predecessor->next = NULL;
   3.196 +    else {
   3.197 +        if (old_head)
   3.198 +            src->attachments = old_head;
   3.199 +        else
   3.200 +            src->attachments = NULL;    
   3.201 +    }
   3.202 +    
   3.203 +pep_free:
   3.204 +    free(own_id);
   3.205 +    free(default_id);
   3.206 +    free(own_private_fpr);
   3.207 +    free_identity(own_identity);
   3.208 +    free_stringlist(keys);
   3.209 +    return status;
   3.210 +}
   3.211 +
   3.212 +
   3.213  DYNAMIC_API PEP_STATUS encrypt_message_for_self(
   3.214          PEP_SESSION session,
   3.215          pEp_identity* target_id,
   3.216 @@ -2515,9 +2690,9 @@
   3.217          // the private identity list should NOT be subject to myself() or
   3.218          // update_identity() at this point.
   3.219          // If the receiving app wants them to be in the trust DB, it
   3.220 -        // should call myself() on them upon return.
   3.221 +        // should call set_own_key() on them upon return.
   3.222          // We do, however, prepare these so the app can use them
   3.223 -        // directly in a myself() call by putting the own_id on it.
   3.224 +        // directly in a set_own_key() call by putting the own_id on it.
   3.225          char* own_id = NULL;
   3.226          status = get_default_own_userid(session, &own_id);
   3.227          
   3.228 @@ -2562,12 +2737,16 @@
   3.229      
   3.230      PEP_STATUS status = 
   3.231              is_me(session, sender) ? myself(session, sender) : update_identity(session, sender);
   3.232 -    
   3.233 +
   3.234      if (EMPTYSTR(sender->fpr) || strcmp(sender->fpr, keylist->value) != 0) {
   3.235          free(sender->fpr);
   3.236          sender->fpr = strdup(keylist->value);
   3.237          if (!sender->fpr)
   3.238              return PEP_OUT_OF_MEMORY;
   3.239 +        status = set_pgp_keypair(session, sender->fpr);
   3.240 +        if (status != PEP_STATUS_OK)
   3.241 +            return status;
   3.242 +            
   3.243          status = get_trust(session, sender);
   3.244          
   3.245          if (status == PEP_CANNOT_FIND_IDENTITY || sender->comm_type == PEP_ct_unknown) {
   3.246 @@ -2918,7 +3097,24 @@
   3.247                                                  free_message(inner_message);
   3.248                                                  goto pep_error;
   3.249                                              }
   3.250 -                                                    
   3.251 +
   3.252 +                                            // check for private key in decrypted message attachment while importing
   3.253 +                                            // N.B. Apparently, we always import private keys into the keyring; however,
   3.254 +                                            // we do NOT always allow those to be used for encryption. THAT is controlled
   3.255 +                                            // by setting it as an own identity associated with the key in the DB.
   3.256 +                                            
   3.257 +                                            // If we have a message 2.0 message, we are ONLY going to be ok with keys
   3.258 +                                            // we imported from THIS part of the message.
   3.259 +                                            imported_private_key_address = false;
   3.260 +                                            free(private_il);
   3.261 +                                            private_il = NULL;
   3.262 +                                            status = import_priv_keys_from_decrypted_msg(session, src, inner_message,
   3.263 +                                                                                         &imported_keys,
   3.264 +                                                                                         &imported_private_key_address,
   3.265 +                                                                                         private_il);
   3.266 +                                            if (status != PEP_STATUS_OK)
   3.267 +                                                goto pep_error;            
   3.268 +
   3.269                                              // THIS is our message
   3.270                                              // Now, let's make sure we've copied in 
   3.271                                              // any information sent in by the app if
     4.1 --- a/src/message_api.h	Thu Apr 05 16:13:14 2018 +0200
     4.2 +++ b/src/message_api.h	Mon Apr 16 12:45:09 2018 +0200
     4.3 @@ -75,6 +75,16 @@
     4.4      );
     4.5  
     4.6  
     4.7 +DYNAMIC_API PEP_STATUS encrypt_message_and_add_priv_key(
     4.8 +        PEP_SESSION session,
     4.9 +        message *src,
    4.10 +        message **dst,
    4.11 +        const char* to_fpr,
    4.12 +        PEP_enc_format enc_format,
    4.13 +        PEP_encrypt_flags_t flags
    4.14 +    );
    4.15 +
    4.16 +
    4.17  // encrypt_message_for_self() - encrypt message in memory for user's identity only,
    4.18  //                              ignoring recipients and other identities from
    4.19  //                              the message
     5.1 --- a/src/mime.c	Thu Apr 05 16:13:14 2018 +0200
     5.2 +++ b/src/mime.c	Mon Apr 16 12:45:09 2018 +0200
     5.3 @@ -302,9 +302,12 @@
     5.4      char *_username = NULL;
     5.5      struct mailimf_mailbox *mb;
     5.6  
     5.7 -    _username = (ident->username && must_field_value_be_encoded(ident->username))
     5.8 -                  ? mailmime_encode_subject_header("utf-8", ident->username, 0) 
     5.9 -                  : strdup("");
    5.10 +    if (!ident->username)
    5.11 +        _username = strdup("");
    5.12 +    else
    5.13 +        _username = must_field_value_be_encoded(ident->username) ?
    5.14 +                    mailmime_encode_subject_header("utf-8", ident->username, 0) : 
    5.15 +                    strdup(ident->username);
    5.16                    
    5.17      assert(_username);
    5.18      if (_username == NULL)
     6.1 --- a/src/pEpEngine.c	Thu Apr 05 16:13:14 2018 +0200
     6.2 +++ b/src/pEpEngine.c	Mon Apr 16 12:45:09 2018 +0200
     6.3 @@ -311,7 +311,7 @@
     6.4      " and comm_type != 0;"; // ignores PEP_ct_unknown
     6.5      // returns PEP_ct_unknown only when no known trust is recorded
     6.6  
     6.7 -static const char *sql_mark_as_compromized = 
     6.8 +static const char *sql_mark_as_compromised = 
     6.9      "update trust not indexed set comm_type = 15"
    6.10      " where pgp_keypair_fpr = upper(replace(?1,' ','')) ;";
    6.11      
    6.12 @@ -1195,8 +1195,8 @@
    6.13              (int)strlen(sql_least_trust), &_session->least_trust, NULL);
    6.14      assert(int_result == SQLITE_OK);
    6.15  
    6.16 -    int_result = sqlite3_prepare_v2(_session->db, sql_mark_as_compromized,
    6.17 -            (int)strlen(sql_mark_as_compromized), &_session->mark_compromized,
    6.18 +    int_result = sqlite3_prepare_v2(_session->db, sql_mark_as_compromised,
    6.19 +            (int)strlen(sql_mark_as_compromised), &_session->mark_compromised,
    6.20              NULL);
    6.21      assert(int_result == SQLITE_OK);
    6.22  
    6.23 @@ -1428,8 +1428,8 @@
    6.24                  sqlite3_finalize(session->get_trust);
    6.25              if (session->least_trust)
    6.26                  sqlite3_finalize(session->least_trust);
    6.27 -            if (session->mark_compromized)
    6.28 -                sqlite3_finalize(session->mark_compromized);
    6.29 +            if (session->mark_compromised)
    6.30 +                sqlite3_finalize(session->mark_compromised);
    6.31              if (session->crashdump)
    6.32                  sqlite3_finalize(session->crashdump);
    6.33              if (session->languagelist)
    6.34 @@ -2926,12 +2926,20 @@
    6.35      return status;
    6.36  }
    6.37  
    6.38 -
    6.39 +// Deprecated
    6.40  DYNAMIC_API PEP_STATUS mark_as_compromized(
    6.41          PEP_SESSION session,
    6.42          const char *fpr
    6.43      )
    6.44  {
    6.45 +    return mark_as_compromised(session, fpr);
    6.46 +}
    6.47 +
    6.48 +DYNAMIC_API PEP_STATUS mark_as_compromised(
    6.49 +        PEP_SESSION session,
    6.50 +        const char *fpr
    6.51 +    )
    6.52 +{
    6.53      int result;
    6.54  
    6.55      assert(session);
    6.56 @@ -2940,11 +2948,11 @@
    6.57      if (!(session && fpr && fpr[0]))
    6.58          return PEP_ILLEGAL_VALUE;
    6.59  
    6.60 -    sqlite3_reset(session->mark_compromized);
    6.61 -    sqlite3_bind_text(session->mark_compromized, 1, fpr, -1,
    6.62 +    sqlite3_reset(session->mark_compromised);
    6.63 +    sqlite3_bind_text(session->mark_compromised, 1, fpr, -1,
    6.64              SQLITE_STATIC);
    6.65 -    result = sqlite3_step(session->mark_compromized);
    6.66 -    sqlite3_reset(session->mark_compromized);
    6.67 +    result = sqlite3_step(session->mark_compromised);
    6.68 +    sqlite3_reset(session->mark_compromised);
    6.69  
    6.70      if (result != SQLITE_DONE)
    6.71          return PEP_CANNOT_SET_TRUST;
    6.72 @@ -3142,7 +3150,7 @@
    6.73              key_data, size, false);
    6.74  }
    6.75  
    6.76 -DYNAMIC_API PEP_STATUS export_secrect_key(
    6.77 +DYNAMIC_API PEP_STATUS export_secret_key(
    6.78          PEP_SESSION session, const char *fpr, char **key_data, size_t *size
    6.79      )
    6.80  {
    6.81 @@ -3162,6 +3170,14 @@
    6.82              key_data, size, true);
    6.83  }
    6.84  
    6.85 +// Deprecated
    6.86 +DYNAMIC_API PEP_STATUS export_secrect_key(
    6.87 +        PEP_SESSION session, const char *fpr, char **key_data, size_t *size
    6.88 +    )
    6.89 +{
    6.90 +    return export_secret_key(session, fpr, key_data, size);
    6.91 +}
    6.92 +
    6.93  DYNAMIC_API PEP_STATUS find_keys(
    6.94          PEP_SESSION session, const char *pattern, stringlist_t **keylist
    6.95      )
     7.1 --- a/src/pEpEngine.h	Thu Apr 05 16:13:14 2018 +0200
     7.2 +++ b/src/pEpEngine.h	Mon Apr 16 12:45:09 2018 +0200
     7.3 @@ -431,7 +431,8 @@
     7.4      PEP_ct_b0rken_crypto = 0x0b,
     7.5      PEP_ct_key_too_short = 0x0c,
     7.6  
     7.7 -    PEP_ct_compromized = 0x0e,                  // known compromized connection
     7.8 +    PEP_ct_compromised = 0x0e,                  // known compromised connection
     7.9 +    PEP_ct_compromized = 0x0e,                  // deprecated misspelling
    7.10      PEP_ct_mistrusted = 0x0f,                   // known mistrusted key
    7.11  
    7.12      // range 0x10 to 0x3f: unconfirmed encryption
    7.13 @@ -742,12 +743,21 @@
    7.14          identity_flags_t flags
    7.15      );
    7.16  
    7.17 -// mark_as_compromized() - mark key in trust db as compromized
    7.18 +// mark_as_compromised() - mark key in trust db as compromised
    7.19  //
    7.20  //    parameters:
    7.21  //        session (in)        session handle
    7.22  //        fpr (in)            fingerprint of key to mark
    7.23  
    7.24 +DYNAMIC_API PEP_STATUS mark_as_compromised(
    7.25 +        PEP_SESSION session,
    7.26 +        const char *fpr
    7.27 +    );
    7.28 +
    7.29 +
    7.30 +// mark_as_compromized() - deprecated to fix misspelling. Please move to
    7.31 +//                         mark_as_compromised();
    7.32 +
    7.33  DYNAMIC_API PEP_STATUS mark_as_compromized(
    7.34          PEP_SESSION session,
    7.35          const char *fpr
    7.36 @@ -861,6 +871,14 @@
    7.37  //      the caller is responsible to free() it (on Windoze use pEp_free())
    7.38  //      beware of leaking secret key data - overwrite it in memory after use
    7.39  
    7.40 +DYNAMIC_API PEP_STATUS export_secret_key(
    7.41 +        PEP_SESSION session, const char *fpr, char **key_data, size_t *size
    7.42 +    );
    7.43 +
    7.44 +
    7.45 +// export_secrect_key() - deprecated misspelled function. Please replace with
    7.46 +//                        export_secret_key
    7.47 +
    7.48  DYNAMIC_API PEP_STATUS export_secrect_key(
    7.49          PEP_SESSION session, const char *fpr, char **key_data, size_t *size
    7.50      );
     8.1 --- a/src/pEp_internal.h	Thu Apr 05 16:13:14 2018 +0200
     8.2 +++ b/src/pEp_internal.h	Mon Apr 16 12:45:09 2018 +0200
     8.3 @@ -150,7 +150,7 @@
     8.4      sqlite3_stmt *update_trust_for_fpr;
     8.5      sqlite3_stmt *get_trust;
     8.6      sqlite3_stmt *least_trust;
     8.7 -    sqlite3_stmt *mark_compromized;
     8.8 +    sqlite3_stmt *mark_compromised;
     8.9      sqlite3_stmt *reset_trust;
    8.10      sqlite3_stmt *crashdump;
    8.11      sqlite3_stmt *languagelist;
     9.1 --- a/src/sync_impl.c	Thu Apr 05 16:13:14 2018 +0200
     9.2 +++ b/src/sync_impl.c	Mon Apr 16 12:45:09 2018 +0200
     9.3 @@ -894,7 +894,7 @@
     9.4                      goto enomem;
     9.5                  char *key = NULL;
     9.6                  size_t size = 0;
     9.7 -                status = export_secrect_key(session, fpr, &key, &size);
     9.8 +                status = export_secret_key(session, fpr, &key, &size);
     9.9                  if (status != PEP_STATUS_OK)
    9.10                      goto error;
    9.11                  bloblist_t *bl = bloblist_add(_message->attachments,
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/test/convenience_scripts/DANGER_delete_keys_silently_w_pattern.py	Mon Apr 16 12:45:09 2018 +0200
    10.3 @@ -0,0 +1,32 @@
    10.4 +import argparse
    10.5 +import gnupg
    10.6 +import os
    10.7 +import subprocess
    10.8 +
    10.9 +parser = argparse.ArgumentParser()
   10.10 +parser.add_argument("pattern")
   10.11 +parser.add_argument("--priv", "-p", help="also delete associated private keys", action='store_true')
   10.12 +
   10.13 +args = parser.parse_args()
   10.14 +
   10.15 +homedir = os.path.join(os.path.expanduser('~'),".gnupg")
   10.16 +print("GNUPGHOME=" + homedir + "\n")
   10.17 +
   10.18 +try:
   10.19 +    gpg = gnupg.GPG(gnupghome=homedir) 
   10.20 +except TypeError:
   10.21 +    gpg = gnupg.GPG(homedir=homedir)
   10.22 +
   10.23 +if not args.pattern:
   10.24 +    raise Exception("No pattern? How'd you do that?")
   10.25 +    
   10.26 +public_keys = gpg.list_keys(keys=args.pattern) # same as gpg.list_keys(False)
   10.27 +
   10.28 +for key in public_keys:
   10.29 +    print("Deleting keys...\n")
   10.30 +    for uid in key['uids']:
   10.31 +        print(uid + " ")
   10.32 +    print(key['fingerprint'] + "\n")
   10.33 +    if args.priv:
   10.34 +        gpg.delete_keys(key['fingerprint'], True)
   10.35 +    gpg.delete_keys(key['fingerprint'])
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/test/convenience_scripts/keygen_for_test.py	Mon Apr 16 12:45:09 2018 +0200
    11.3 @@ -0,0 +1,101 @@
    11.4 +import argparse
    11.5 +import gnupg
    11.6 +import os
    11.7 +import subprocess
    11.8 +
    11.9 +parser = argparse.ArgumentParser()
   11.10 +parser.add_argument("num_keys", type=int)
   11.11 +parser.add_argument("real_name_prefix")
   11.12 +parser.add_argument("email_address_prefix")
   11.13 +parser.add_argument("output_root", help="root of where to stick the keys (keys go into pub/ and priv/ accordingly)")
   11.14 +parser.add_argument("--no_suffix", "-x", help="Use name and email address as is - do not create incremental ones based on the input", action='store_true')
   11.15 +parser.add_argument("--hgadd", "-a", help="hg add the created keyfiles", action='store_true')
   11.16 +
   11.17 +args = parser.parse_args()
   11.18 +
   11.19 +pub_path = os.path.join(args.output_root, "pub")
   11.20 +priv_path = os.path.join(args.output_root, "priv")
   11.21 +
   11.22 +homedir = os.path.join(os.path.expanduser('~'),".gnupg")
   11.23 +print("GNUPGHOME=" + homedir + "\n")
   11.24 +
   11.25 +try:
   11.26 +    gpg = gnupg.GPG(gnupghome=homedir) 
   11.27 +except TypeError:
   11.28 +    gpg = gnupg.GPG(homedir=homedir)
   11.29 +
   11.30 +name = args.real_name_prefix
   11.31 +email = args.email_address_prefix
   11.32 +    
   11.33 +suffix = not args.no_suffix
   11.34 +
   11.35 +name_prefix = args.real_name_prefix + " "     
   11.36 +e_split = args.email_address_prefix.split('@')
   11.37 +e_split_len = len(e_split)
   11.38 +
   11.39 +if (e_split_len > 2):
   11.40 +    for j in range(e_split_len - 1):
   11.41 +        email_0 = email_0 + e_split[j] + "@"
   11.42 +    email_0 = email_0 + _ + i_str + e_split[e_split_len - 1]    
   11.43 +    email_1 = e_split_len[e_split_len - 1]
   11.44 +    e_split = [email_0, email_1]
   11.45 +    e_split_len = 2
   11.46 +elif (e_split_len == 0):
   11.47 +        email_0 = "doge"    
   11.48 +        email_1 = "dogepile.me"
   11.49 +        e_split = [email_0, email_1]
   11.50 +        e_split_len = 2
   11.51 +    
   11.52 +num_keys = args.num_keys
   11.53 +    
   11.54 +for i in range(num_keys):
   11.55 +    i_str = str(i)
   11.56 +
   11.57 +    if suffix:
   11.58 +        
   11.59 +        name = name_prefix + i_str
   11.60 +        
   11.61 +        if e_split_len == 1:
   11.62 +            email = e_split[0] + "_" + i_str
   11.63 +        elif e_split_len == 2:
   11.64 +            email = e_split[0] + "_" + i_str + "@" + e_split[1]
   11.65 +
   11.66 +    print("Generating key data for " + name + " " + email + "\n")
   11.67 +    input_data = gpg.gen_key_input(key_type="RSA", key_length=2048, subkey_type="RSA", subkey_length=2048, expire_date=0, name_real=name, name_email=email, password="")
   11.68 +    if not input_data:
   11.69 +        raise Exception('Input data not created in iteration ' + str(i))
   11.70 +    
   11.71 +    print(input_data)
   11.72 +    key = None
   11.73 +    key = gpg.gen_key(input_data)
   11.74 +    if not key:
   11.75 +        raise Exception('Key not created in iteration ' + str(i))
   11.76 +    pubkey = None
   11.77 +    privkey = None
   11.78 +    
   11.79 +    fpr = key.fingerprint
   11.80 +    print("Generated " + fpr)
   11.81 +    key_filename_prefix = e_split[0] + "_" + i_str + "-0x" + fpr[-8:] + "_"
   11.82 +
   11.83 +    
   11.84 +    pubkey = gpg.export_keys(fpr)
   11.85 +    privkey = gpg.export_keys(fpr, True)
   11.86 +
   11.87 +    pubkey_filename = os.path.join(pub_path, key_filename_prefix + "pub.asc")
   11.88 +    privkey_filename = os.path.join(priv_path, key_filename_prefix + "priv.asc")    
   11.89 +    
   11.90 +    # Write to file
   11.91 +    pubkey_file = open(pubkey_filename,'w')
   11.92 +    pubkey_file.write(pubkey)
   11.93 +    pubkey_file.close()
   11.94 +    privkey_file = open(privkey_filename,'w')    
   11.95 +    privkey_file.write(privkey)
   11.96 +    privkey_file.close()
   11.97 +        
   11.98 +    # Delete keys from keyring
   11.99 +    gpg.delete_keys(fpr, True) # True => private keys
  11.100 +    gpg.delete_keys(fpr)
  11.101 +
  11.102 +    if (args.hgadd):
  11.103 +        subprocess.run(["hg", "add", pubkey_filename])
  11.104 +        subprocess.run(["hg", "add", privkey_filename])
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/test/decrypt_attach_private_key_trusted_test.cc	Mon Apr 16 12:45:09 2018 +0200
    12.3 @@ -0,0 +1,146 @@
    12.4 +// This file is under GNU General Public License 3.0
    12.5 +// see LICENSE.txt
    12.6 +
    12.7 +#include <stdlib.h>
    12.8 +#include <string.h>
    12.9 +#include "platform.h"
   12.10 +#include <iostream>
   12.11 +#include <fstream>
   12.12 +#include <assert.h>
   12.13 +#include "mime.h"
   12.14 +#include "message_api.h"
   12.15 +#include "keymanagement.h"
   12.16 +#include "test_util.h"
   12.17 +
   12.18 +using namespace std;
   12.19 +
   12.20 +int main() {
   12.21 +    cout << "\n*** decrypt_attach_private_key_trusted_test ***\n\n";
   12.22 +
   12.23 +    PEP_SESSION session;
   12.24 +    
   12.25 +    cout << "calling init()\n";
   12.26 +    PEP_STATUS status1 = init(&session);
   12.27 +    assert(status1 == PEP_STATUS_OK);
   12.28 +    assert(session);
   12.29 +    cout << "init() completed.\n";
   12.30 +
   12.31 +    const char* own_uid = PEP_OWN_USERID;
   12.32 +
   12.33 +    cout << "Importing keys..." << endl;
   12.34 +    
   12.35 +    string input_key;
   12.36 +    const char* main_addr = "priv-key-import-test-main@darthmama.cool";
   12.37 +    pEp_identity* main_me = NULL;
   12.38 +    const char* fpr_main_me = "13A9F97964A2B52520CAA40E51BCA783C065A213";    
   12.39 +    pEp_identity* same_addr_same_uid = NULL;
   12.40 +    const char* fpr_same_addr_same_uid = "8AB616A3BD51DEF714B5E688EFFB540C3276D2E5";
   12.41 +        
   12.42 +    PEP_STATUS status = PEP_STATUS_OK;
   12.43 +
   12.44 +    // key for main own user
   12.45 +    // 
   12.46 +    // 13A9F97964A2B52520CAA40E51BCA783C065A213    
   12.47 +    input_key = slurp("test_keys/pub/priv-key-import-test-main_0-0xC065A213_pub.asc");
   12.48 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   12.49 +    assert(status == PEP_STATUS_OK);
   12.50 +
   12.51 +    input_key = slurp("test_keys/priv/priv-key-import-test-main_0-0xC065A213_priv.asc");
   12.52 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   12.53 +    assert(status == PEP_STATUS_OK);
   12.54 +
   12.55 +    // ensure there's no private key - doesn't work in automated tests, sadly. Uncommon when running script manually.
   12.56 +    bool has_priv = false;
   12.57 +    // status = contains_priv_key(session, fpr_same_addr_same_uid, &has_priv);
   12.58 +    // if (status == PEP_STATUS_OK && has_priv) {
   12.59 +    //     cout << "SORRY, have to delete keys here to run test correctly..." << endl;
   12.60 +    //     status = delete_keypair(session, fpr_same_addr_same_uid);
   12.61 +    //     if (status == PEP_STATUS_OK) {
   12.62 +    //         has_priv = false;
   12.63 +    //         status = contains_priv_key(session, fpr_same_addr_same_uid, &has_priv);
   12.64 +    //         assert(has_priv == false);
   12.65 +    //         cout << "Successfully deleted keypair for " << fpr_same_addr_same_uid << " - will now import the public key only" << endl;
   12.66 +    //     }
   12.67 +    //     else
   12.68 +    //         cout << "Warning - delete keypair returned status " << tl_status_string(status) << ". This may or may not be an error, depending on what you expect." << endl;            
   12.69 +    // }
   12.70 +        
   12.71 +    // key with same address and user_id
   12.72 +    // 8AB616A3BD51DEF714B5E688EFFB540C3276D2E5
   12.73 +    input_key = slurp("test_keys/pub/priv-key-import-test-main_0-0x3276D2E5_pub.asc");
   12.74 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   12.75 +    assert(status == PEP_STATUS_OK);
   12.76 +
   12.77 +    
   12.78 +    cout << "Setting up own identity with default key " << fpr_main_me << endl;
   12.79 +    // Own identity with default key etc
   12.80 +    main_me = new_identity(main_addr, fpr_main_me, own_uid, "PrivateKey Import Test");
   12.81 +    status = set_own_key(session, main_me, fpr_main_me);
   12.82 +    assert(status == PEP_STATUS_OK);
   12.83 +
   12.84 +    assert(strcmp(main_me->fpr, fpr_main_me) == 0);
   12.85 +    cout << "Done!" << endl << endl;
   12.86 +    
   12.87 +    cout << "Setting up sender identities and resetting key trust." << endl;
   12.88 +    cout << "Same address, same user_id - address: " << main_addr << ", user_id: " << own_uid << ", fpr: " << fpr_same_addr_same_uid << endl;  
   12.89 +    same_addr_same_uid = new_identity(main_addr, fpr_same_addr_same_uid, own_uid, "PrivateKey Import Test");
   12.90 +    assert(status == PEP_STATUS_OK || status == PEP_CANNOT_FIND_IDENTITY);
   12.91 +    assert((same_addr_same_uid->comm_type & PEP_ct_confirmed) != PEP_ct_confirmed);
   12.92 +
   12.93 +    status = key_reset_trust(session, same_addr_same_uid);
   12.94 +    
   12.95 +    cout << "Done!" << endl << endl;
   12.96 +
   12.97 +    cout << "Reading in message..." << endl;
   12.98 +    
   12.99 +    string encoded_text = slurp("test_mails/priv_key_attach.eml");
  12.100 +
  12.101 +    cout << "Starting test..." << endl;
  12.102 +    // Case 1:
  12.103 +    // Same address, same user_id, untrusted
  12.104 +    cout << "decrypt with attached private key: Same address, same user_id, trusted" << endl;
  12.105 +    char* decrypted_text = NULL;
  12.106 +    stringlist_t* keylist_used = NULL;
  12.107 +    PEP_rating rating;
  12.108 +    PEP_decrypt_flags_t flags;
  12.109 +    
  12.110 +    cout << "Trusting personal key for " << same_addr_same_uid->user_id << " and " << same_addr_same_uid->fpr << endl;
  12.111 +    status = trust_personal_key(session, same_addr_same_uid);
  12.112 +    cout << "Status is " << tl_status_string(status) << endl;  
  12.113 +    assert(status == PEP_STATUS_OK);
  12.114 +    free(decrypted_text);
  12.115 +    decrypted_text = NULL;
  12.116 +
  12.117 +    status = get_trust(session, same_addr_same_uid);
  12.118 +    cout << tl_ct_string(same_addr_same_uid->comm_type) << endl;
  12.119 +    
  12.120 +    assert(same_addr_same_uid->comm_type == PEP_ct_pEp);
  12.121 +    
  12.122 +    status = MIME_decrypt_message(session, encoded_text.c_str(), 
  12.123 +                                  encoded_text.size(), &decrypted_text, 
  12.124 +                                  &keylist_used, &rating, &flags);
  12.125 +
  12.126 +    status = get_trust(session, same_addr_same_uid);
  12.127 +    assert(same_addr_same_uid->comm_type == PEP_ct_pEp);
  12.128 +    
  12.129 +    status = MIME_decrypt_message(session, encoded_text.c_str(), 
  12.130 +                                  encoded_text.size(), &decrypted_text, 
  12.131 +                                  &keylist_used, &rating, &flags);
  12.132 +    
  12.133 +    cout << "Status: " << tl_status_string(status) << endl;
  12.134 +    assert(status == PEP_STATUS_OK);
  12.135 +
  12.136 +    cout << decrypted_text << endl;
  12.137 +    
  12.138 +    has_priv = false;
  12.139 +    status = contains_priv_key(session, fpr_same_addr_same_uid, &has_priv);
  12.140 +    assert(has_priv == true);
  12.141 +    cout << "Private key was also imported." << endl;
  12.142 +    
  12.143 +    cout << "PASS!" << endl;
  12.144 +    status = key_reset_trust(session, main_me);      
  12.145 +    status = key_reset_trust(session, same_addr_same_uid);      
  12.146 +    release(session);
  12.147 +    
  12.148 +    return 0;
  12.149 +}
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/test/decrypt_attach_private_key_untrusted_test.cc	Mon Apr 16 12:45:09 2018 +0200
    13.3 @@ -0,0 +1,125 @@
    13.4 +// This file is under GNU General Public License 3.0
    13.5 +// see LICENSE.txt
    13.6 +
    13.7 +#include <stdlib.h>
    13.8 +#include <string.h>
    13.9 +#include "platform.h"
   13.10 +#include <iostream>
   13.11 +#include <fstream>
   13.12 +#include <assert.h>
   13.13 +#include "mime.h"
   13.14 +#include "message_api.h"
   13.15 +#include "keymanagement.h"
   13.16 +#include "test_util.h"
   13.17 +
   13.18 +using namespace std;
   13.19 +
   13.20 +int main() {
   13.21 +    cout << "\n*** decrypt_attach_private_key_untrusted_test ***\n\n";
   13.22 +
   13.23 +    PEP_SESSION session;
   13.24 +    
   13.25 +    cout << "calling init()\n";
   13.26 +    PEP_STATUS status1 = init(&session);
   13.27 +    assert(status1 == PEP_STATUS_OK);
   13.28 +    assert(session);
   13.29 +    cout << "init() completed.\n";
   13.30 +
   13.31 +    const char* own_uid = PEP_OWN_USERID;
   13.32 +
   13.33 +    cout << "Importing keys..." << endl;
   13.34 +    
   13.35 +    string input_key;
   13.36 +    const char* main_addr = "priv-key-import-test-main@darthmama.cool";
   13.37 +    pEp_identity* main_me = NULL;
   13.38 +    const char* fpr_main_me = "13A9F97964A2B52520CAA40E51BCA783C065A213";    
   13.39 +    pEp_identity* same_addr_same_uid = NULL;
   13.40 +    const char* fpr_same_addr_same_uid = "8AB616A3BD51DEF714B5E688EFFB540C3276D2E5";
   13.41 +        
   13.42 +    PEP_STATUS status = PEP_STATUS_OK;
   13.43 +
   13.44 +    // key for main own user
   13.45 +    // 
   13.46 +    // 13A9F97964A2B52520CAA40E51BCA783C065A213    
   13.47 +    input_key = slurp("test_keys/pub/priv-key-import-test-main_0-0xC065A213_pub.asc");
   13.48 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   13.49 +    assert(status == PEP_STATUS_OK);
   13.50 +
   13.51 +    input_key = slurp("test_keys/priv/priv-key-import-test-main_0-0xC065A213_priv.asc");
   13.52 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   13.53 +    assert(status == PEP_STATUS_OK);
   13.54 +
   13.55 +    // ensure there's no private key - doesn't work in automated tests, sadly. Uncommon when running script manually.
   13.56 +    bool has_priv = false;
   13.57 +    // status = contains_priv_key(session, fpr_same_addr_same_uid, &has_priv);
   13.58 +    // if (status == PEP_STATUS_OK && has_priv) {
   13.59 +    //     cout << "SORRY, have to delete keys here to run test correctly..." << endl;
   13.60 +    //     status = delete_keypair(session, fpr_same_addr_same_uid);
   13.61 +    //     if (status == PEP_STATUS_OK)
   13.62 +    //         cout << "Successfully deleted keypair for " << fpr_same_addr_same_uid << " - will now import the public key only" << endl;
   13.63 +    // }
   13.64 +        
   13.65 +    // key with same address and user_id
   13.66 +    // 8AB616A3BD51DEF714B5E688EFFB540C3276D2E5
   13.67 +    input_key = slurp("test_keys/pub/priv-key-import-test-main_0-0x3276D2E5_pub.asc");
   13.68 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   13.69 +    assert(status == PEP_STATUS_OK);
   13.70 +
   13.71 +    
   13.72 +    cout << "Setting up own identity with default key " << fpr_main_me << endl;
   13.73 +    // Own identity with default key etc
   13.74 +    main_me = new_identity(main_addr, fpr_main_me, own_uid, "PrivateKey Import Test");
   13.75 +    status = set_own_key(session, main_me, fpr_main_me);
   13.76 +    assert(status == PEP_STATUS_OK);
   13.77 +
   13.78 +    assert(strcmp(main_me->fpr, fpr_main_me) == 0);
   13.79 +    cout << "Done!" << endl << endl;
   13.80 +    
   13.81 +    cout << "Setting up sender identities and resetting key trust." << endl;
   13.82 +    cout << "Same address, same user_id - address: " << main_addr << ", user_id: " << own_uid << ", fpr: " << fpr_same_addr_same_uid << endl;  
   13.83 +    same_addr_same_uid = new_identity(main_addr, fpr_same_addr_same_uid, own_uid, "PrivateKey Import Test");
   13.84 +    assert(status == PEP_STATUS_OK || status == PEP_CANNOT_FIND_IDENTITY);
   13.85 +    assert((same_addr_same_uid->comm_type & PEP_ct_confirmed) != PEP_ct_confirmed);
   13.86 +
   13.87 +    status = key_reset_trust(session, same_addr_same_uid);
   13.88 +    
   13.89 +    cout << "Done!" << endl << endl;
   13.90 +
   13.91 +    cout << "Reading in message..." << endl;
   13.92 +    
   13.93 +    string encoded_text = slurp("test_mails/priv_key_attach.eml");
   13.94 +
   13.95 +    cout << "Starting tests..." << endl;
   13.96 +    // Case 1:
   13.97 +    // Same address, same user_id, untrusted
   13.98 +    cout << "Same address, same user_id, untrusted" << endl;
   13.99 +    char* decrypted_text = NULL;
  13.100 +    stringlist_t* keylist_used = NULL;
  13.101 +    PEP_rating rating;
  13.102 +    PEP_decrypt_flags_t flags;
  13.103 +    
  13.104 +    status = get_trust(session, same_addr_same_uid);
  13.105 +    cout << tl_ct_string(same_addr_same_uid->comm_type) << endl;
  13.106 +    
  13.107 +    assert((same_addr_same_uid->comm_type & PEP_ct_confirmed) != PEP_ct_confirmed);
  13.108 +    
  13.109 +    status = MIME_decrypt_message(session, encoded_text.c_str(), 
  13.110 +                                  encoded_text.size(), &decrypted_text, 
  13.111 +                                  &keylist_used, &rating, &flags);
  13.112 +
  13.113 +    status = get_trust(session, same_addr_same_uid);
  13.114 +    assert(same_addr_same_uid->comm_type == PEP_ct_pEp_unconfirmed);
  13.115 +
  13.116 +    cout << "Case 1 Status: " << tl_status_string(status) << endl; 
  13.117 +    cout << "Private key is not trusted for " << same_addr_same_uid->fpr << ", as desired, as the public key was not trusted." << endl;
  13.118 +    cout << "PASS!" << endl;
  13.119 +
  13.120 +    // Case 2:
  13.121 +    cout << decrypted_text << endl;
  13.122 +    
  13.123 +    status = key_reset_trust(session, main_me);      
  13.124 +    status = key_reset_trust(session, same_addr_same_uid);      
  13.125 +    release(session);
  13.126 +    
  13.127 +    return 0;
  13.128 +}
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/test/encrypt_attach_private_key_test.cc	Mon Apr 16 12:45:09 2018 +0200
    14.3 @@ -0,0 +1,292 @@
    14.4 +// This file is under GNU General Public License 3.0
    14.5 +// see LICENSE.txt
    14.6 +
    14.7 +#include <stdlib.h>
    14.8 +#include <string.h>
    14.9 +#include "platform.h"
   14.10 +#include <iostream>
   14.11 +#include <fstream>
   14.12 +#include <assert.h>
   14.13 +#include "mime.h"
   14.14 +#include "message_api.h"
   14.15 +#include "keymanagement.h"
   14.16 +#include "test_util.h"
   14.17 +
   14.18 +using namespace std;
   14.19 +
   14.20 +int main() {
   14.21 +    cout << "\n*** encrypt_attach_private_key_test ***\n\n";
   14.22 +
   14.23 +    PEP_SESSION session;
   14.24 +    
   14.25 +    cout << "calling init()\n";
   14.26 +    PEP_STATUS status1 = init(&session);
   14.27 +    assert(status1 == PEP_STATUS_OK);
   14.28 +    assert(session);
   14.29 +    cout << "init() completed.\n";
   14.30 +
   14.31 +    const char* own_uid = PEP_OWN_USERID;
   14.32 +    const char* diff_uid_0 = "TASTY_TEST_UID_0";
   14.33 +    const char* diff_uid_1 = "TASTY_TEST_UID_1";
   14.34 +
   14.35 +    cout << "Importing keys..." << endl;
   14.36 +    
   14.37 +    string input_key;
   14.38 +    const char* main_addr = "priv-key-import-test-main@darthmama.cool";
   14.39 +    pEp_identity* main_me = NULL;
   14.40 +    const char* fpr_main_me = "8AB616A3BD51DEF714B5E688EFFB540C3276D2E5";
   14.41 +    pEp_identity* same_addr_same_uid = NULL;
   14.42 +    const char* fpr_same_addr_same_uid = "359DD8AC87D1F5E4304D08338D7185F180C8CD87";
   14.43 +    
   14.44 +    pEp_identity* same_addr_diff_uid = NULL;
   14.45 +    const char* fpr_same_addr_diff_uid = "B044B83639E292283A3F6E14C2E64B520B74809C";
   14.46 +
   14.47 +    const char* diff_addr_0 = "priv-key-import-test-other_0@darthmama.cool";
   14.48 +    pEp_identity* diff_addr_same_uid = NULL;
   14.49 +    const char* fpr_diff_addr_same_uid = "C52911EBA0D34B0F549594A15A7A363BD11252C9";
   14.50 +    
   14.51 +    const char* diff_addr_1 = "priv-key-import-test-other_1@darthmama.cool";
   14.52 +    pEp_identity* diff_addr_diff_uid = NULL;
   14.53 +    const char* fpr_diff_addr_diff_uid = "567212EFB8A3A76B1D32B9565F45BEA9C785F20A";
   14.54 +    
   14.55 +    PEP_STATUS status = PEP_STATUS_OK;
   14.56 +
   14.57 +    // key for main own user
   14.58 +    // 8AB616A3BD51DEF714B5E688EFFB540C3276D2E5
   14.59 +    input_key = slurp("test_keys/pub/priv-key-import-test-main_0-0x3276D2E5_pub.asc");
   14.60 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   14.61 +    assert(status == PEP_STATUS_OK);
   14.62 +
   14.63 +    input_key = slurp("test_keys/priv/priv-key-import-test-main_0-0x3276D2E5_priv.asc");
   14.64 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   14.65 +    assert(status == PEP_STATUS_OK);
   14.66 +        
   14.67 +    // key with same address and user_id (initially untrusted, then trusted)
   14.68 +    // 359DD8AC87D1F5E4304D08338D7185F180C8CD87
   14.69 +    input_key = slurp("test_keys/pub/priv-key-import-test-main_1-0x80C8CD87_pub.asc");
   14.70 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   14.71 +    assert(status == PEP_STATUS_OK);
   14.72 +
   14.73 +    // key with same address and to have different (non-aliased) user_id (initially untrusted, then trusted)
   14.74 +    // B044B83639E292283A3F6E14C2E64B520B74809C
   14.75 +    input_key = slurp("test_keys/pub/priv-key-import-test-main_2-0x0B74809C_pub.asc");
   14.76 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   14.77 +    assert(status == PEP_STATUS_OK);
   14.78 +
   14.79 +    // key with different address to have same user_id (initially untrusted, then trusted)
   14.80 +    // C52911EBA0D34B0F549594A15A7A363BD11252C9
   14.81 +    input_key = slurp("test_keys/pub/priv-key-import-test-other_0-0xD11252C9_pub.asc");
   14.82 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   14.83 +    assert(status == PEP_STATUS_OK);
   14.84 +        
   14.85 +    // key with different address to have different user_id (initially untrusted, then trusted)
   14.86 +    // 567212EFB8A3A76B1D32B9565F45BEA9C785F20A
   14.87 +    input_key = slurp("test_keys/pub/priv-key-import-test-other_1-0xC785F20A_pub.asc");
   14.88 +    status = import_key(session, input_key.c_str(), input_key.length(), NULL);
   14.89 +    assert(status == PEP_STATUS_OK);
   14.90 +    cout << "Done!" << endl << endl;
   14.91 +    
   14.92 +    cout << "Setting up own identity with default key " << fpr_main_me << endl;
   14.93 +    // Own identity with default key etc
   14.94 +    main_me = new_identity(main_addr, fpr_main_me, own_uid, "PrivateKey Import Test");
   14.95 +    status = set_own_key(session, main_me, fpr_main_me);
   14.96 +    assert(status == PEP_STATUS_OK);
   14.97 +
   14.98 +    assert(strcmp(main_me->fpr, fpr_main_me) == 0);
   14.99 +    cout << "Done!" << endl << endl;
  14.100 +    
  14.101 +    cout << "Setting up recipient identities and resetting key trust." << endl;
  14.102 +    cout << "#1: same address, same user_id - address: " << main_addr << ", user_id: " << own_uid << ", fpr: " << fpr_same_addr_same_uid << endl;  
  14.103 +    // Identity with same address and user_id - the fpr here will be ignored in update_identity and friends.
  14.104 +    same_addr_same_uid = new_identity(main_addr, fpr_same_addr_same_uid, own_uid, "PrivateKey Import Test");
  14.105 +    status = key_reset_trust(session, same_addr_same_uid);
  14.106 +    assert(status == PEP_STATUS_OK || status == PEP_CANNOT_FIND_IDENTITY);
  14.107 +    assert(strcmp(same_addr_same_uid->fpr, fpr_same_addr_same_uid) == 0);
  14.108 +    
  14.109 +    // Identity with same address and different user_id
  14.110 +    cout << "#2: same address, different user_id - address: " << main_addr << ", user_id: " << diff_uid_0 << ", fpr: " << fpr_same_addr_diff_uid << endl;  
  14.111 +    same_addr_diff_uid = new_identity(main_addr, fpr_same_addr_diff_uid, diff_uid_0, "PrivateKey Import Test");
  14.112 +    assert(same_addr_diff_uid);
  14.113 +    status = key_reset_trust(session, same_addr_diff_uid);
  14.114 +    assert(status == PEP_STATUS_OK || status == PEP_CANNOT_FIND_IDENTITY);
  14.115 +    assert(strcmp(same_addr_diff_uid->fpr, fpr_same_addr_diff_uid) == 0);
  14.116 +    
  14.117 +    // Identity with diff address and same user_id
  14.118 +    cout << "#3: different address, same user_id - address: " << diff_addr_0 << ", user_id: " << own_uid << ", fpr: " << fpr_diff_addr_same_uid << endl;      
  14.119 +    diff_addr_same_uid = new_identity(diff_addr_0, fpr_diff_addr_same_uid, own_uid, "PrivateKey Import Test");
  14.120 +    assert(diff_addr_same_uid);
  14.121 +    status = key_reset_trust(session, diff_addr_same_uid);
  14.122 +    assert(status == PEP_STATUS_OK || status == PEP_CANNOT_FIND_IDENTITY);
  14.123 +    assert(strcmp(diff_addr_same_uid->fpr, fpr_diff_addr_same_uid) == 0);
  14.124 +
  14.125 +    // Identity with different address and different user_id
  14.126 +    cout << "#4: different address, different user_id - address: " << diff_addr_1 << ", user_id: " << diff_uid_1 << ", fpr: " << fpr_diff_addr_diff_uid << endl;      
  14.127 +    diff_addr_diff_uid = new_identity(diff_addr_1, fpr_diff_addr_diff_uid, diff_uid_1, "PrivateKey Import Test");
  14.128 +    assert(diff_addr_diff_uid);
  14.129 +    status = key_reset_trust(session, diff_addr_diff_uid);
  14.130 +    assert(status == PEP_STATUS_OK || status == PEP_CANNOT_FIND_IDENTITY);
  14.131 +    assert(strcmp(diff_addr_diff_uid->fpr, fpr_diff_addr_diff_uid) == 0);
  14.132 +    cout << "Done!" << endl << endl;
  14.133 +
  14.134 +    message* msg_same_addr_same_uid = new_message(PEP_dir_outgoing);
  14.135 +    msg_same_addr_same_uid->from = main_me;
  14.136 +    msg_same_addr_same_uid->shortmsg = strdup("Greetings, humans!");
  14.137 +    msg_same_addr_same_uid->longmsg = strdup("This is a test of the emergency message system. This is only a test. BEEP.");
  14.138 +    msg_same_addr_same_uid->attachments = new_bloblist(NULL, 0, "application/octet-stream", NULL);
  14.139 +
  14.140 +    message* msg_same_addr_diff_uid = message_dup(msg_same_addr_same_uid);
  14.141 +    message* msg_diff_addr_same_uid = message_dup(msg_same_addr_same_uid);       
  14.142 +    message* msg_diff_addr_diff_uid = message_dup(msg_same_addr_same_uid);       
  14.143 +
  14.144 +    cout << "Starting tests..." << endl;
  14.145 +    // Case 1:
  14.146 +    // Same address, same user_id, untrusted
  14.147 +    cout << "Case 1: Same address, same user_id, untrusted" << endl;
  14.148 +    assert(msg_same_addr_same_uid);        
  14.149 +    identity_list* to_list = new_identity_list(same_addr_same_uid);
  14.150 +    msg_same_addr_same_uid->to = to_list;
  14.151 +    message* enc_same_addr_same_uid_untrusted = NULL;
  14.152 +    status = encrypt_message_and_add_priv_key(session,
  14.153 +                                              msg_same_addr_same_uid,
  14.154 +                                              &enc_same_addr_same_uid_untrusted,
  14.155 +                                              fpr_same_addr_same_uid,
  14.156 +                                              PEP_enc_PGP_MIME,
  14.157 +                                              0);
  14.158 +
  14.159 +    cout << "Case 1 Status: " << tl_status_string(status) << endl;
  14.160 +    assert(status == PEP_ILLEGAL_VALUE);
  14.161 +    cout << "PASS!" << endl;
  14.162 +    
  14.163 +    // Case 2:
  14.164 +    // Same address, same_user_id, trusted
  14.165 +    cout << "Case 2: Same address, same user_id, trusted" << endl;
  14.166 +    status = trust_personal_key(session, same_addr_same_uid);
  14.167 +    assert(status == PEP_STATUS_OK);
  14.168 +    message* enc_same_addr_same_uid_trusted = NULL;
  14.169 +    status = encrypt_message_and_add_priv_key(session,
  14.170 +                                              msg_same_addr_same_uid,
  14.171 +                                              &enc_same_addr_same_uid_trusted,
  14.172 +                                              fpr_same_addr_same_uid,
  14.173 +                                              PEP_enc_PGP_MIME,
  14.174 +                                              0);
  14.175 +
  14.176 +    cout << "Case 2 Status: " << tl_status_string(status) << endl;
  14.177 +    assert(status == PEP_STATUS_OK);
  14.178 +    cout << "PASS!" << endl;
  14.179 +
  14.180 +    // Case 3:
  14.181 +    // Different address, same user_id, untrusted
  14.182 +    cout << "Case 3: Different address, same user_id, untrusted" << endl;
  14.183 +    assert(msg_diff_addr_same_uid);        
  14.184 +    identity_list* to_list_1 = new_identity_list(diff_addr_same_uid);
  14.185 +    msg_diff_addr_same_uid->to = to_list_1;
  14.186 +    message* enc_diff_addr_same_uid_untrusted = NULL;
  14.187 +    status = encrypt_message_and_add_priv_key(session,
  14.188 +                                              msg_diff_addr_same_uid,
  14.189 +                                              &enc_diff_addr_same_uid_untrusted,
  14.190 +                                              fpr_diff_addr_same_uid,
  14.191 +                                              PEP_enc_PGP_MIME,
  14.192 +                                              0);
  14.193 +    
  14.194 +    cout << "Case 3 Status: " << tl_status_string(status) << endl;
  14.195 +    assert(status == PEP_ILLEGAL_VALUE);
  14.196 +    cout << "PASS!" << endl;
  14.197 +
  14.198 +    // Case 4:
  14.199 +    // Different address, same user_id, trusted
  14.200 +    cout << "Case 4: Different address, same user_id, trusted" << endl;
  14.201 +    status = trust_personal_key(session, diff_addr_same_uid);
  14.202 +    assert(status == PEP_STATUS_OK);
  14.203 +    message* enc_diff_addr_same_uid_trusted = NULL;
  14.204 +    status = encrypt_message_and_add_priv_key(session,
  14.205 +                                              msg_diff_addr_same_uid,
  14.206 +                                              &enc_diff_addr_same_uid_trusted,
  14.207 +                                              fpr_diff_addr_same_uid,
  14.208 +                                              PEP_enc_PGP_MIME,
  14.209 +                                              0);
  14.210 +                                              
  14.211 +    cout << "Case 4 Status: " << tl_status_string(status) << endl;
  14.212 +    assert(status == PEP_ILLEGAL_VALUE);
  14.213 +    cout << "PASS!" << endl;
  14.214 +
  14.215 +    // Case 5:
  14.216 +    // Same address, different user_id, untrusted
  14.217 +    cout << "Case 5: Same address, different user_id, untrusted" << endl;    
  14.218 +    assert(msg_same_addr_diff_uid);        
  14.219 +    identity_list* to_list_2 = new_identity_list(same_addr_diff_uid);
  14.220 +    msg_same_addr_diff_uid->to = to_list_2;
  14.221 +    message* enc_same_addr_diff_uid_untrusted = NULL;
  14.222 +    status = encrypt_message_and_add_priv_key(session,
  14.223 +                                              msg_same_addr_diff_uid,
  14.224 +                                              &enc_same_addr_diff_uid_untrusted,
  14.225 +                                              fpr_same_addr_diff_uid,
  14.226 +                                              PEP_enc_PGP_MIME,
  14.227 +                                              0);
  14.228 +
  14.229 +    cout << "Case 5 Status: " << tl_status_string(status) << endl;
  14.230 +    assert(status == PEP_ILLEGAL_VALUE);    
  14.231 +    cout << "PASS!" << endl;
  14.232 +    
  14.233 +    // Case 6:
  14.234 +    // Same address, different user_id, trusted
  14.235 +    cout << "Case 6: Same address, different user_id, trusted" << endl;        
  14.236 +    status = trust_personal_key(session, same_addr_diff_uid);
  14.237 +    assert(status == PEP_STATUS_OK);
  14.238 +    message* enc_same_addr_diff_uid_trusted = NULL;
  14.239 +    status = encrypt_message_and_add_priv_key(session,
  14.240 +                                              msg_same_addr_diff_uid,
  14.241 +                                              &enc_same_addr_diff_uid_untrusted,
  14.242 +                                              fpr_same_addr_diff_uid,
  14.243 +                                              PEP_enc_PGP_MIME,
  14.244 +                                              0);
  14.245 +
  14.246 +    cout << "Case 6 Status: " << tl_status_string(status) << endl;
  14.247 +    assert(status == PEP_ILLEGAL_VALUE);    
  14.248 +    cout << "PASS!" << endl;
  14.249 +
  14.250 +    // Case 7:
  14.251 +    // Different address, different user_id, untrusted
  14.252 +    cout << "Case 7: Different address, different user_id, untrusted" << endl;    
  14.253 +    assert(msg_diff_addr_diff_uid);        
  14.254 +    identity_list* to_list_3 = new_identity_list(diff_addr_diff_uid);
  14.255 +    msg_diff_addr_diff_uid->to = to_list_3;
  14.256 +    message* enc_diff_addr_diff_uid_untrusted = NULL;
  14.257 +    status = encrypt_message_and_add_priv_key(session,
  14.258 +                                              msg_diff_addr_diff_uid,
  14.259 +                                              &enc_diff_addr_diff_uid_untrusted,
  14.260 +                                              fpr_diff_addr_diff_uid,
  14.261 +                                              PEP_enc_PGP_MIME,
  14.262 +                                              0);
  14.263 +
  14.264 +    cout << "Case 7 Status: " << tl_status_string(status) << endl;
  14.265 +    assert(status == PEP_ILLEGAL_VALUE);
  14.266 +    cout << "PASS!" << endl;
  14.267 +
  14.268 +    // Case 8:
  14.269 +    // Different address, different user_id, trusted
  14.270 +    cout << "Case 8: Different address, different user_id, trusted" << endl;    
  14.271 +    status = trust_personal_key(session, diff_addr_diff_uid);
  14.272 +    assert(status == PEP_STATUS_OK);
  14.273 +    message* enc_diff_addr_diff_uid_trusted = NULL;
  14.274 +    status = encrypt_message_and_add_priv_key(session,
  14.275 +                                              msg_diff_addr_diff_uid,
  14.276 +                                              &enc_diff_addr_diff_uid_trusted,
  14.277 +                                              fpr_diff_addr_diff_uid,
  14.278 +                                              PEP_enc_PGP_MIME,
  14.279 +                                              0);
  14.280 +
  14.281 +    cout << "Case 8 Status: " << tl_status_string(status) << endl;
  14.282 +    assert(status == PEP_ILLEGAL_VALUE);
  14.283 +    cout << "PASS!" << endl;
  14.284 +    
  14.285 +    cout << "Correctly encrypted message:" << endl << endl;                
  14.286 +    char* encrypted_msg_text = NULL;
  14.287 +    mime_encode_message(enc_same_addr_same_uid_trusted, false, &encrypted_msg_text);                                    
  14.288 +    cout << encrypted_msg_text << endl << endl;
  14.289 +    
  14.290 +    // FIXME: Free all the damned things
  14.291 +      
  14.292 +    release(session);
  14.293 +    
  14.294 +    return 0;
  14.295 +}
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/test/test_keys/priv/priv-key-import-test-main_0-0x3276D2E5_priv.asc	Mon Apr 16 12:45:09 2018 +0200
    15.3 @@ -0,0 +1,63 @@
    15.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    15.5 +
    15.6 +lQOYBFrPrZIBCAD7Xnh/WJda9mBwu9lAkJ9ON1KCo9JFvjw89TKA3nOT55NKMUjE
    15.7 +4D5pZm0DhipUBSB6ylVC+FkxdTydeqHeV4/ktBITi/hc5qiMPt0fVS9jlX2rUl2z
    15.8 +vvXmAX5erHx6bXkptbZdOtCOr1hRzU3An/KODdyAcIRClBYkeR1sB4/dLvfqLAMQ
    15.9 +UpoimWQrzS9+AOtU5tMGFjmhjF3T+cRXdL5zgPaIGzt9oV3dHZYgGGSgDxXNFK1D
   15.10 +4jUv2AsyZYL4qLnWvZlbBHvaTbbsP+K5xXI6VpzPWEIHT4v4j0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gPHByaXYta2V5LWlt
   15.26 +cG9ydC10ZXN0LW1haW5AZGFydGhtYW1hLmNvb2w+iQE4BBMBCgAiBQJaz62SAhsv
   15.27 +BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRDv+1QMMnbS5UI+B/0VACN9je7R
   15.28 +pO+mJpK77Rt6h9Y1qzBOJxGxgErdzq1WG1/igKMlSbAlJwb/tT7XD44c/dN+OD8+
   15.29 +JOEzmQEWbQ6Jvu/7SIvqt2iGhSkxGQFLdR9YMt7vGmCB/qxza4jwTSK8vfBymb/2
   15.30 +rgYLNT/MZTl7trkQg9n2f3DGle34R+fepY8HU/xXTRK+gevyjbRIP1/QuL75tKoD
   15.31 +ldhRV6YNcinT0gpyN2Ld6KoCXnGB73HJUqisL8S12AHhr4o1bJVW1pA4HFobTV59
   15.32 +2Z6gDopc4WuEFX1UqvX5YWKMu1nmEWLBuYS4I9HejC3KocBEmJFicG/FEF+D22zM
   15.33 +1AiUnoZfKOgwnQOYBFrPrZIBCADDNpQPiXKiYYBxe/peYRgYT2CH4r+j14mU9Sm2
   15.34 +ZDQTqp9oig3T1u02m1XoBFMoV9NpcN6L3r7/Xs9xXTQusumcPy5CO8snL+DLpeS9
   15.35 +yuvquzsWKAUc4MxGoo/Kubuot7GDEXH7TXvbrWSSFGnsWITrvEXvLC5wb4THMYsF
   15.36 +CS7uZM2TNE5UcDkY69xOa53ivjRrR/YHTOOwrh2EaPRUasfqBse5GRXbamzi6Lrq
   15.37 +qy+4Q/QJ/OoWyCKCXcrpw8anUc7AWomJ0U0NQV6YVykjE78QgcO4jcG54/ow8N48
   15.38 +5cffCdquOTqv5gaGVZour6E1+SZvnPPkZtJivJ2P51GeHo3hABEBAAEAB/oDTkKs
   15.39 +WdkLOyWzdkR00fCC+TV4I5y4Fm5V4N9u6gw64NwqxzteoPB604n9QB/U38Tcmkd9
   15.40 +0fIvzUrBFObCm4TAILlEsEdwyiX56Nz3t6PuVrM/J9hrUbq1KlZPRL0oPq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FMIwliNKTgSBBWAqDiBcjw3
   15.56 +QKj70slZOOrKa0+YqChH2wThOHtMFoiZYXM3OSq0whAcninita0VOXopNhNxcYvJ
   15.57 +V80JWbLlTXzR5B+fMwQFndQNy04uA0HLi1ubTSipDHIxmiBK0ZyLsnwHvfmOlPG4
   15.58 +zMQAubxrda2GtPr26WQ1AW2x2v5zTbcqBYl/BaMEItYVRO6VcpTRYuHmiriAhGff
   15.59 +qTknB/9jgoPVD/YUiVgrVjNWN1aY0DZig0jrk6BSNXPW5QAMcfr3LBZ20cgQ4ved
   15.60 +9IOh66wnxvPi2LMXB8SWyeSO0LMql75Keh61GLqh8FyZP7yxUAhodyVdic5R/ALA
   15.61 +U5S9Eve1Fw72YPOmAAYrjcDlKy2P1yxAZnyU9yDsmPXMSxCb75mGsAcCqsjZzyBn
   15.62 +mXKU3TES6Yl3JF11oV9romIPZOk4sqHDXozS9BOdxu0IyXmvUJorlpNnP5HIQELf
   15.63 +rhRiYx+QwBpSmNAyUseRizvdXmzdrvDrIEgyV4cyFIRFbRZKxTJ6ecGmC5P5+g7w
   15.64 +k4Ovdx8fotrONgZ5tXgu7cF/HLZw
   15.65 +=l1fW
   15.66 +-----END PGP PRIVATE KEY BLOCK-----
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/test/test_keys/priv/priv-key-import-test-main_0-0xC065A213_priv.asc	Mon Apr 16 12:45:09 2018 +0200
    16.3 @@ -0,0 +1,63 @@
    16.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    16.5 +
    16.6 +lQOYBFrQoQUBCADZri/DgdFOns76UcS+fWryl/wOWTeWOTT5PntcYf+XcU+vNe0R
    16.7 +O7G0xZMP9udyj1amV7cydlxafX1CIL1KNXlQGg5vXNd3Kdw9Jp5EfLjrr36g8+1P
    16.8 +jlXemFRKpqpcOQd/IEj/wrF9kQRAl/UIyLY7uGl9SA9KSgVn3rUhuCH++sLZuPkg
    16.9 +uIaAGstGbe/0Ua1+OEdWFVefTvti9T6aA01KEN3pVmWmqS0xPWa+2EYCoWGc4ONW
   16.10 +KG2nT0CP2Fyk3an/nbCtKhUjE5aneFHlFHb+vf+fChejq1VwbjIAGEKwI48JFlqy
   16.11 +q67T6srlly12U40OsiMOL583RCIXzx0GN01HABEBAAEAB/9Qkpr3YNvaoAm4uf97
   16.12 +Cu1FMmCH5xoeLrqe7zO2NEfpBHYcQneng1L5uJAAvsFYtBm8pIcY1JrGm+B7U6b9
   16.13 +CuIGdj6VleXjI8lzkRHQA+JmyqSyateSNPsv026P2zT/wdQ2h/q9QJF2CvFp/1Uh
   16.14 +lTluzYmuZ7fRJajuk460FnXu7K/kMThI/myeuA7kNKU2cGnj6HdJ/qDalt7rU8OM
   16.15 +Zj95HwNj9R7JIm4oEev6W4AN5ujioAHD3n2942MSBG6QKOTBVBcGktoVfJPu1GV9
   16.16 +UPwJOgD7PfzTkZlsh1ckBVO6dV1ccmlXfH23Y804WfTlZRp2XSFfWYfYiNO++8Fu
   16.17 +FtRhBADqjiWtxcuLaKM2a9Vq09d+Ps8AZnXNURYQvyQR8T6U7YNC+KpoMwAZDTdW
   16.18 +mhSOJPV2L+Gvph0qYhgfsVkK4oTs1RbyLGI67k52o3y60IWS8A9dJ4W9X4XlGnjt
   16.19 +ay8gpokr4Hk90wCC6j+ZFLCnG0vZqAMa7VZRlw4vGJoHD3UwqQQA7ZUTznHsmuBf
   16.20 +RV0/4Q4Y9v7ilZLh49ODLJhu+mHKJVc6rDHoDRbHgCMYG8qac2cmE0z9d5E50+M/
   16.21 +mmKbmIs+UzsFzRoJK3vD3WOHNLTLEnfa6euMy2FaYmd35i3oBFfP33pBffF79wAL
   16.22 +8KiowRSedzCn0O4Opc7OgOspWKQKFG8EAMAsMhtzzHrinJ3APnZ4hWiK6Ki/W12e
   16.23 +B9OFpUU6r7hEgh+5dL3/L+DIVn/q+9Y0IFuBgszG56FiXBGTMJXbYNJRgZDheU2D
   16.24 +e39JhzCpgDprfRKv3fHYp5qVLH2dXEGKAST1Awc+vabRumuBoHf8ulyPMbnGUSKv
   16.25 +knP1mmQraHvRRMG0SVByaXZLZXkgUmVjaXBpZW50IFN0cmlrZXMgQmFjayA8cHJp
   16.26 +di1rZXktaW1wb3J0LXRlc3QtbWFpbkBkYXJ0aG1hbWEuY29vbD6JATcEEwEKACIF
   16.27 +AlrQoQUCGy8GCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEFG8p4PAZaIT8XkH
   16.28 +9RKpLdjYSxjRJYL+aWdbiaUHPgTISqpmXQfQiHZJL7nzORrQY3l08bN+4ZbzBJLa
   16.29 +xmrfwlsUhbttwXuD9HzBGcpkfERlyin52jUDBJULvU4DDfFP0pRNVPvVG3Wa7eff
   16.30 +6PE5akGoDgbEjv344FDbfLYYdcUDL65VYiL7zUBRxN0Xas9r7UZa1xSm9+juWNmJ
   16.31 +4b9oTMnbWwSY8bx/AQBq3kWRPM0pguFk6eGyq9AKLGUbvywc5VSHOA3Lu67vD6bA
   16.32 +aDubdw+PTsuFdlOP25gtZRIy/5ioeQn0FNwv7q5/R9UeGtC8h8EBF1a8ivBFRh/a
   16.33 +MTcBJLVIiQz9ou7xlfYoep0DmARa0KEFAQgA34g3wG+pq0ek1EVZuBFAGNGASXAD
   16.34 +L4uDOFJAy7HmRqrW1qJz7ZvJcOCN6g5LJQ1pFPJAsaN2VBB7hNNF9z0lQDp2Y8iP
   16.35 +Z3D9ls2Y1KIEibV1mrgXmAac4mF391HFyzUtuEV6I0XVSZsHy73VR4DX+r/AUFYa
   16.36 +C9jYwTHlIjgqXEAO+SAncwHyfDUUtLEECYfcvsAUk+8bLyZgo/OL3W71Xed+5stc
   16.37 +Ra7NvmKnkY0UysYq2VheG82e04wnWWsLkwTPvRXc92VnOTMo7RdJ6X80RumY+YT4
   16.38 +Sju4WGHc4NVBolXLqvn5n8xYjwPokg2t0sbXJvlxjlfuoiVKtBcYY6mLXwARAQAB
   16.39 +AAf+JTmoHzH5TX7W4krSUCb/R6LL/G7c+PQA3EZGaCWuNaKJuKDBMZa6C0Q6HfpX
   16.40 +ZUpAb66QO4T/VayRBWOxySSzqWiTArcJuq5EbPK8OtzoaI6BkUyLEVQ4mDKnKdbC
   16.41 +W771aDSZzHn6tRFOUQ3CEPBSB34bZsWP/N0V68aFZBd6ZnYs20SRIE7hB12mCpms
   16.42 +azHKmX/S2v1gOZ1bjuEoKAgI8JLhPuaR7Cw5+jL7z/8EvQZjzfo06icxyhH0R43b
   16.43 +lFSmkp2pu0iEajK6m96Dk/a/E29WriFpBmMMFQ5KngH+MwQXC30YWLxtsx5GvMu4
   16.44 +CUme/c/r98Z8bFclyV2bXDZcsQQA7un99/AdRRnI4kiKTbk3SHelg1DSh6prkEkF
   16.45 +U41W1VYpqvn7q8FTCx3q8YeEHBXZ9Vfumf7kWWFjre6IDF/qAIgJFS2+fTOWuL65
   16.46 +MuvyQPidWEQWv7WybrNrAcUoAy5EdoGT6QwB6XDyVSNtg8u1dYj9J7IwtGeOzTzS
   16.47 +UcEjpwsEAO+EnYIycE25hdMvUBCZcixWPxqOHmya4dE9r/11AnnOUz9b817TTucd
   16.48 +U06TI9XBkAHMtP4KhOFmP5gEDUj89m5lyUP9M+R4MNl8Kyf2IX89omGDR33Hz0UL
   16.49 +aWxXYbXeRStTbcMhEnsjOsSqMYaP0zdQyyExteIDtesWdMAGQ9F9BACsJmK6NBzN
   16.50 +umHngv4zraJtbfDq698th8JPRbdSA4auvzOHFkQHVGhhWGHANFjY1MBSJ1qfr/EQ
   16.51 +TN5rCyNjy5VWYJxqwXbQXOdCLKBAhH9pySFfSvA9+6EP5IyK6/OzWB2pflZ8TwYa
   16.52 +k9wcxabrl5xA1StUZbIwsGTRJHpDDWKSwzukiQI+BBgBCgAJBQJa0KEFAhsuASkJ
   16.53 +EFG8p4PAZaITwF0gBBkBCgAGBQJa0KEFAAoJEHtc/VFAGHIuGsgH/0hO3DTiu/gw
   16.54 +/NP89jdP2LRV3mK/YQxOKuJP4mfqJbJ7KiBfmq7ebpaGMIGfZsaYNZ/m8/RRhmAu
   16.55 +AarthL5lpzaCbSz/7NiNml3x/Mh52+gZ5rlZ8DJ8zR3kmZanhcvr3UPL69fTY4ME
   16.56 +CWA3MoGuxrjXyoWZOw+SM1hx7tqUfWn5YaJrTlqJjqO84h2vUogneCGy7pZWvPY8
   16.57 +jqgO/3x1/mxggHyC3VnvyQnjcAGqNYO5/qlMmsyiooaa4XI+fC/EW6QCeoH5vNHe
   16.58 +tkNCU9zGJe2JMvHF9kDBhYMZtE2D7GKGnw6gEXSfWrpJri+5fWz4YzbEVz8jLhP8
   16.59 +E4WII/5+X6+V6wgAiny3ryx29MMBce8U0XAPqRiG5wdindm3UfZBNUrqPF2MwFEG
   16.60 +gWYomVYjDAfeo2kYXdNh3AhP0f8ucGWdXTmYstcuTrd9Gd9zMoez/xmvmkpPO5i3
   16.61 +V3l+jhP95PzPM+QEh+Qe0C/O5RcXaYBXEOO6V2AwiEi1hy8iXoGmaf+WQ2oyyDEC
   16.62 +be6x2N11Qg088v29VbD26c2cLMs+jsPecJZrjN3SgYg23ybAKERW/z/CQL5by3RU
   16.63 +4ahLXsRIFTQXR5Jf1gwX9WnoJDAKDavwaBVuSEK7gJDLj41ITf3Oi0JmOb0sQb6Y
   16.64 +4bhg7xfj/7Tg5HAey2fWmMZIfAqdxW+DJtJJ8g==
   16.65 +=lesn
   16.66 +-----END PGP PRIVATE KEY BLOCK-----
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/test/test_keys/priv/priv-key-import-test-main_1-0x80C8CD87_priv.asc	Mon Apr 16 12:45:09 2018 +0200
    17.3 @@ -0,0 +1,63 @@
    17.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    17.5 +
    17.6 +lQOYBFrPrZMBCADHliMZZczNc2nXrm+SwDpVekZ7Uz/m2nRRmhH7OCnvIIw4zda3
    17.7 +QDvmJbGKRnlOkAGn7+WoZcmPqu5lfJHzC02sfhqCrGaqdb7RDkYG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ip4Ca5/3+73Bf
   17.23 +e9RcK3rGgqiL16K9NgxSdBkv4xtKYHO/OLZz9o1tYji4iFegRa7+aY+ZXpEv4Vis
   17.24 +0NARKHPnDXY3EjxgjEjyD7m9nb6CceVc0LDVaiA+n9otKd4T9EhvgWl9nPtB9xUo
   17.25 +x7PnkDe6Mvu9P1C0QVByaXZhdGVLZXkgSW1wb3J0IFRlc3QgPHByaXYta2V5LWlt
   17.26 +cG9ydC10ZXN0LW1haW5AZGFydGhtYW1hLmNvb2w+iQE4BBMBCgAiBQJaz62TAhsv
   17.27 +BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRCNcYXxgMjNhzRRB/sGrf/k8xF/
   17.28 +gf/RalVtFjLzOjZ8OeR1BRDkSQuKprOTmhyhkOjJbCoUg4yem7J7bAbitTCG0UYH
   17.29 +A8d/KsawOfxFGrnK/NOv0hW64AVhqiceHK9QpVUK56uC/kgP5wNGIp95gSAQP8YI
   17.30 +myMsiln6xVnQKMTPRvZrelJIUhHek1wc0LkGZM6fqCy3iK6Dp3kU9o7sT67Rx4mv
   17.31 +BKgExlIxHc3t0XKWE85qcWnWwCFeGyTriIct+GjXQjskQsT5HGg3PjRHKlhe0/K1
   17.32 +yNDKKqtWGOyFzicRKmIZXLWGyzLw1hMaUXTuuiiCM1e3l0I1EcBhAgraCNCvLL4I
   17.33 +HMbgBLjBLSl4nQOYBFrPrZMBCADmOdxDjkODprEVGeyzezf2BALQB5GVu/dMt33g
   17.34 +atXLV5oj6Vwcwg8i71UaoMzxdWyHLOyED5yzYof0FvsJYLcTkt5uq/3hbJaF34FN
   17.35 +D5K+4wlp88mV5k3HDllyErNaVq/PoO09icJdIHNOO6sSoOkYKD1TuWR5oMotuUDF
   17.36 +rd6HZD7eYNaLQ0cvT0F66cTPa8EAAggDoWc4nJAqmIzFbICeGcNG2tgJurCgIe63
   17.37 +pGTIwwaRT//p3HWASMOIVxa80kucUCqOCCuP3wX6DOCXs9F2eoi4zGe6p3nnuWGv
   17.38 +TiH75beB6TmfflGCBvI7uDLkZkxpKD+bXNuFaGRnl4nbB/3NABEBAAEAB/9nnfL8
   17.39 +lLLeNc/NZ3WY8gQlvXhmmIF1mrua05rbvjmq4yqEryq95rlZR85NxcF3ixnlXNq2
   17.40 +NTCZq+b0fMNPXTAIpzllJhOFuZGlfwp63F93ekdqYEaCKL0osdSf+rquFgXatNsR
   17.41 +r0bDEy/SLhi4saM3NCUl4XLPKwbTvWThk3dsB1+UuXgIr4mOi0ElRyJhgQnMemkA
   17.42 +SfGqwcCV5ArT0BiyTJuCC7ZCItUmHfIl8vj/Am1uosTYaJOoJ7g+aHlk9zsqg2bU
   17.43 +ATISqumzJjQ6Ov2ge4BTzf/Mg2Kyn2+r6KOM9oDL8wEJtGt9dOR878000GQXeCts
   17.44 +JDjnybJSkWyA+48hBADutcpTJR2ENPirDNAxagCACOS99Rx+937icRIvS5UtwMEs
   17.45 +ixjunowAH8ieTykhkjZF19PQV8IUabV+sZPn/3hLk03lVX4xIkFfqyvA+i9mbcMD
   17.46 +Wp4rJUxShXfysN9+HqxRxsrcIy15FZe0Hw2Uib9zP+p+UhhVLD85FPfF6dDbdwQA
   17.47 +9ubBlwenGJsIwXlYfDMwakywXtz83ujWM/ErilS9CfBk5cKRlWxacER4fL36iuua
   17.48 +C6I5JxKB3midri9sHXkX5g1TftsDJ9+U7r5jzVVQRmmiwODMg1BhnjOCMd0aAXsY
   17.49 +7BASYR/sH0xsK7JB9tdf4TdwI21gQRaw0sIrrmWnedsEAIeHtrEoUyrJwhTcQDEB
   17.50 +s+6zD17EXvjUwtfvxnH14OsRGQKIAqiRF8ycFVcLfQj1PxIXU1R2cbCMl2nIVTWi
   17.51 +8hpMDF1uMiK5nVRe+Zy2gv/Y1VLJGT6vDQcu2Xwbvrup3oHfYsUBWT70w/JRoS0W
   17.52 +v8djnvzolYyostC0NFph3WInP3qJAj4EGAEKAAkFAlrPrZMCGy4BKQkQjXGF8YDI
   17.53 +zYfAXSAEGQEKAAYFAlrPrZMACgkQ/Sx6poPtYcXZxwgApH4oHptMikZ7MH/5MoyN
   17.54 +j27PhmD47XjOi6lhgRuc2g0/gHcsGpf0aSbLRcRIPiA9IzloDFYinz5ugbzYwRut
   17.55 +PKHOKoXuOs7Ty0lguhyOKadV07yh3mWrRfmIU05MkVz9g7g6C9131+zdbfv2b1hy
   17.56 +qvW6kGGoJEf6e+22JH8AwPXP3jv6AyiZprUY+Ma0U8BGDOd5M80sdT4Qs4Rai424
   17.57 +YpSg0ef3Nh0mN/gBcoVGkoUUu2MOzqgsJm+IoEnRpQOHvKguk1XTwUA69+CRMbJ5
   17.58 +EZ4hKxvm1f/xSutEOUprOykV40ngDmiwgN/gz16mysIRGgLfupUlJbCU17x60Z73
   17.59 +APm6B/9ny7STBTvh1MfaXS16mIJzh+aoxtUqaQzay07GmPazu/cmDbgwNy1HdkFP
   17.60 +woOaOWhpOWclnPTiTiOJPvLYBL1hS0G1E+RpX22whfTPXMHZNyqYO8HXgtQX/j6X
   17.61 +LpWXiTofmNFUIS8MGCERTO0jLdQqLg4jium9Oj+sRbVzEPKsPWcmD5iDxRiyDLbQ
   17.62 +qq1m6jDvPbSfUqWTsZ7vvCNvi6G0z9bBZRfuEvejOyKiDNBdPS2KGyvykdEjmo+7
   17.63 +/xgFBGurZBLw2cq0k22V9Ml3F9/eA99NE7yXMKhxAVVAx0hDNyY3Q1bgfVBn4ZC6
   17.64 +1HxK5QGZGVtdbOvxMS2Y+xq/wD6s
   17.65 +=ffZL
   17.66 +-----END PGP PRIVATE KEY BLOCK-----
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/test/test_keys/priv/priv-key-import-test-main_2-0x0B74809C_priv.asc	Mon Apr 16 12:45:09 2018 +0200
    18.3 @@ -0,0 +1,63 @@
    18.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    18.5 +
    18.6 +lQOYBFrPrZUBCACnMasfpzRhGDKYjQIN1si1wloLnlfyPoM1QUk+On7Erc3naCYH
    18.7 +DgUUc22oqbBBC1pn5yZpkELg51X3kIJQ+91+iZEHFoqkq+EmjLpmqMqOR//TlAI5
    18.8 +vnxTmwoDJL3PwdXqps1u1pP/ssb9VsZTECA8D3yPBoID1Db2ZhpoMM+u0dq9Rxty
    18.9 +geL8vkcucTMTZhIB9lg0S3R0WTqNPxtWoZiCPjwwvgTbJtI33HrePJKrTqgCCb3K
   18.10 +4CmJsItr14kPArX3cc2ohJvI/6TdpD2+t4ns7RZgB07e94K2LmsZd86nArpZRPiT
   18.11 +360VPibE5DFf7oNCLervmaghjCmYSv6VqauXABEBAAEAB/9C87zXHBn5l7sLI8xi
   18.12 +xlPxlTaB2JLXSvk35kDyTnJdSExgEnDH+nFGU0Lie7E9GtLFMOdM9pwRfBIM5S2K
   18.13 +SJHWDjipYfl7H+k1ir1KRuV2PJbRnz+U6BbZVAiaYagw/iovoUQ60mrJxkmxQYKB
   18.14 +2L9PzdPPYofGCMFJwnFor8M6+eCiGsu5kWW9iGkMHfNesYCh+B0Eeqgt6ZdBqoHj
   18.15 +6nasJ/CEitZi6CUZUdguFF12vomhQAqETh4NB+S20gc4UZOLypF1+Wj7MgWEH08a
   18.16 +PGY/Pwpbf8Fg5kXH9kbMxB5x4shXlTPyA8DKBI6+5M6bariTFQUO1vGuqUvy6Zk5
   18.17 +jIghBADJmfV++l4v0a+89Iu2tPw3H0t3x1vhf6aR65ju5lQpAN5qBH3JtQuHgiHV
   18.18 +E0Rb3IeV8DJ5hysM3ZDdba78WxxrLHAiHPBwbBAKEjl6EtCmFaWRdBkzwudrm+hc
   18.19 +8ra+ohwx7HFHnW2yuToQ4UAGoim3M1MhJoCuhyHlvSAqCmEfOwQA1E7ybWjVUY3y
   18.20 +k9vLMUCEUOveWhRKAyrWlVMWeRYWoOCNxzQ3ilba31EcX8tkupTpyxjjDXCwhhvG
   18.21 +i2Vf250420PTdcXELBk1rMLdLIm6A5r7utIAUaao5jrQgTniPGcPFyGpjlJqJZ0V
   18.22 +6NQJy5y1CKLWBs/PB6xVo0sOnlsUF1UD/A6kYRxU5u0PkLpeB7Kv8/L13Jofygxu
   18.23 +vhQwW941mfoEVZY9TCVlVMUTKEBh3yZQIXlsWZ0Ot2eHHXM+Xa87KZruVNaEbhQW
   18.24 +Wz57Bgd1qaRk7Ua7IXd9Vwaj/QCg3t0T+XwhjbSAt27NM3Q+Dji+tqCqsCmSUuBw
   18.25 +Z8hPXhsDI6HsOF20QVByaXZhdGVLZXkgSW1wb3J0IFRlc3QgPHByaXYta2V5LWlt
   18.26 +cG9ydC10ZXN0LW1haW5AZGFydGhtYW1hLmNvb2w+iQE4BBMBCgAiBQJaz62VAhsv
   18.27 +BgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRDC5ktSC3SAnEjvCACheUkZAlDc
   18.28 +XQhwhZ3KuwIcDhAz/w0xK1svzwSdMAH6sRoOVnwGkKunHiw87BMi2mlbcvFS/YDR
   18.29 +eWx43vjikW9HDcU1RdwVuZD5Hid/cpogXn/aIRTgtkwdDozDzUgegpraVCP5wpJy
   18.30 +oUctmbTKFiil3y4mqv7wVqR8ew0xxGKp8JxNskI3e17KrSCMtHDvKruT78veZW6S
   18.31 +iWOX7UK7FIAKISamkJjOB+HbBMV079W/cG4dXtv0Fksy5f+6a8xLLCdSo1tCY9/c
   18.32 +9j/xe8rHXpqIksE3uVT/ASOxbW60FxdWMv0gs0E5BQgxdckBAmaEckgU8047ksVh
   18.33 +3ofZ9ec2U/JdnQOYBFrPrZUBCADS0VZ4WGL81g0fC1Vq0589ZHxxWvDg3aE8/PSN
   18.34 +0FeOOsBnI5Ac/aM2zHaJWStwzacVkC6e5xyJSdClvYM58U41NU39IW8e7JEEpH0o
   18.35 +aLsq6qPtSAodore4LKFMUmOYsW+c0HdfjsxE/othiLJueNA8PqoCB97zxnXT2M+n
   18.36 +nlzaQea8NS6dQdkt5U2zVE9HiyKBqu/AKx+HP8a9hO5g8ALR0OdCA/+0hlz0mF3G
   18.37 ++Hgw8D0War4X3pWBiLSm7Fm2biY+jCJrUKF2gJVCoumfCCRQWQsGDyVWJtK6mkFZ
   18.38 +7vus6MJfbUEqatmbvFjqrnP8qGohHrMsk6VZHIBjSCXA/jTVABEBAAEAB/0ZwHuN
   18.39 +ENLqqqUIrUQ+W+JgR/WRjTfOaBRJlGa1KgV/+LpG/wecGvmEeJ5kMbHGQkDOOAIR
   18.40 +5A5O0Ob9T/SHL+xLQJspuBtQTjp6tDMbrAts9yOWGQ4vR5CknUMIxSmoXchSAf8K
   18.41 ++7EFHojdHasaJoTdTxRKUjbQVWZQPfRDt+sEt/44GOWjnGRA3BuRtc68NKGq5z+k
   18.42 +KVu6Pu01bsRVsjK/EWg+0Z3Dk8ZxgXSOVJ6VhEpxis33axYaXdME56zDXpXB/7u/
   18.43 +MvboC427a6bavgWjeStU8dyQdSfCx9Tpaeu1AszJcvsdYHGBBinaggBlkCds1kB9
   18.44 +WbZf4ywh6tEbuYVDBADYrLb9zueRX/0eY9zzorYs6Un+Hp8orXQj7Cw0XoXYhYY7
   18.45 +td4DDys6njAErfFxaM1OjAAshpHQfYIYK5vBpGwqalioLF1wmNtYwzFbZ66ceuBo
   18.46 +pexBrZziWoXuAR79opgyqghm+HWRoW3T6S3ZQpptzHpNE/jK8ZrQNkHwxo9fowQA
   18.47 ++RR+aCz9mLd2fT8lOWUetGgsrKQvV+7Eol/jrbL22rZTbAxBuaVSoJf/bRtbMgL+
   18.48 ++Upng7Ku6NEOITcRScVQNr7nbQqH/0iY4knmbSeCMcf7jvorDzPDmrVQV5eXNiXd
   18.49 +EDAya8N8+9K6g2KwLLx/0+kkddeOHmLqjzg78feNAScEANFTfXBOu0TOghF9wc7N
   18.50 +4hMFcPZY43I+WIf6aZ7y+qwdriU++2+N9/a5wFiAh1j1C7DmHfVwPdGzB1uJ24NG
   18.51 +fXJK/eHO9XTM5RHBLz8l2Ovt1HoyELgBhx0/wI5tjpcobwpFZE+PEd0OMOPkD08/
   18.52 +UTt88v49x/EIfSy5TCOl1aIBQ7SJAj4EGAEKAAkFAlrPrZUCGy4BKQkQwuZLUgt0
   18.53 +gJzAXSAEGQEKAAYFAlrPrZUACgkQ6zRDtFIo8nzUcggAx+qKj0jB5DtV07zjFBC2
   18.54 +20dMLB7NflQu9gjrxOLQY8d+WaU8IawmAiautdlSXslvYpjgvaues0neQxPOcuQk
   18.55 +lkOxtAMCKjQx5wvJwmB4LdDHLa2Obxve7saf+tGW6057Vx2n0Xc6XTefd830yo4u
   18.56 +zgLj85+bJV2MsglR5gMMfXu5mr5vuaaM6ZWEFWRE80Vv0CFhDLGYaz9a4gTpvte9
   18.57 +E+bQpD5ijvv8xR84LQNstlux2un7SRcDo8DwkmFfcnLJRsG4slcOOHOXovHB4KZ+
   18.58 +sEJ6ERW3IMGUAKIlS99vntTIcE6G/xWdNow+YQbxA3Bs+JK8X2EBVI/5R7DBVp8m
   18.59 +jkN1CACP9hLUib68hgEWZ0vUZLaxUScRZaq1cdwMOEZi7h2LTtqtnEsWWYN1E3G3
   18.60 +Pe1zPd9qcEUZrCo1ut/lXIVvKKoOj+rGTK3LMkQzruv2cXxLkSoVvJ97Zj1Vyaks
   18.61 +/wWqkhNsDmrpsrhxw1WG4fCeWrnEzyQZJyYI855TByfSxWrCrWkhQeY09+S5NZj5
   18.62 +cgMaRBbdy9JLuYFKYkVk8az0IlOj14mjAbKUdvkEt1y8H+TQAFiKr462fMLVN393
   18.63 +glNnlMify7kYXcxihs+CPwJreb+4zuO1Bc0ha8yQxB8xbjb+POkRZ/ATj/b9I7B3
   18.64 +lO713HGXHUDAF9TeXttRXbSYjFHr
   18.65 +=mKNV
   18.66 +-----END PGP PRIVATE KEY BLOCK-----
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/test/test_keys/priv/priv-key-import-test-other_0-0xD11252C9_priv.asc	Mon Apr 16 12:45:09 2018 +0200
    19.3 @@ -0,0 +1,63 @@
    19.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    19.5 +
    19.6 +lQOYBFrPz6oBCADE+Zyw50I47+xY/TKJNH9+cpgaUciU/mhMxMdZug+cvAiNBoOF
    19.7 +tWqPfB2MjcnmhSCM0oGYDkRI7au9u1TVG8fAZ7kOoT3vLosKxQtZdCYWSWHCsMIe
    19.8 +iSZoIDPHXL3cM9410HobVB4UBmot5g0J8hXkkTa+nzArc+kjX+pEgtrI2uWoelVF
    19.9 +msAOROBU44gXudwudcUaql8ZzW7nPd9rmAFmOXnhNvW2TiQe/KLTR3L/Gggt1Ytd
   19.10 +nUejzGrioWf4hZX9zdLqMm1a8H+KWYJdjjrIBLRrH1FUXXPQxSuHmSEtlnmg9L9X
   19.11 +6yaaNG+XhxCAoNaSosqxAWqJERzt5lyIRo0pABEBAAEAB/kBSYFG3af+38B7X2Iw
   19.12 +Z9WqcZzBVUX6hUQQtlt4IGFgPJFQvJlo6wPQfrbht355gWayTODYacVz9YuhAIOg
   19.13 +Jd+TCAp7SD3znWn+rsVxdvMVw7J+F3IZSXulBArak2ZRNUyPLPbTTWQp7NXOSXnN
   19.14 +1hVjCjjhm4Aw1H/SQZryCincVKDp7QzaEm7mE8Q91jqobyDU1eodlXuw4i8lQ6HQ
   19.15 +G5kaGeXSskP1gNejoCGHW+nZpGVHfavb5eAQ+ArwE6ZrzUa6TB7oUcQ/+xp8kybU
   19.16 +w93QOV5k43U1xe2HG8KVaTch33SlbbMka4EwDeHkoZza9aUtxYgpHBSRmaZjB1de
   19.17 +4soBBADWPuxTx4LU8mycgqcShSVIEdk8MKUn4KIL9V4Z6agu/Tmd+Ik5OHsHk1gY
   19.18 +n1ne6OrCav3EZ8m5bRPO2sy88Pj+a9WFeSSWGfqOYrlMbKF46w1GNVxJ09jrlbhr
   19.19 +fHqFIfGvZTUN4bCLo93n2C9Cw29lVU2QwpXiiX6jF7FO7ja0KQQA610F2CwtKDnI
   19.20 +1Liy0rqcMObQRaol7ezgpXqZorFdPXGEnKMiNfq69zQOQUeKOL4DrnDTrrVswio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FNl2JS6
   19.36 +/0/guYOIRm8NURJGFLn/Lmgth8NmUdohPe0fEGXWRk3MlCo2vnNzGQ3UWPL3vHcY
   19.37 +uLBLLSevJLstUyM7URbHoOtGoeiICbMGLulrb/gLnxb0IGoJhIXhsqEzmEsvkWD7
   19.38 +2JJz1JvqdFSTlo+/36H2Yr6Jg+hc4XiR6TFqYAGwHcv+xPlJHNmv1qMAEQEAAQAH
   19.39 +/iVhPiU7AQpC31fUKYq/FfZM6HQ4xTKMYkfR63zRrs6moUcrbtMi3cNBeuVWnEYk
   19.40 +wYoMdq/TXlypO6+sJbMENgO/gEOzWF+gGSpyisoqss6JJcsu5Ru6SK5C6VySoSzO
   19.41 +2nP0MvBO+afcutqMnx+yy47FPvvNtuKSG7YaCxRMOmZRS0yCcg4dO8xVzw70YvjQ
   19.42 +o9p2O0RtTMrSFyEYNhLHj7wQyfGKBzwL+FqhtejMLAnTWbPFn6tYp2+wzZQE+XJj
   19.43 +inrx+PPt9yymE2XVtuywYENrLk9YHCBvXGem5YZaU52Ha4ysp1C1YGvlNmO9V0ia
   19.44 +alCz/4dtWbIsux/6HbHP+IkEAMxxIS2zWS03xyRzXhFyjCWXacvKujqF3j/elzek
   19.45 +nO+KTavDPVoVVJL2/WVf9yzJ2e1CSNjiZ9iH9cOMkx7SuCgYK+sYpZNhOMe7fiEl
   19.46 +f+Yp68SpI8R/4RfyEDaUHsH4DCUppGVmL5v3yuUlilqM/Z6jKW4oE5cvzUboU3AR
   19.47 +6gLZBADwahhXZnxlDbz2yLHzMkBdFIzbBMXExh4Z95coIOnfztqcpcWqHgw/WleS
   19.48 +D10as+TEcgoqa0gKwEPkZE/lYayje70O6+E2n5Y1PdDIVn6mo+7XLwimoy3GnX5y
   19.49 +296jJWyL2cTsf2/MdXmLwHhmwnSFuHNwmkNudASGMBLDdqw/2wP7BmNm+rD/33u6
   19.50 ++XwqPA2xYEQRPJ1V69JTE/ctV7LE12IwNjKmRIKmawwBrGmhYpPFeEoGPMQ/XI+c
   19.51 +Iv8IYAnpKPCHgTMIIFmLsdB9r8Udd6Rgs7pirAbgdH6ohGFN358A0Wz6f0vz+8q6
   19.52 +/fok9IzbFCbsO2s+BMPqOqJku02FVXFDjIkCPgQYAQoACQUCWs/PqgIbLgEpCRBa
   19.53 +ejY70RJSycBdIAQZAQoABgUCWs/PqgAKCRAvKlI7JjEc0HCZB/9zP9D1lclf6rAz
   19.54 +S7rnRpkj63J6qlUulOa1Dnc1UL8hTkCitHqvX/uPwDanwGihnZa9oRRKtR7ISJP7
   19.55 +puYwDyiWvXWDUhOkf9ShqZHm5BAFe482Yi6VIbwaELLQtAtFYSBWwE859M1X1Dwg
   19.56 +Z/RlEbviGBRFuMePI5/HCXWI7wYWXXy8sP+cTOvRpiNQp1hqytSiIunnRJ3wLR0Z
   19.57 +pAo2y3MyBpBTCvIVZ757R8jzPYeYvIUEFU+9ctb1k9VOzA0T7Okdk0KUvNtSDOZ7
   19.58 +EMK6IBgIns4NDX5tRJ9pFfn81R6/yOLZbLZvJYDIc1+RBKc/A/XbIjA4lKhpH+F6
   19.59 +vi0a3DBLlzYIAJyfJf/nNkKW5J3cKDxm8tn4/3zckCb2qhgXl6jeXCffhEk1S76J
   19.60 +cgQd71bnqYCTseJ2UgY15QB350F3wp8oxepy5Ir2JG9+SyhRt48rRKEBYaKDHYSy
   19.61 +qfym+u7vAsl7qn4QIiLrgZH7J2D09kV3yLn2+b2fnOOSNcKb9AZaAcW9dgzh3CFU
   19.62 +kYmw8A74o0m5KGFK4hBvyMZl1TTCweMt3gAj9GSsgGwUvRb8B0tGuPBxsiyKVWoB
   19.63 +bJIPwNtrknEkJC/LsYYP+JCZiKQWhs/lb9lPF0DeuvrVkaRZjoh7JkXilMPO6tX5
   19.64 +IZtITxR5/KyR3tmBE7n8QWXx0BFAKQLbAlQ=
   19.65 +=xz6V
   19.66 +-----END PGP PRIVATE KEY BLOCK-----
    20.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.2 +++ b/test/test_keys/priv/priv-key-import-test-other_1-0xC785F20A_priv.asc	Mon Apr 16 12:45:09 2018 +0200
    20.3 @@ -0,0 +1,63 @@
    20.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    20.5 +
    20.6 +lQOYBFrPz6sBCADMI5LmOShV4onXlwzqg3EMAqGp2wspLtSoNfe/32/qXDX7V+X9
    20.7 +d8Q7IXyYT+EFT6VylJAk0uoFgmLjRyhAYTmCTNxRbt0v8agVqdIKMP8hN0MphzYe
    20.8 +stYJDOfzaNh/T5d+jIleFflJ5Sqpv5xC97b7JQhF186MFu1k+Xp2p9Z7i7PgD0kz
    20.9 +G7lBfoXw8Fn9mYciFCB0Wa4IJ4FrHXVdkix3Q+lK2ypQR/INRehrdgh86XxEOp6J
   20.10 +SOuKsmP0wLKcsgSZshdjnpyAA8sGzhahhDsgNRgU1Gazd73VEVBU1QfBR4bnTlCS
   20.11 +qq4JYsj1knJ1kGwmVpCn4HQBWoz6B85qlVzNABEBAAEAB/9WYz+JOer93W5j08Jd
   20.12 +g95VLM/pJ48jkHPh82SyyAV+ciNOCDaF+ycJtvQZKMSbEMd9I62UR8VNK45ZjAVW
   20.13 +qU5C++/IblggL+3nrQP72Bw/nDlJ27RlbVzyW4nVEit8RNxha2u+ayIhyV8ykqm4
   20.14 +FUhUI6nKlLcNxa4UqxbOG9zCTuwXVkhGQ2WwhVFDReHPsNhUm+FmQot+ev2A/Tsw
   20.15 +Sg+1FDjGGgaUstR0g/VvEbF8gslZ9VJXI73Ow2UkVItr96dEvJFqoWlWJsokwMcN
   20.16 +zUPb1bbQ6DlkbisQ+aNSftcMzBOk8r9Ofd423ytxegswEYacR/DdcKvenqst8soj
   20.17 +q72pBADPO8qBjjhPCD2ya4v9Vj9GT7tqlf7txaDkQc1hpZyIsLbzZhZ5RozCWBCn
   20.18 +KnHJC+HvqaK7mzf/z356Ac49GgTCN3qw5MthnSo/8bu4FidPapqELvJw8Z85n4Tu
   20.19 +VmszbqWjZAQfMbIAeYPoXODW/Y0RGgwrlrCggNbVdvFJQL5NdwQA/C1beN2V3D14
   20.20 +tcGeudSv22t/cRTL+aVcsFxxeLSIXlnx1VNE4QxzToHKQT6WeRf4fHsACosO+UIy
   20.21 +mp/NHVEsNHEibVoUdBBt1qqPqqK7VXs3Hy5jY1FZENEYVWbwSSXfTgFk2S2/3d4r
   20.22 +eDFon9yLr0A3cXEYs2ebBD/Hc1NlqNsD/RH752mcHs1QFdMAd4VaD2AJDufHseIQ
   20.23 +Cfkwl16UQC7GVyI/aje+y1UBn+0o7ZFpcewCQqGbrOVClQUJQK4rxumiLmVFJ/VJ
   20.24 +JxfdTcQ6+++WT1NXcrQC7qvnOy1nUsNBxBJ0JuTzgcqMBkW35AVmZemtc0L6/9U/
   20.25 +zbuOPerYOr2ePU20RlByaXZhdGVLZXkgSW1wb3J0IFRlc3QgMSA8cHJpdi1rZXkt
   20.26 +aW1wb3J0LXRlc3Qtb3RoZXJfMUBkYXJ0aG1hbWEuY29vbD6JATgEEwEKACIFAlrP
   20.27 +z6sCGy8GCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEF9FvqnHhfIKZpEIAMQK
   20.28 +sAvU6LBjg5wodKwJKhBjRVzh9153xkWBMTFwkIVocyvnRkpVHHTtVd2cfyc9F5DT
   20.29 +YwO7iQODAwxAYJgHLq7UGzX4nh/3YjCUkKfX0Fy69JLsbTm62TuYBrUQJEDiy2lK
   20.30 +ritEa2enT5UFRT2Somgs5AWhhL6ll0/izf+8ur1a3Z4xpe1LwRRp0iTdHicdnM86
   20.31 +DT4COVNUIWWUXEPH/MFKmZUxbzrHuj/36Y4W84u3Yamut9NdyhAxSX33LMA5jV2t
   20.32 +PgQO+ksDQwRaS7mpSxntRbodHrCFjP+i77hgbD3I5nvCrUc9yqddYfRrTSMua7fW
   20.33 +BAX/6swDxgR1dzFbmNmdA5gEWs/PqwEIALj29aoQs7pvpHGmB0cmUMlu9zGFMH/J
   20.34 +TPHCg+KuIjU9VlioXXKjY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xEyC1wNhXjxXTePuICHD/F6IvZK7h9yBQP/a5CDVMwwox/X
   20.50 +S1Btr2lOy8/B6fjVQL9kHt78gE1m+KEwQNuE26k+kXygfu3ZC02A/QUclIevDyQA
   20.51 +iTVW/dI/yQi5IWI+icGTB3FhhAxZ4WHOyByz9JDdPkqhaze9LZileVjXW+OWc6KZ
   20.52 +9Wie5UdqIaSzCdjsp87YMn84qEkTfcY9OYkCPgQYAQoACQUCWs/PqwIbLgEpCRBf
   20.53 +Rb6px4XyCsBdIAQZAQoABgUCWs/PqwAKCRDnGVof+W6UqtjPB/wOtJ/kiTXE9+I3
   20.54 +krk98BFUKA4m1T269k02vYkqH9YXZx2LtdicJFNt2SYfazXxoako8EseTQl+ke2Y
   20.55 +QZVbsbM+/gcui69JfzSwpnP2TXgtldPl9lU9uUCkb7cuq2VHOzpgv1FqwC5S2jDi
   20.56 +RGCmCwEJ78/YCC59Ifvp5f6NwTKg8ggCO6e5kFN1qYEkoY3GViR6Cntyj0HhmrTl
   20.57 +si5EkLwV8cqyZiZuPQR2g7X/zeweItV9sV/XJVpOeowoOA5rVs8ov6jorrAGHRa6
   20.58 +cyQ8hcU71u2rndEeqLE6zJQwXJAsT3RrfgYP6g2O27aYz700F1BepDzPWq/rOh1Q
   20.59 +L1rtVD/0SxsH/jilplZgJkBgcNldsEavYivG1ANB3pFozvyg7AIvNNriaSutIEeJ
   20.60 +U3CeGfAKW0mD3c1UTK+VvyyfhK99CHTdoaybISMokBcL3wq8GNqHKD9Kml8phB7e
   20.61 +fHUk09GpP5HSWET0TsvEgoqC7s2oLl4tr0QAhF8i8QKms6luMrSaWtp9epmWcP5P
   20.62 +5KXhrYldmH2hM7msu1a1d+5kHoQMpuRs7sUAZtcAvTixSZRsyvwaBeKNtSR+V5b+
   20.63 +j+PhQ3ySVzCuSYjwqOXCIlMatYE1fJs8tXZ/+IpGPEu0SZgrotrvARKV0RPWpjI3
   20.64 +JWKHaCAC8e+WJtt/CpvmTvw/xn6Lntpa66s=
   20.65 +=0Ir2
   20.66 +-----END PGP PRIVATE KEY BLOCK-----
    21.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.2 +++ b/test/test_keys/priv/priv-key-import-test-other_2-0xF26F5504_priv.asc	Mon Apr 16 12:45:09 2018 +0200
    21.3 @@ -0,0 +1,63 @@
    21.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    21.5 +
    21.6 +lQOYBFrPz6wBCACt10T2hoQS6x34/VvM+FgREyBvZahsfL66za/xNtP80w7ALK6e
    21.7 +TlNjR46c/vh1CW/KSRL0AGOU+BvvxymS0ob2DmiDD4/N2F83oVGMfNkPaQOQayuW
    21.8 +xOLsg1x7PzaSlZbAfKRPyafGu5KLrq5HYHFnQm1r1QDgxTbH74vRYQjh10oisVqX
    21.9 +MEl4LkXraXX4WcKaSLsqpgV15HsEOKbz1j1LPmPFvICqJcX0tY2KDjIBpyNAD4Aj
   21.10 +fKBtM1mj9wiR4euwEvxl97xpocCLwHwt8iZ1FdlzUtPG3rPj94LlCpc3zi+AdM5g
   21.11 +nT93mo30WZPB/SpUkWzBGGhbk+UMo7YC1qbVABEBAAEAB/4g/Wo78nkb8fyFJOeH
   21.12 +9VUZIG0WVs9ojx/O6XvLJeGC6DazZ4dXyXtvqsO4rXZPF5RcahOrtGsxeQgsL7qG
   21.13 +/2bXSRKyVICwyq//KaEFLSgwEXi4rm3eNczun1sslGlx1et+6ehwr88kGrKLyYGP
   21.14 +UBEVTHjhbtG01hg4RxBckrKR0O4yZ5ylQ3DHmL8nJHfqzHrRJfRlGgctTyBVl3rH
   21.15 +OdhJcYfJL8Ck1zAkGcjEfCGnxdTVaYBtMKuLibGwDnJO0zeoTbZwxtyA6EJpGWVq
   21.16 +MVp/fqBtmAauuXqnpPd6ZJSOSBWXPWKE9OPaB95rM4yM8jCeQVPC4vd8xL1R9qdj
   21.17 +Jzk9BADHiE3gUuTjLuDDwEuzpOR3Qu1laILf6TcTdfSeoKVIuc9J1aI6g51OWWzx
   21.18 +72JHG5EvNth97yby+8vM5y+XEyOzMiKSPt+KKYP7P89QdBn/w/NiSTmyUQS+Lgz0
   21.19 +3C5YbmVyuDLalSwcMgMKD4qxcR8yon7BAZt3KGN2Jm40EhOz0wQA3wmrERtkkpTv
   21.20 +61qHRSaZGOsxpEi/Cs3mp73b9Bjin6d7odEneMD0rSOR805UGrzDoFuqnDfkx/id
   21.21 +Oj4vsUdM2yeP5xtF8rvZnINLtUZlGCm2LQ71njk6nP382etiGjZYf95IYSDlr9cA
   21.22 +TDvgxsPAEX+aS/zvpc6iCHXH+WmYmbcD+QEWqTKk35TGy9OnTbEQYxWI4pHDzCRl
   21.23 +tLbxlkHG8hZVGPHqWnwd7etxh+kTYkFHeL6OfrIw4hEhmjy8E72CyzJdrMztqtiY
   21.24 +4uAVVpwTwNGXkhusXZSAVlHTirjiSy6QmzKypRujKn9VaNPOTy0kPIf+pBDkxUoG
   21.25 +TJzJi7ZkWbs+R/20RlByaXZhdGVLZXkgSW1wb3J0IFRlc3QgMiA8cHJpdi1rZXkt
   21.26 +aW1wb3J0LXRlc3Qtb3RoZXJfMkBkYXJ0aG1hbWEuY29vbD6JATgEEwEKACIFAlrP
   21.27 +z6wCGy8GCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJECbYH63yb1UExsIH/2Wz
   21.28 +jCqactsKsDUn8jilP/h2/kb+FeEd63dFvxReBtrA2XgkELfpN+91t7WBgwFue6US
   21.29 +NA9sNcS64ivIc/0MthoJHBQ7ulbH6wNmK6/dhAgZO7mMfPQp5AtTYfN2Xb5klKvW
   21.30 +QH+PTA3dWSXTi1gGc5lXaPHkLlj+w3jOM2iTZVlHjiqF+9O1ITDSAZ/KB971/may
   21.31 +cfUto4JYfay4gN/s0voSMW5LU1xZmLxMMLQJ5UlV49ckYyKMbqTW5veQCR+QrlRd
   21.32 +Mird6DYePAWhgya4S5hpXiHJUAJwGqQnLfbkt/0hABo9Crw8UkdbZe3Qr8hUnRNP
   21.33 +mRT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papbyaGYT0P1Jhq4mLJE8PDTMldkhHrHQu4lLfJh2vgtW7BQxAaY8Qv6cZXS/
   21.49 +hj/IXEb8T94OyyNotQ4ZwV8WRewVvR8G2VkEeBBV4hoRjVTu8QQAsdk390O5p4Gn
   21.50 +JC3BLn5XEzj7KNeSGaDiPFyjWD1U3k15w/Gk7+DtkPGzRCwJC4CcLQ3vZqZnD3Sb
   21.51 +cKk6kbUehsvikHtI4Q/PKpi6xe83TGy6ne+utIPz0K9+k3MCJVraEM68YDbbO0CT
   21.52 +kYekwRNbVAI8VAXArOn19YRpNyzFkDQowYkCPgQYAQoACQUCWs/PrAIbLgEpCRAm
   21.53 +2B+t8m9VBMBdIAQZAQoABgUCWs/PrAAKCRDVZ/azXGJIUMezCAChRI+nihF+aE+y
   21.54 +Exmyg2rzBwv7ued/vjZEP34wHL67oRfuh8WMvxFahkmlPJoW/LSRk+lf5EkKYsBm
   21.55 +aRtUhJH1nGPPARw7VmZ9TmmdWkklIyeQuJMUXrUoTm82to/2n7tZxnOoDSzGojvl
   21.56 +7hXZAhyENIcJlsbIALOSfvWybX1Q2PR8+Zpmy+EYrELIdeBxzNoqWzAyM7T9ncmB
   21.57 +BXBxgorFYfOBG/N2uDn1jpajv/i3FTKAD1fIPhYE7KA8EM3YUWtPaAohAE8GkXRu
   21.58 +I9yADTh5myvpXXP0Nr1wlQVUL4AB5Z1EfLufQ/R5mS5y5W/WEZwhqcj9vBJAGalA
   21.59 +Rd/Effn+PS8IAIDr6M0YwLbK4akDntQLOceDi5RW9oGLmAVZF+ncuF1J4eEuRpYS
   21.60 +HZ7SfnF5KhZZXA2U453ZZJK4it9qa883+a98O4KD6xiFAtkxKEd4KxgRPKx9u6q0
   21.61 +3evfai+Jzm4eBtbGGA3hPiTHYRgPmJjYsEcKYFHkIFG5z+lzNVWLH892dtn7DQ7P
   21.62 +DF3xDMe7peNS4g2M67iHYotwklnCafCozIFbLSDwAiWH07UUbOuFnb1kbjxu/5WH
   21.63 +/OL350YxV2RIg0UlWZqnoFbQFXZGk1B26TyL2fwZY4ImX/5VZNBLWzPTgtD3/UPs
   21.64 +SxT9fggbiA0f1dMrzZoAZVQmaMqaeGTouYM=
   21.65 +=UvOa
   21.66 +-----END PGP PRIVATE KEY BLOCK-----
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/test/test_keys/pub/priv-key-import-test-main_0-0x3276D2E5_pub.asc	Mon Apr 16 12:45:09 2018 +0200
    22.3 @@ -0,0 +1,36 @@
    22.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    22.5 +
    22.6 +mQENBFrPrZIBCAD7Xnh/WJda9mBwu9lAkJ9ON1KCo9JFvjw89TKA3nOT55NKMUjE
    22.7 +4D5pZm0DhipUBSB6ylVC+FkxdTydeqHeV4/ktBITi/hc5qiMPt0fVS9jlX2rUl2z
    22.8 +vvXmAX5erHx6bXkptbZdOtCOr1hRzU3An/KODdyAcIRClBYkeR1sB4/dLvfqLAMQ
    22.9 +UpoimWQrzS9+AOtU5tMGFjmhjF3T+cRXdL5zgPaIGzt9oV3dHZYgGGSgDxXNFK1D
   22.10 +4jUv2AsyZYL4qLnWvZlbBHvaTbbsP+K5xXI6VpzPWEIHT4v4j0+agGrzLsemQsqT
   22.11 +lsYopII8AtQIc7qWL+DvqUbnBCiamUBYPaKlABEBAAG0QVByaXZhdGVLZXkgSW1w
   22.12 +b3J0IFRlc3QgPHByaXYta2V5LWltcG9ydC10ZXN0LW1haW5AZGFydGhtYW1hLmNv
   22.13 +b2w+iQE4BBMBCgAiBQJaz62SAhsvBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAK
   22.14 +CRDv+1QMMnbS5UI+B/0VACN9je7RpO+mJpK77Rt6h9Y1qzBOJxGxgErdzq1WG1/i
   22.15 +gKMlSbAlJwb/tT7XD44c/dN+OD8+JOEzmQEWbQ6Jvu/7SIvqt2iGhSkxGQFLdR9Y
   22.16 +Mt7vGmCB/qxza4jwTSK8vfBymb/2rgYLNT/MZTl7trkQg9n2f3DGle34R+fepY8H
   22.17 +U/xXTRK+gevyjbRIP1/QuL75tKoDldhRV6YNcinT0gpyN2Ld6KoCXnGB73HJUqis
   22.18 +L8S12AHhr4o1bJVW1pA4HFobTV592Z6gDopc4WuEFX1UqvX5YWKMu1nmEWLBuYS4
   22.19 +I9HejC3KocBEmJFicG/FEF+D22zM1AiUnoZfKOgwuQENBFrPrZIBCADDNpQPiXKi
   22.20 +YYBxe/peYRgYT2CH4r+j14mU9Sm2ZDQTqp9oig3T1u02m1XoBFMoV9NpcN6L3r7/
   22.21 +Xs9xXTQusumcPy5CO8snL+DLpeS9yuvquzsWKAUc4MxGoo/Kubuot7GDEXH7TXvb
   22.22 +rWSSFGnsWITrvEXvLC5wb4THMYsFCS7uZM2TNE5UcDkY69xOa53ivjRrR/YHTOOw
   22.23 +rh2EaPRUasfqBse5GRXbamzi6Lrqqy+4Q/QJ/OoWyCKCXcrpw8anUc7AWomJ0U0N
   22.24 +QV6YVykjE78QgcO4jcG54/ow8N485cffCdquOTqv5gaGVZour6E1+SZvnPPkZtJi
   22.25 +vJ2P51GeHo3hABEBAAGJAj4EGAEKAAkFAlrPrZICGy4BKQkQ7/tUDDJ20uXAXSAE
   22.26 +GQEKAAYFAlrPrZIACgkQivz/NoHEiTKVJggAhe69Q1ezvnSg0k06HKrLApTWFzcQ
   22.27 +Ee8msjLQ5Y2Ucyuo5ssBZ/NZ6Plnfv2E+Ft4nWY+8hkyDCWvmWRcAz2onEHwG6lN
   22.28 +LTEcXG6rKCtzOyIt2A7OWFNwckLPN71JGFMIwliNKTgSBBWAqDiBcjw3QKj70slZ
   22.29 +OOrKa0+YqChH2wThOHtMFoiZYXM3OSq0whAcninita0VOXopNhNxcYvJV80JWbLl
   22.30 +TXzR5B+fMwQFndQNy04uA0HLi1ubTSipDHIxmiBK0ZyLsnwHvfmOlPG4zMQAubxr
   22.31 +da2GtPr26WQ1AW2x2v5zTbcqBYl/BaMEItYVRO6VcpTRYuHmiriAhGffqTknB/9j
   22.32 +goPVD/YUiVgrVjNWN1aY0DZig0jrk6BSNXPW5QAMcfr3LBZ20cgQ4ved9IOh66wn
   22.33 +xvPi2LMXB8SWyeSO0LMql75Keh61GLqh8FyZP7yxUAhodyVdic5R/ALAU5S9Eve1
   22.34 +Fw72YPOmAAYrjcDlKy2P1yxAZnyU9yDsmPXMSxCb75mGsAcCqsjZzyBnmXKU3TES
   22.35 +6Yl3JF11oV9romIPZOk4sqHDXozS9BOdxu0IyXmvUJorlpNnP5HIQELfrhRiYx+Q
   22.36 +wBpSmNAyUseRizvdXmzdrvDrIEgyV4cyFIRFbRZKxTJ6ecGmC5P5+g7wk4Ovdx8f
   22.37 +otrONgZ5tXgu7cF/HLZw
   22.38 +=oIC5
   22.39 +-----END PGP PUBLIC KEY BLOCK-----
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/test/test_keys/pub/priv-key-import-test-main_0-0xC065A213_pub.asc	Mon Apr 16 12:45:09 2018 +0200
    23.3 @@ -0,0 +1,36 @@
    23.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    23.5 +
    23.6 +mQENBFrQoQUBCADZri/DgdFOns76UcS+fWryl/wOWTeWOTT5PntcYf+XcU+vNe0R
    23.7 +O7G0xZMP9udyj1amV7cydlxafX1CIL1KNXlQGg5vXNd3Kdw9Jp5EfLjrr36g8+1P
    23.8 +jlXemFRKpqpcOQd/IEj/wrF9kQRAl/UIyLY7uGl9SA9KSgVn3rUhuCH++sLZuPkg
    23.9 +uIaAGstGbe/0Ua1+OEdWFVefTvti9T6aA01KEN3pVmWmqS0xPWa+2EYCoWGc4ONW
   23.10 +KG2nT0CP2Fyk3an/nbCtKhUjE5aneFHlFHb+vf+fChejq1VwbjIAGEKwI48JFlqy
   23.11 +q67T6srlly12U40OsiMOL583RCIXzx0GN01HABEBAAG0SVByaXZLZXkgUmVjaXBp
   23.12 +ZW50IFN0cmlrZXMgQmFjayA8cHJpdi1r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fmq7ebpaGMIGfZsaYNZ/m8/RRhmAuAarthL5l
   23.28 +pzaCbSz/7NiNml3x/Mh52+gZ5rlZ8DJ8zR3kmZanhcvr3UPL69fTY4MECWA3MoGu
   23.29 +xrjXyoWZOw+SM1hx7tqUfWn5YaJrTlqJjqO84h2vUogneCGy7pZWvPY8jqgO/3x1
   23.30 +/mxggHyC3VnvyQnjcAGqNYO5/qlMmsyiooaa4XI+fC/EW6QCeoH5vNHetkNCU9zG
   23.31 +Je2JMvHF9kDBhYMZtE2D7GKGnw6gEXSfWrpJri+5fWz4YzbEVz8jLhP8E4WII/5+
   23.32 +X6+V6wgAiny3ryx29MMBce8U0XAPqRiG5wdindm3UfZBNUrqPF2MwFEGgWYomVYj
   23.33 +DAfeo2kYXdNh3AhP0f8ucGWdXTmYstcuTrd9Gd9zMoez/xmvmkpPO5i3V3l+jhP9
   23.34 +5PzPM+QEh+Qe0C/O5RcXaYBXEOO6V2AwiEi1hy8iXoGmaf+WQ2oyyDECbe6x2N11
   23.35 +Qg088v29VbD26c2cLMs+jsPecJZrjN3SgYg23ybAKERW/z/CQL5by3RU4ahLXsRI
   23.36 +FTQXR5Jf1gwX9WnoJDAKDavwaBVuSEK7gJDLj41ITf3Oi0JmOb0sQb6Y4bhg7xfj
   23.37 +/7Tg5HAey2fWmMZIfAqdxW+DJtJJ8g==
   23.38 +=BQYW
   23.39 +-----END PGP PUBLIC KEY BLOCK-----
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/test/test_keys/pub/priv-key-import-test-main_1-0x80C8CD87_pub.asc	Mon Apr 16 12:45:09 2018 +0200
    24.3 @@ -0,0 +1,36 @@
    24.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    24.5 +
    24.6 +mQENBFrPrZMBCADHliMZZczNc2nXrm+SwDpVekZ7Uz/m2nRRmhH7OCnvIIw4zda3
    24.7 +QDvmJbGKRnlOkAGn7+WoZcmPqu5lfJHzC02sfhqCrGaqdb7RDkYGhulTtgwxf/GV
    24.8 +QGEgroQvDKLLRVAcE/rhIbz9stlWPMLwNlkvfXwGi+q5h2AxIA4uDnx9YcrK0NTz
    24.9 +5F/RCXm/yw/DxTlCK66RdWk1ysmvWGeEkwB8/0lVcgNpifSMc6LhChotGnwxLJe1
   24.10 +fhOTcsep8TdaJ2LHzrSO2rzx8rzMkHCpWrw71vWs1XhO7wTgvptOMDNuXsp4Pzyb
   24.11 +VFsEviWhUJoC5Zf1QF+jwyqm+WWaqr5e38hxABEBAAG0QVByaXZhdGVLZXkgSW1w
   24.12 +b3J0IFRlc3QgPHByaXYta2V5LWltcG9ydC10ZXN0LW1haW5AZGFydGhtYW1hLmNv
   24.13 +b2w+iQE4BBMBCgAiBQJaz62TAhsvBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAK
   24.14 +CRCNcYXxgMjNhzRRB/sGrf/k8xF/gf/RalVtFjLzOjZ8OeR1BRDkSQuKprOTmhyh
   24.15 +kOjJbCoUg4yem7J7bAbitTCG0UYHA8d/KsawOfxFGrnK/NOv0hW64AVhqiceHK9Q
   24.16 +pVUK56uC/kgP5wNGIp95gSAQP8YImyMsiln6xVnQKMTPRvZrelJIUhHek1wc0LkG
   24.17 +ZM6fqCy3iK6Dp3kU9o7sT67Rx4mvBKgExlIxHc3t0XKWE85qcWnWwCFeGyTriIct
   24.18 ++GjXQjskQsT5HGg3PjRHKlhe0/K1yNDKKqtWGOyFzicRKmIZXLWGyzLw1hMaUXTu
   24.19 +uiiCM1e3l0I1EcBhAgraCNCvLL4IHMbgBLjBLSl4uQENBFrPrZMBCADmOdxDjkOD
   24.20 +prEVGeyzezf2BALQB5GVu/dMt33gatXLV5oj6Vwcwg8i71UaoMzxdWyHLOyED5yz
   24.21 +Yof0FvsJYLcTkt5uq/3hbJaF34FND5K+4wlp88mV5k3HDllyErNaVq/PoO09icJd
   24.22 +IHNOO6sSoOkYKD1TuWR5oMotuUDFrd6HZD7eYNaLQ0cvT0F66cTPa8EAAggDoWc4
   24.23 +nJAqmIzFbICeGcNG2tgJurCgIe63pGTIwwaRT//p3HWASMOIVxa80kucUCqOCCuP
   24.24 +3wX6DOCXs9F2eoi4zGe6p3nnuWGvTiH75beB6TmfflGCBvI7uDLkZkxpKD+bXNuF
   24.25 +aGRnl4nbB/3NABEBAAGJAj4EGAEKAAkFAlrPrZMCGy4BKQkQjXGF8YDIzYfAXSAE
   24.26 +GQEKAAYFAlrPrZMACgkQ/Sx6poPtYcXZxwgApH4oHptMikZ7MH/5MoyNj27PhmD4
   24.27 +7XjOi6lhgRuc2g0/gHcsGpf0aSbLRcRIPiA9IzloDFYinz5ugbzYwRutPKHOKoXu
   24.28 +Os7Ty0lguhyOKadV07yh3mWrRfmIU05MkVz9g7g6C9131+zdbfv2b1hyqvW6kGGo
   24.29 +JEf6e+22JH8AwPXP3jv6AyiZprUY+Ma0U8BGDOd5M80sdT4Qs4Rai424YpSg0ef3
   24.30 +Nh0mN/gBcoVGkoUUu2MOzqgsJm+IoEnRpQOHvKguk1XTwUA69+CRMbJ5EZ4hKxvm
   24.31 +1f/xSutEOUprOykV40ngDmiwgN/gz16mysIRGgLfupUlJbCU17x60Z73APm6B/9n
   24.32 +y7STBTvh1MfaXS16mIJzh+aoxtUqaQzay07GmPazu/cmDbgwNy1HdkFPwoOaOWhp
   24.33 +OWclnPTiTiOJPvLYBL1hS0G1E+RpX22whfTPXMHZNyqYO8HXgtQX/j6XLpWXiTof
   24.34 +mNFUIS8MGCERTO0jLdQqLg4jium9Oj+sRbVzEPKsPWcmD5iDxRiyDLbQqq1m6jDv
   24.35 +PbSfUqWTsZ7vvCNvi6G0z9bBZRfuEvejOyKiDNBdPS2KGyvykdEjmo+7/xgFBGur
   24.36 +ZBLw2cq0k22V9Ml3F9/eA99NE7yXMKhxAVVAx0hDNyY3Q1bgfVBn4ZC61HxK5QGZ
   24.37 +GVtdbOvxMS2Y+xq/wD6s
   24.38 +=ooYn
   24.39 +-----END PGP PUBLIC KEY BLOCK-----
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/test/test_keys/pub/priv-key-import-test-main_2-0x0B74809C_pub.asc	Mon Apr 16 12:45:09 2018 +0200
    25.3 @@ -0,0 +1,36 @@
    25.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    25.5 +
    25.6 +mQENBFrPrZUBCACnMasfpzRhGDKYjQIN1si1wloLnlfyPoM1QUk+On7Erc3naCYH
    25.7 +DgUUc22oqbBBC1pn5yZpkELg51X3kIJQ+91+iZEHFoqkq+EmjLpmqMqOR//TlAI5
    25.8 +vnxTmwoDJL3PwdXqps1u1pP/ssb9VsZTECA8D3yPBoID1Db2ZhpoMM+u0dq9Rxty
    25.9 +geL8vkcucTMTZhIB9lg0S3R0WTqNPxtWoZiCPjwwvgTbJtI33HrePJKrTqgCCb3K
   25.10 +4CmJsItr14kPArX3cc2ohJvI/6TdpD2+t4ns7RZgB07e94K2LmsZd86nArpZRPiT
   25.11 +360VPibE5DFf7oNCLervmaghjCmYSv6VqauXABEBAAG0QVByaXZhdGVLZXkgSW1w
   25.12 +b3J0IFRlc3QgPHByaXYta2V5LWltcG9ydC10ZXN0LW1haW5AZGFydGhtYW1hLmNv
   25.13 +b2w+iQE4BBMBCgAiBQJaz62VAhsvBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAK
   25.14 +CRDC5ktSC3SAnEjvCACheUkZAlDcXQhwhZ3KuwIcDhAz/w0xK1svzwSdMAH6sRoO
   25.15 +VnwGkKunHiw87BMi2mlbcvFS/YDReWx43vjikW9HDcU1RdwVuZD5Hid/cpogXn/a
   25.16 +IRTgtkwdDozDzUgegpraVCP5wpJyoUctmbTKFiil3y4mqv7wVqR8ew0xxGKp8JxN
   25.17 +skI3e17KrSCMtHDvKruT78veZW6SiWOX7UK7FIAKISamkJjOB+HbBMV079W/cG4d
   25.18 +Xtv0Fksy5f+6a8xLLCdSo1tCY9/c9j/xe8rHXpqIksE3uVT/ASOxbW60FxdWMv0g
   25.19 +s0E5BQgxdckBAmaEckgU8047ksVh3ofZ9ec2U/JduQENBFrPrZUBCADS0VZ4WGL8
   25.20 +1g0fC1Vq0589ZHxxWvDg3aE8/PSN0FeOOsBnI5Ac/aM2zHaJWStwzacVkC6e5xyJ
   25.21 +SdClvYM58U41NU39IW8e7JEEpH0oaLsq6qPtSAodore4LKFMUmOYsW+c0HdfjsxE
   25.22 +/othiLJueNA8PqoCB97zxnXT2M+nnlzaQea8NS6dQdkt5U2zVE9HiyKBqu/AKx+H
   25.23 +P8a9hO5g8ALR0OdCA/+0hlz0mF3G+Hgw8D0War4X3pWBiLSm7Fm2biY+jCJrUKF2
   25.24 +gJVCoumfCCRQWQsGDyVWJtK6mkFZ7vus6MJfbUEqatmbvFjqrnP8qGohHrMsk6VZ
   25.25 +HIBjSCXA/jTVABEBAAGJAj4EGAEKAAkFAlrPrZUCGy4BKQkQwuZLUgt0gJzAXSAE
   25.26 +GQEKAAYFAlrPrZUACgkQ6zRDtFIo8nzUcggAx+qKj0jB5DtV07zjFBC220dMLB7N
   25.27 +flQu9gjrxOLQY8d+WaU8IawmAiautdlSXslvYpjgvaues0neQxPOcuQklkOxtAMC
   25.28 +KjQx5wvJwmB4LdDHLa2Obxve7saf+tGW6057Vx2n0Xc6XTefd830yo4uzgLj85+b
   25.29 +JV2MsglR5gMMfXu5mr5vuaaM6ZWEFWRE80Vv0CFhDLGYaz9a4gTpvte9E+bQpD5i
   25.30 +jvv8xR84LQNstlux2un7SRcDo8DwkmFfcnLJRsG4slcOOHOXovHB4KZ+sEJ6ERW3
   25.31 +IMGUAKIlS99vntTIcE6G/xWdNow+YQbxA3Bs+JK8X2EBVI/5R7DBVp8mjkN1CACP
   25.32 +9hLUib68hgEWZ0vUZLaxUScRZaq1cdwMOEZi7h2LTtqtnEsWWYN1E3G3Pe1zPd9q
   25.33 +cEUZrCo1ut/lXIVvKKoOj+rGTK3LMkQzruv2cXxLkSoVvJ97Zj1Vyaks/wWqkhNs
   25.34 +Dmrpsrhxw1WG4fCeWrnEzyQZJyYI855TByfSxWrCrWkhQeY09+S5NZj5cgMaRBbd
   25.35 +y9JLuYFKYkVk8az0IlOj14mjAbKUdvkEt1y8H+TQAFiKr462fMLVN393glNnlMif
   25.36 +y7kYXcxihs+CPwJreb+4zuO1Bc0ha8yQxB8xbjb+POkRZ/ATj/b9I7B3lO713HGX
   25.37 +HUDAF9TeXttRXbSYjFHr
   25.38 +=/QdH
   25.39 +-----END PGP PUBLIC KEY BLOCK-----
    26.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.2 +++ b/test/test_keys/pub/priv-key-import-test-other_0-0xD11252C9_pub.asc	Mon Apr 16 12:45:09 2018 +0200
    26.3 @@ -0,0 +1,36 @@
    26.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    26.5 +
    26.6 +mQENBFrPz6oBCADE+Zyw50I47+xY/TKJNH9+cpgaUciU/mhMxMdZug+cvAiNBoOF
    26.7 +tWqPfB2MjcnmhSCM0oGYDkRI7au9u1TVG8fAZ7kOoT3vLosKxQtZdCYWSWHCsMIe
    26.8 +iSZoIDPHXL3cM9410HobVB4UBmot5g0J8hXkkTa+nzArc+kjX+pEgtrI2uWoelVF
    26.9 +msAOROBU44gXudwudcUaql8ZzW7nPd9rmAFmOXnhNvW2TiQe/KLTR3L/Gggt1Ytd
   26.10 +nUejzGrioWf4hZX9zdLqMm1a8H+KWYJdjjrIBLRrH1FUXXPQxSuHmSEtlnmg9L9X
   26.11 +6yaaNG+XhxCAoNaSosqxAWqJERzt5lyIRo0pABEBAAG0RlByaXZhdGVLZXkgSW1w
   26.12 +b3J0IFRlc3QgMCA8cHJpdi1rZXktaW1wb3J0LXRlc3Qtb3RoZXJfMEBkYXJ0aG1h
   26.13 +bWEuY29vbD6JATgEEwEKACIFAlrPz6oCGy8GCwkIBwMCBhUIAgkKCwQWAgMBAh4B
   26.14 +AheAAAoJEFp6NjvRElLJxt4H/3W4wp3PQbVw1vo0FX7/IY4KwSZLY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0ZpAo2y3My
   26.30 +BpBTCvIVZ757R8jzPYeYvIUEFU+9ctb1k9VOzA0T7Okdk0KUvNtSDOZ7EMK6IBgI
   26.31 +ns4NDX5tRJ9pFfn81R6/yOLZbLZvJYDIc1+RBKc/A/XbIjA4lKhpH+F6vi0a3DBL
   26.32 +lzYIAJyfJf/nNkKW5J3cKDxm8tn4/3zckCb2qhgXl6jeXCffhEk1S76JcgQd71bn
   26.33 +qYCTseJ2UgY15QB350F3wp8oxepy5Ir2JG9+SyhRt48rRKEBYaKDHYSyqfym+u7v
   26.34 +Asl7qn4QIiLrgZH7J2D09kV3yLn2+b2fnOOSNcKb9AZaAcW9dgzh3CFUkYmw8A74
   26.35 +o0m5KGFK4hBvyMZl1TTCweMt3gAj9GSsgGwUvRb8B0tGuPBxsiyKVWoBbJIPwNtr
   26.36 +knEkJC/LsYYP+JCZiKQWhs/lb9lPF0DeuvrVkaRZjoh7JkXilMPO6tX5IZtITxR5
   26.37 +/KyR3tmBE7n8QWXx0BFAKQLbAlQ=
   26.38 +=2XFN
   26.39 +-----END PGP PUBLIC KEY BLOCK-----
    27.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.2 +++ b/test/test_keys/pub/priv-key-import-test-other_1-0xC785F20A_pub.asc	Mon Apr 16 12:45:09 2018 +0200
    27.3 @@ -0,0 +1,36 @@
    27.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    27.5 +
    27.6 +mQENBFrPz6sBCADMI5LmOShV4onXlwzqg3EMAqGp2wspLtSoNfe/32/qXDX7V+X9
    27.7 +d8Q7IXyYT+EFT6VylJAk0uoFgmLjRyhAYTmCTNxRbt0v8agVqdIKMP8hN0MphzYe
    27.8 +stYJDOfzaNh/T5d+jIleFflJ5Sqpv5xC97b7JQhF186MFu1k+Xp2p9Z7i7PgD0kz
    27.9 +G7lBfoXw8Fn9mYciFCB0Wa4IJ4FrHXVdkix3Q+lK2ypQR/INRehrdgh86XxEOp6J
   27.10 +SOuKsmP0wL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fU4Fb7YjyAUAEQEAAYkCPgQYAQoACQUCWs/PqwIbLgEpCRBfRb6px4Xy
   27.26 +CsBdIAQZAQoABgUCWs/PqwAKCRDnGVof+W6UqtjPB/wOtJ/kiTXE9+I3krk98BFU
   27.27 +KA4m1T269k02vYkqH9YXZx2LtdicJFNt2SYfazXxoako8EseTQl+ke2YQZVbsbM+
   27.28 +/gcui69JfzSwpnP2TXgtldPl9lU9uUCkb7cuq2VHOzpgv1FqwC5S2jDiRGCmCwEJ
   27.29 +78/YCC59Ifvp5f6NwTKg8ggCO6e5kFN1qYEkoY3GViR6Cntyj0HhmrTlsi5EkLwV
   27.30 +8cqyZiZuPQR2g7X/zeweItV9sV/XJVpOeowoOA5rVs8ov6jorrAGHRa6cyQ8hcU7
   27.31 +1u2rndEeqLE6zJQwXJAsT3RrfgYP6g2O27aYz700F1BepDzPWq/rOh1QL1rtVD/0
   27.32 +SxsH/jilplZgJkBgcNldsEavYivG1ANB3pFozvyg7AIvNNriaSutIEeJU3CeGfAK
   27.33 +W0mD3c1UTK+VvyyfhK99CHTdoaybISMokBcL3wq8GNqHKD9Kml8phB7efHUk09Gp
   27.34 +P5HSWET0TsvEgoqC7s2oLl4tr0QAhF8i8QKms6luMrSaWtp9epmWcP5P5KXhrYld
   27.35 +mH2hM7msu1a1d+5kHoQMpuRs7sUAZtcAvTixSZRsyvwaBeKNtSR+V5b+j+PhQ3yS
   27.36 +VzCuSYjwqOXCIlMatYE1fJs8tXZ/+IpGPEu0SZgrotrvARKV0RPWpjI3JWKHaCAC
   27.37 +8e+WJtt/CpvmTvw/xn6Lntpa66s=
   27.38 +=eOZU
   27.39 +-----END PGP PUBLIC KEY BLOCK-----
    28.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.2 +++ b/test/test_keys/pub/priv-key-import-test-other_2-0xF26F5504_pub.asc	Mon Apr 16 12:45:09 2018 +0200
    28.3 @@ -0,0 +1,36 @@
    28.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    28.5 +
    28.6 +mQENBFrPz6wBCACt10T2hoQS6x34/VvM+FgREyBvZahsfL66za/xNtP80w7ALK6e
    28.7 +TlNjR46c/vh1CW/KSRL0AGOU+BvvxymS0ob2DmiDD4/N2F83oVGMfNkPaQOQayuW
    28.8 +xOLsg1x7PzaSlZbAfKRPyafGu5KLrq5HYHFnQm1r1QDgxTbH74vRYQjh10oisVqX
    28.9 +MEl4LkXraXX4WcKaSLsqpgV15HsEOKbz1j1LPmPFvICqJcX0tY2KDjIBpyNAD4Aj
   28.10 +fKBtM1mj9wiR4euwEvxl97xpocCLwHwt8iZ1FdlzUtPG3rPj94LlCpc3zi+AdM5g
   28.11 +nT93mo30WZPB/SpUkWzBGGhbk+UMo7YC1qbVABEBAAG0RlByaXZhdGVLZXkgSW1w
   28.12 +b3J0IFRlc3QgMiA8cHJpdi1rZXktaW1wb3J0LXRlc3Qtb3RoZXJfMkBkYXJ0aG1h
   28.13 +bWEuY29vbD6JATgEEwEKACIFAlrPz6wCGy8GCwkIBwMCBhUIAgkKCwQWAgMBAh4B
   28.14 +AheAAAoJECbYH63yb1UExsIH/2WzjCqactsKsDUn8jilP/h2/kb+FeEd63dFvxRe
   28.15 +BtrA2XgkELfpN+91t7WBgwFue6USNA9sNcS64ivIc/0MthoJHBQ7ulbH6wNmK6/d
   28.16 +hAgZO7mMfPQp5AtTYfN2Xb5klKvWQH+PTA3dWSXTi1gGc5lXaPHkLlj+w3jOM2iT
   28.17 +ZVlHjiqF+9O1ITDSAZ/KB971/maycfUto4JYfay4gN/s0voSMW5LU1xZmLxMMLQJ
   28.18 +5UlV49ckYyKMbqTW5veQCR+QrlRdMird6DYePAWhgya4S5hpXiHJUAJwGqQnLfbk
   28.19 +t/0hABo9Crw8UkdbZe3Qr8hUnRNPmRTOwb2Yzqam/o3azJq5AQ0EWs/PrAEIANll
   28.20 +4WtrCxU5nLryLftuUz9BKFrvD6U4RAu8DPKYX8t4Z5rRkXYYtBkhubEq8E06dUzl
   28.21 +Cn2wAUUE/A/8QTrKflNpMXIo/evwPWYBbpIoJ1KpDC3WF6VLBSmf6D1U3q7eT6e3
   28.22 +e8GPb07FwG7Ygm5EspmQS1j658KAsV8/2CsI8UtMOffK46dUthLyoaXk7nilwwQY
   28.23 +Z4qPJjLbfpzZbv/vG4WbHpqoVNN6DZ92TCz3DRAfS8VD9QJCUqUCz5tEAilnn619
   28.24 +e74euRGnz0HyAzZJuvs3yy2/E6mAPfdZKeNwtJgVqRjQrG57Ma6ux7a+dfEqdPUe
   28.25 +qerZgi9Sp+faAhb5zwcAEQEAAYkCPgQYAQoACQUCWs/PrAIbLgEpCRAm2B+t8m9V
   28.26 +BMBdIAQZAQoABgUCWs/PrAAKCRDVZ/azXGJIUMezCAChRI+nihF+aE+yExmyg2rz
   28.27 +Bwv7ued/vjZEP34wHL67oRfuh8WMvxFahkmlPJoW/LSRk+lf5EkKYsBmaRtUhJH1
   28.28 +nGPPARw7VmZ9TmmdWkklIyeQuJMUXrUoTm82to/2n7tZxnOoDSzGojvl7hXZAhyE
   28.29 +NIcJlsbIALOSfvWybX1Q2PR8+Zpmy+EYrELIdeBxzNoqWzAyM7T9ncmBBXBxgorF
   28.30 +YfOBG/N2uDn1jpajv/i3FTKAD1fIPhYE7KA8EM3YUWtPaAohAE8GkXRuI9yADTh5
   28.31 +myvpXXP0Nr1wlQVUL4AB5Z1EfLufQ/R5mS5y5W/WEZwhqcj9vBJAGalARd/Effn+
   28.32 +PS8IAIDr6M0YwLbK4akDntQLOceDi5RW9oGLmAVZF+ncuF1J4eEuRpYSHZ7SfnF5
   28.33 +KhZZXA2U453ZZJK4it9qa883+a98O4KD6xiFAtkxKEd4KxgRPKx9u6q03evfai+J
   28.34 +zm4eBtbGGA3hPiTHYRgPmJjYsEcKYFHkIFG5z+lzNVWLH892dtn7DQ7PDF3xDMe7
   28.35 +peNS4g2M67iHYotwklnCafCozIFbLSDwAiWH07UUbOuFnb1kbjxu/5WH/OL350Yx
   28.36 +V2RIg0UlWZqnoFbQFXZGk1B26TyL2fwZY4ImX/5VZNBLWzPTgtD3/UPsSxT9fggb
   28.37 +iA0f1dMrzZoAZVQmaMqaeGTouYM=
   28.38 +=F5ZF
   28.39 +-----END PGP PUBLIC KEY BLOCK-----
    29.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.2 +++ b/test/test_mails/priv_key_attach.eml	Mon Apr 16 12:45:09 2018 +0200
    29.3 @@ -0,0 +1,184 @@
    29.4 +Message-ID: <pEp.P74JAT.0V8ST1NR4QM24.AF3319ED-96D4-45AA-94C6-91640DAAF536@darthmama.cool>
    29.5 +From: PrivateKey Import Test <priv-key-import-test-main@darthmama.cool>
    29.6 +To: PrivateKey Import Test <priv-key-import-test-main@darthmama.cool>
    29.7 +Subject: =?utf-8?Q?p=E2=89=A1p?=
    29.8 +X-pEp-Version: 2.0
    29.9 +MIME-Version: 1.0
   29.10 +Content-Type: multipart/encrypted; boundary="1bf5eb907b76716d2b9eab6525e9c2ea"; 
   29.11 + protocol="application/pgp-encrypted"
   29.12 +
   29.13 +--1bf5eb907b76716d2b9eab6525e9c2ea
   29.14 +Content-Type: application/pgp-encrypted
   29.15 +
   29.16 +Version: 1
   29.17 +--1bf5eb907b76716d2b9eab6525e9c2ea
   29.18 +Content-Type: application/octet-stream
   29.19 +Content-Transfer-Encoding: 7bit
   29.20 +Content-Disposition: inline; filename="msg.asc"
   29.21 +
   29.22 +-----BEGIN PGP MESSAGE-----
   29.23 +
   29.24 +hQEMA3tc/VFAGHIuAQgArxj6Z3+qUjvbvCRds8G0MRD4kbN6qKQeTomC4ACSbp/R
   29.25 +skwIJwBzVcmOFlmFjD2Utpq9k0oYnjjAAKB2LFJtAf0tdugzsq3PNXRHwJkIhwaE
   29.26 ++l6irh/GlbF6emEkJcqEuqmqyyIAaDB4Th/YZNMdhbkTrUaFsJJUVNJ4wgI5xgMv
   29.27 +wG8eKut2mQM3TMMXC0GcAl1hO24jGoLccTPhjLZsClQ0wPBt/Zo6DZ/U2a1SAnE9
   29.28 ++5rzL+f8DRc71d4Q8ahgPjv6YFquwJP5SbRWng7Y9HoERnFSULiG1BqxhZvWOHBC
   29.29 +jsUIXuuVUPdQ8Dkf2NMovXKw8Jar39T/6ZGOPDI2FoUBDAOK/P82gcSJMgEH/318
   29.30 +rWzjFq3tVqHkjVKAt9XLQA28CF3hq9FamB4D3gTg85t5Z5aRvl9tCOVl7sCfzQov
   29.31 +mSAHad/2Jm8LV2W3i+y3jznfNo+7gIfW0J1KHXBDsdhXZyU52Ylg8qDTrUstSls1
   29.32 +sBV08UxrbmOlbdRHV61CaZ31bJleBPru4dtenOJQGZIuxjAFEbb2EwNO38kZNQ3y
   29.33 +KEvK84jKPAIx2iPkfl+ruS461zb+iQpIsaGS1vKp19yZwwBMal2/v7/JcQUlt27H
   29.34 +/7UmseANMjCB5JfILBIRlnVXcaJtMpaJ4PnYt1OieectT8vEKYyOrAK7iYQ7vFJo
   29.35 +CO3SBSRP4UKmSM4HAbHS7AHljGy1AN5I75bJ5BWciL9HsmPRJYsQpHHLt7IA5W6l
   29.36 +D53RPD2B7JkzRV3B1wWPiXfaNHiYeBNPIzOMNiGmZdgBZ9pJRUGzthXHHIQBBOxX
   29.37 +oxsQI9biaYiCQL3cvlVMvPG7eKt82zzbZsvemhPF3xwWpJ7tlLMrdcJzh9HBGeJ+
   29.38 +7N6fh9jt8XbAF29ruO4lSoIu8triOOsloOEb2e+pMrvOMmSP12uJCY/yrFFhCuhi
   29.39 +z2yyRDqAfB7J8uKYbCmY41He+sF3IcDJGyfDdaVK5fv4bBUMcmYdzVUfZfBaNI0v
   29.40 +50wOhkOvg50mw5egkHD5ppX4PVk4Bx27OMU23XbLQM6c7VbBN2HH/R2+KN3FuHVE
   29.41 +m56rartfyxyr2dIPixwAiAV9TiJIx997g31KIgWflgb0PJMYZsik3PrCbJAZBr4q
   29.42 +PG80mwKvdiFA1xH2/JpGCHhorvvQoxuGOFvhGuTeZ5NyrKR28IWEk+TvEu5jmxxj
   29.43 +yCD7TA7ldjx2G11z7oGnJ89ErVf2ClQ835ZHyr2z3Hm0gluqppM09Sh+jvqtYenO
   29.44 +0FihhiNKGxG0CWReO8LaWq4nXAmxoBJklCqUlisxxTeJeTigqhMnv5V0myi4iFKR
   29.45 +Gr4gUSLu+XhwugCU+fuWzpiaDIN/Q747SZdZmNOAA7puxrO49q/7v3iKYUquGufk
   29.46 +Dz4TSAzVIJ/VEIojV7IIMv6GzXfqAfz6OkJVZNo+L9IWlYwr2xCjClEO7PWXswGl
   29.47 +MFtqBWAV86lvSDAvwIqgr8reDGX6vMjbhZQC3G8Oy0+k/kNmHweIskK0R8LeZiZh
   29.48 +0I7gjRDGEHDTDZuFafxO2w80HEgfxbiI/7cIRKV3dEMfrlwmgPTOl9C1UiUal1aC
   29.49 +pMnTUYWC7Gg+eI/TCPxXwQnzE1JTlVsqWepMlJMevUZvSwFcNqjsGxWzYRqDRq2I
   29.50 +ItkDDkqFMccVBOeF9Jrp/M3vZfQ4PyWPmAF/YqOi3FsaihFiZ4TnShyH2XIEkAK2
   29.51 +/8GpdSdPBOOjmBG+mCAvo1IEzKRizQ3biaVkR1wh7H/2JuIcx4BL+A4xkFnFfFe2
   29.52 +OsoS6Ru+7dTqTypjPPUMrWI6d7lKHvD55fJT5S5jDy7GUK4B8o2ae8I9Nz11vIt+
   29.53 +TyFf+WuO7VPkeBWaVqp9why5bisLhuRpb/f7uItVEChsqLj6eV6CTr3nht804nRk
   29.54 +vHKQ8KQbb+2mAarhzXaG97eKeI4Lj+XEGVJrIrixvjg4qEB0oDguajuUZc1DIFXi
   29.55 +A+JcOjzB1Nix5X6S4I+MV7rstUwJy9hKucY3liWckHeSAwLPcPQipKa38F7eCYuH
   29.56 +7ajbQJvXEeT26QEtWBqX+V4DlXEvVMKqXtRCptMsNTT17Fl1QK0ZCy5Np9CsNJ+H
   29.57 +Rr2afAc4ptfSrGoICpHd5GkuF8PyFboKiR8XkUm7o6eZtaxPbszYwiE0rmRR/XY+
   29.58 +WdPHXfaSzpNYXximYgzDKjteEw4O7uy/BDLqcvfLe8nuyn4xSpvbPdX0cBCOb5Yo
   29.59 +yhYfffeumJvn/L/rwT6zg51O58l9NVLj7bvSBVbCi3JQMZzDPUfOIqsTuXhV2uCM
   29.60 +ZbryRPDTL7uPkPtetz6Qu8+xtRAgRbip/aS1H1Kntjklu3P61s80ObB7yJ1WlcXG
   29.61 +r7biS+xjLe9ShvA4BcedQn1ocPjYlep4CulLX1oVKfW1vJaE/CEceQkXqgJkUvoM
   29.62 +Z3GbHu8q+cpOM2Tx9PO15oQD+yaaqNewoNBLrcjkbDJEAYiFay0ol/XgEhF3P+i4
   29.63 +Jq+EpB8bbAYbPpEKE4rFTVHqn42s1lkjekW1/cG7H/bGw/ynWiQmK5AMLmSdssht
   29.64 +kEbJgcj5hqk4bdiJBtHxbvPvMBFQ6z5/QMkHgoaRAnyIoyAk3w5y/b9GOEFZRig7
   29.65 +uh763Vau50F/oUPEwyhzYUXzqTnDk61R/inyXNzx1IU1pnijbL2svmcUViUhlF4C
   29.66 +uuzRLMkrqgSsDLXZvAx0yL4yJmutpGOiipIhexQ3287idNTHeolsMxLVaSXwRF7s
   29.67 +O+bi5JYUdaEoTHNQGW8HgZHuMyqiKbX5dgXtSBD0mlqRvRZWWgQXZEWepv4oxcZ/
   29.68 +qTW2oelDPd3TaBIG749HoQODUCGsi/ic+Q6G0KRBiG/ryyt0u2FGdlTVo2HHrSbZ
   29.69 +C4tlNRn2eY1gR//YOdg+XjvkXBRcHd/Ma1JoAIVegQZeCOpKTGFGEMKzNq/18rv+
   29.70 +VcFNnxj+qzCZMlJrza8K6PXkvW5iXj5eWZBhemO/1zOe/57EbTAgS1Rb4ip8D4Xo
   29.71 +ddRp+Js7jDx/pqHyQxdORVbzplruihACiw2Eick+r2QJixG2MUTgK8vNnXyeu5al
   29.72 +96Gn/G4xyOS5dOCf3omzvM/dhGwHgDTs/Ikdza8W6zXqAu1Uamfqon/DwlOGBSRC
   29.73 +6abrGmc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  29.118 +fNUxkekhoEjaFDDu38xmzjqaZau3Iu4SVygW8owhkFtY1DndKqg5Azfw1A07apUF
  29.119 +Uche+kPeWHlkIAHdfO7hoy6wg4zTHxW/e2lzHIwAEKNVg311ST6ojCFe99SAZ8Tm
  29.120 +tdFLNa8SGwmqtBfjY+A02toQrVF1Ypl8GNVZUKt4ogbraeZh8KA3DSkY3B67TotT
  29.121 +1ETHDwXrAXsYMyxXklEBZUtXYVMw9h+B6TjZbYvzgiYxIxhINAH4/8zbK4/23X/J
  29.122 +T4cwusQhBEIktBDx5Kl2YcCKpuPJIX/ud9EpB9DfO4IYoCLr7NqZAD/m0tlFcHvX
  29.123 +7UIVygDy/Fa8m5NFUp27gfYzIPhDtIX420w0+tGE+2j2DDiZ5buonxlWboSSQtUN
  29.124 +UfU+RNs62iCxWBDChHDQf4ssu1Z9s5f1bpRQ8D/2bl+qbP+tIkVHA1Z+X3z110HT
  29.125 +Nvvm+fWyeHJC1O8VnGgafjZUP5bi1mKvr4VUFeArsOJYQIj3L0TJWHvE3LPs4YnC
  29.126 +2rzLO9b95dtXS4oRUhHbJ6w5x4B7J/2eV/7XiR94iN5glXEC39oXU3/LezoPlcTt
  29.127 +6nbD+JUrqiD732rz71RCb2F47bj5L9sSz+IzrL2pMf/JckEH6wZpx2SFajZ9c0qz
  29.128 +DTeupjEC6EuOy5Lzs+SA7Jg06UqdYeu++AtHpyABPnLITiL3g4JHinpwuMUSAD9h
  29.129 +Y+AbkqnLr8wPFTzP5+Ve51XBujHfVR3hJCbjZg5Di9PpslQPQZeDmwshfb+eCajw
  29.130 +TXp7j122u7M8/34tLY4YhQ1eEI84pljdtTD9zBJrlzpfp0BsOG0eM3RQvi8eVxvN
  29.131 +TolH21uyMvC0aiRhP/zdyqQQ4WAuF03kzUPVpkRl/aUYOzzWm90JOUyXIVsTRa3P
  29.132 +M8DAxSp8FlNL37fCoRub++x5SDZlL9aXYaEG1xPlz91weRFVNe+OLC26g0Ftjc+h
  29.133 +TT+gOxFSyo14XZdYTndqJjtVLYMhxwNBqxVlac3OFMy0X9lq1sJuWF/mWAC3vdsV
  29.134 +lZHgInVKnMlun+YzP9obRJlej+vBU9oURsjkFeCnHY3F7BzK3mTFok1tpCtM/U9y
  29.135 +0pKNiU7frFenBsIpHSK7ZRolpOxlNA18qyseh6mLYJxVrTUCNKz//FHg07R45j/6
  29.136 +GtKx6/JCEWvE/T4xHRaSisXRgQ6gZTLMw+s/6S9bBqbBbTUmUribnSqFscOPc6Ao
  29.137 +HR/fN+sAIduMRElf6ivBqcYm3ced7BSdJIuZv/I/V8Dl6YIFixpeqh2mlvh055RW
  29.138 +9INqkwPZv9BbXyBAS7VjeWxgUcoX3OXnHoxrs8VOV3U5B9wpHemxInLbk/7OnEr+
  29.139 +fxyldbu4AeVkO19IiLTJzw1oWe2Brg9wpoNobMAOnxQdBrCTfNB1JfNHy4efdquP
  29.140 +QC65GkJ9rW/KmMb0ieyBdXLbJdb4Tj9zCXNKmvgBD0Xf81vWxRv/dq1f1HphwXSs
  29.141 +PyKcEHy9yqlMUaTwGK5ib7T8Wayu0+KMNWOQrlin0hWAjLRLrS4yWmJwXXfmLmp9
  29.142 +hUTqA91ajLN+5b/zfvp/+Gl1RvadsAkY5ChO7NkRuLTdywfYiR6XxklCRcr3s+Su
  29.143 +H8AVSSPjmWIXyVdRKd96lPAlcx5DVbq7BWIyjhcrXwmslfyNors6pmXgWCirDtjP
  29.144 +cnjzUI5ouxD9jGC47GsMfGbj+biyencMP+MFZbAuQ7mpBnqTMCFcYX8t6l5m3mKO
  29.145 +wMgI+YfkVfcnKiFRNEiq/2Swl5w/LVAJCYjcQ377MZyXdtF0pH1QwWWKs3aC9SVr
  29.146 +YBRqWNnVWPQY5H/KXYFxAXqv7JP+71ioT9JW7NArqnQyGQbh/mO/PDBAHXeyXAkv
  29.147 +VIY23xqhwtLNN7WclHQUv7Re2qHq3ZGWhg81k9yu4MH//ycUufPGoxTSBZ2oSumF
  29.148 +frMh/pBE+GihChwJ5EDjORnK3eM+0ZBmOyaKq+1yGH3v1c0LKdulXEUjQLTA7Ycl
  29.149 +oS+su/xbUoKJexx/Wqoo4K3BC5oJs0TZUK70kuvpTqRNBAQFCnIgiqqyk+6sIvBS
  29.150 +vxfdrBGWM2pqZhNiGwcHTH8E/MBZUDiI2++Lyzt+2BBYO2BdkUohNy7+ZmguGOPG
  29.151 +Gl//BzAhaUC+AxT49s1VRTZYQu59UdyJywAbalkIs/13igVQi4+e0r65KQYKcHkE
  29.152 ++gHjz6nTcgK6syJLJAkR1JRqVYND478Rof+1W7PCIFv+DuN8J9eVcUU+/0jJk+cd
  29.153 +LoNyaORXNyxPGAvhbZtfrx65SF9Q43oWATq4OogVQf0r88G4u6/286Y5JD1BQs8J
  29.154 +AxGLofgCJWCHaujzy6Gq0u/+4mehSyqY6icWSQePxA0VhJ2DU8/Wurx71Xuri2YE
  29.155 +z7x5nNZzUYf3/JpLl2QaxKlzxIEWqurSsp3blPwzeZVCdYOZz7a2glUgqKugCxtO
  29.156 +Va2ikY5nfj3cmurPsoDC4IEZwIBScwnKUK9Lqz4LwnrpYiz7wmyrYfct5t00gJZ5
  29.157 +dSbPWAW2SAkpqLMcExIZFAulSs21a718VtJgtfRVheJS08fS2+c5n9ot8Esy9AJ/
  29.158 +YxrHNwaRYVGoUEXXZ64AL2r7hsJojmK5zGppRq07PnBacsNh2SZLdJZlmcyACuPl
  29.159 +knRrVm+op0EEyAm+FLr2Ko438FDaHRvCJ0BDG4jXUz4WfbjNGpZ5RRpET60xFFJh
  29.160 +TFrH1q0GrWGCt8UXOOYjPgsE6KMF8ZHSHetuOHsf/bytn4hU8RklE64Ur/lLRjhQ
  29.161 +A8jaWidabnDJgCTfZtVGOpJ2E8VvxMrBBBSyRUB+cy/v86oc5JWCGVDKzKBOTHyj
  29.162 +hUJtuwV5uBHxL16R4cEoKarBaFnE+/k41zOOkKQYlWsZAD21ah8s6NS7KkEXd9K6
  29.163 +oxDt7WGoe6W1VfjNYoJRgZTpVCZhNR/CkDbUL7EATfGL64/wSz0FSnNIqmmRsJkA
  29.164 +05x5j4kKqRmgdMQ2OspLJ1qgvdmciIYsaclfEQnHPqTCgh6BjK4g2PHV/ja/bINa
  29.165 +RcP+J0QyWsswORYE2WqwqLucT7Tyhqi+BhW3661MMz7yekACqRHUCpwtpa+dusek
  29.166 +wFKl5MA//2qWxBfJTq90+13aHhOWq80r7MnM91LpFhCca6CestV5v3J1L8kRFfS+
  29.167 +hi65dZez132+VW9P8xN2mRekYLMzH/bvGC8ksOnFa812FxHNywNv5xasgSggH1uZ
  29.168 +xu8G6soqp1A4u/1mavJxTYzvfakfsExfV4VCttKcdZzxZUQPm3c0EYF1zKdeD4ld
  29.169 +HYw+PULXM1vfVPzn7v/cdbieUU+5OWDFzgSdYbWWOhaSPfQIXDDw9xRuIDgL67DC
  29.170 +7q4i7gk81iBS7y6tU2jJWDECSex2qNLI0TqqTK9qKn04BXV8OikhO/nHQa67+WPP
  29.171 +JSZohy2b+rqBktZbrMv1GvEiqmWLxdCBS7vsR6XuEGKR9aXyklOcSzmHGKdfPt/r
  29.172 +o5xjREBMNBhJcw9t/1iOoN/cewHwT2EQlmpt8f35kj6fUEr3xpE61N6fj+zxauhK
  29.173 +K2Af/4PCbcFSHSBUj1Gzue8ddSOIbJflJOp38NMUStEr4X4Bu2uKcE7jS2452Pop
  29.174 +22TArAqYJamMXxWBjVSgl0so3ldO05502TUSMNF7iyJ41lVDGZJM69fkt9JnjTCq
  29.175 +YXYQ22banpS5hDVkJzT7KH/1hINnw/JWIwMNt2Jzoo0Mvcg5vlMQNrcKX9bNeQGL
  29.176 +KwoZg1XBSYyxMwpLqN2AY4T/TYRaMF3ArYNWhxJoVJPPe9FvgzZu4371JedyXFVk
  29.177 +iY5XZD/uX0AxllCn7MPe2Fb4smW1J+PWp8UW+LrvK37OrWIiXBnDofsRb4RzL0nB
  29.178 +hhB+sAfTqFrGEoWFiDYmKNPgtNUbKFmwLNTnn8ZqianA4Ucn0/7bBe2hIUQuTxaP
  29.179 +jawHIFn8XLrwIAG2aRQg2UiaYupuCONUfEACaKql/qEyrQ5zyaiRiyalVU8JlJZ4
  29.180 +vFKzN8A6AaDV/ztzuS+M8p1bGFtQGDl0oS87cKRufgyPcA2IXFvAmxmITDSQL3xn
  29.181 +4y9p6KcbUpWVNe5PuLUKAUv1d/EYZLrNOWuXn/P0fhc=
  29.182 +=QAOv
  29.183 +-----END PGP MESSAGE-----
  29.184 +
  29.185 +--1bf5eb907b76716d2b9eab6525e9c2ea--
  29.186 +
  29.187 +
    30.1 --- a/test/test_util.cc	Thu Apr 05 16:13:14 2018 +0200
    30.2 +++ b/test/test_util.cc	Mon Apr 16 12:45:09 2018 +0200
    30.3 @@ -266,8 +266,8 @@
    30.4              return "PEP_ct_b0rken_crypto";
    30.5          case PEP_ct_key_too_short:
    30.6              return "PEP_ct_key_too_short";
    30.7 -        case PEP_ct_compromized:
    30.8 -            return "PEP_ct_compromized";
    30.9 +        case PEP_ct_compromised:
   30.10 +            return "PEP_ct_compromised";
   30.11          case PEP_ct_mistrusted:
   30.12              return "PEP_ct_mistrusted";
   30.13          case PEP_ct_unconfirmed_encryption: