merge sync
authorKrista 'DarthMama' Bennett <krista@pep.foundation>
Wed, 15 May 2019 14:03:15 +0200
branchsync
changeset 3683c6914bf63ee4
parent 3682 df9823cb0d96
parent 3680 1e0ce2ec02b1
child 3684 4b60d8ec04e5
child 3685 5d371faa8423
child 3706 3bcb75b270ed
merge
src/pgp_sequoia.c
test/src/SuiteMaker.cc
     1.1 --- a/src/etpan_mime.c	Wed May 15 13:59:55 2019 +0200
     1.2 +++ b/src/etpan_mime.c	Wed May 15 14:03:15 2019 +0200
     1.3 @@ -1853,7 +1853,7 @@
     1.4              status = mime_encode_message_plain(msg, omit_fields, &mime, transport_encode);
     1.5              break;
     1.6  
     1.7 -        case PEP_enc_pieces:
     1.8 +        case PEP_enc_inline:
     1.9              status = mime_encode_message_plain(msg, omit_fields, &mime, transport_encode);
    1.10              break;
    1.11  
     2.1 --- a/src/message.h	Wed May 15 13:59:55 2019 +0200
     2.2 +++ b/src/message.h	Wed May 15 14:03:15 2019 +0200
     2.3 @@ -30,7 +30,8 @@
     2.4  
     2.5  typedef enum _PEP_enc_format {
     2.6      PEP_enc_none = 0,                       // message is not encrypted
     2.7 -    PEP_enc_pieces,                         // inline PGP + PGP extensions
     2.8 +    PEP_enc_pieces = 1,                     // inline PGP + PGP extensions, was removed
     2.9 +    PEP_enc_inline = 1,                     // still there
    2.10      PEP_enc_S_MIME,                         // RFC5751
    2.11      PEP_enc_PGP_MIME,                       // RFC3156
    2.12      PEP_enc_PEP,                            // pEp encryption format
     3.1 --- a/src/message_api.c	Wed May 15 13:59:55 2019 +0200
     3.2 +++ b/src/message_api.c	Wed May 15 14:03:15 2019 +0200
     3.3 @@ -971,6 +971,32 @@
     3.4      return NULL;    
     3.5  }
     3.6  
     3.7 +static PEP_STATUS encrypt_PGP_inline(
     3.8 +        PEP_SESSION session,
     3.9 +        const message *src,
    3.10 +        stringlist_t *keys,
    3.11 +        message *dst
    3.12 +    )
    3.13 +{
    3.14 +    char *ctext = NULL;
    3.15 +    size_t csize = 0;
    3.16 +
    3.17 +    PEP_STATUS status = encrypt_and_sign(session, keys, src->longmsg,
    3.18 +            strlen(src->longmsg), &ctext, &csize);
    3.19 +    if (status)
    3.20 +        return status;
    3.21 +
    3.22 +    if (src->shortmsg) {
    3.23 +        dst->shortmsg = strdup(src->shortmsg);
    3.24 +        assert(dst->shortmsg);
    3.25 +        if (!dst->shortmsg)
    3.26 +            return PEP_OUT_OF_MEMORY;
    3.27 +    }
    3.28 +
    3.29 +    dst->longmsg = ctext;
    3.30 +    return PEP_STATUS_OK;
    3.31 +}
    3.32 +
    3.33  static PEP_STATUS encrypt_PGP_MIME(
    3.34      PEP_SESSION session,
    3.35      const message *src,
    3.36 @@ -1575,7 +1601,7 @@
    3.37      assert(msg);
    3.38  
    3.39      if (is_PGP_message_text(msg->longmsg)) {
    3.40 -        msg->enc_format = PEP_enc_pieces;
    3.41 +        msg->enc_format = PEP_enc_inline;
    3.42          return PEP_crypt_OpenPGP;
    3.43      }
    3.44      else if (msg->attachments && msg->attachments->next &&
    3.45 @@ -1914,9 +1940,9 @@
    3.46                  status = encrypt_PGP_MIME(session, _src, keys, msg, flags);
    3.47                  break;
    3.48  
    3.49 -            /* case PEP_enc_PEP:
    3.50 -                // TODO: implement
    3.51 -                NOT_IMPLEMENTED */
    3.52 +            case PEP_enc_inline:
    3.53 +                status = encrypt_PGP_inline(session, _src, keys, msg);
    3.54 +                break;
    3.55  
    3.56              default:
    3.57                  assert(0);
    3.58 @@ -2249,6 +2275,10 @@
    3.59                  _cleanup_src(src, false);
    3.60              break;
    3.61  
    3.62 +        case PEP_enc_inline:
    3.63 +            status = encrypt_PGP_inline(session, _src, keys, msg);
    3.64 +            break;
    3.65 +
    3.66          default:
    3.67              assert(0);
    3.68              status = PEP_ILLEGAL_VALUE;
    3.69 @@ -2589,7 +2619,7 @@
    3.70      
    3.71      switch (src->enc_format) {
    3.72          case PEP_enc_PGP_MIME:
    3.73 -        case PEP_enc_pieces:
    3.74 +        case PEP_enc_inline:
    3.75          case PEP_enc_PGP_MIME_Outlook1:
    3.76  //        case PEP_enc_none: // FIXME - this is wrong
    3.77  
    3.78 @@ -2681,7 +2711,7 @@
    3.79              *text_size = src->attachments->size;
    3.80              break;
    3.81  
    3.82 -        case PEP_enc_pieces:
    3.83 +        case PEP_enc_inline:
    3.84              *crypto_text = src->longmsg;
    3.85              *text_size = strlen(*crypto_text);
    3.86              break;
    3.87 @@ -3458,7 +3488,7 @@
    3.88                  }
    3.89                  break;
    3.90  
    3.91 -            case PEP_enc_pieces:
    3.92 +            case PEP_enc_inline:
    3.93                  status = PEP_STATUS_OK;
    3.94                  
    3.95                  _decrypt_in_pieces_status = _decrypt_in_pieces(session, src, &msg, ptext, psize);
     4.1 --- a/src/pgp_sequoia.c	Wed May 15 13:59:55 2019 +0200
     4.2 +++ b/src/pgp_sequoia.c	Wed May 15 14:03:15 2019 +0200
     4.3 @@ -859,6 +859,8 @@
     4.4      stringlist_t *recipient_keylist;
     4.5      stringlist_t *signer_keylist;
     4.6      int good_checksums;
     4.7 +    int good_but_expired;
     4.8 +    int good_but_revoked;
     4.9      int missing_keys;
    4.10      int bad_checksums;
    4.11      int decrypted;
    4.12 @@ -1146,6 +1148,8 @@
    4.13                                            &tpk, NULL) != PEP_STATUS_OK)
    4.14                          ; // Soft error.  Ignore.
    4.15  
    4.16 +                    keyid_str = pgp_keyid_to_string (keyid);
    4.17 +
    4.18                      if (tpk) {
    4.19                          // Ok, we have a TPK.
    4.20  
    4.21 @@ -1155,27 +1159,79 @@
    4.22                              = pgp_tpk_fingerprint(tpk);
    4.23                          char *primary_fpr_str
    4.24                              = pgp_fingerprint_to_hex(primary_fpr);
    4.25 -                        stringlist_add_unique(cookie->signer_keylist,
    4.26 -                                              primary_fpr_str);
    4.27 -
    4.28 -                        T("Good signature from %s", primary_fpr_str);
    4.29 -
    4.30 -                        // XXX: Check that the TPK and the key used to make
    4.31 -                        // the signature and the signature itself are alive
    4.32 -                        // and not revoked.  Revoked =>
    4.33 -                        // PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH; Expired key
    4.34 -                        // or sig => PEP_DECRYPTED.
    4.35 -                        cookie->good_checksums ++;
    4.36 +
    4.37 +                        bool good = true;
    4.38 +
    4.39 +                        // Make sure the TPK is not revoked, it's
    4.40 +                        // creation time is <= now, and it hasn't
    4.41 +                        // expired.
    4.42 +                        pgp_revocation_status_t rs = pgp_tpk_revocation_status(tpk);
    4.43 +                        bool revoked = (pgp_revocation_status_variant(rs)
    4.44 +                                        == PGP_REVOCATION_STATUS_REVOKED);
    4.45 +                        pgp_revocation_status_free(rs);
    4.46 +                        if (revoked) {
    4.47 +                            T("TPK %s is revoked.", primary_fpr_str);
    4.48 +                            good = false;
    4.49 +                            cookie->good_but_revoked ++;
    4.50 +                        } else if (! pgp_tpk_alive(tpk)) {
    4.51 +                            T("TPK %s is not alive.", primary_fpr_str);
    4.52 +                            good = false;
    4.53 +                            cookie->good_but_expired ++;
    4.54 +                        }
    4.55 +
    4.56 +                        // Same thing for the signing key.
    4.57 +                        if (good) {
    4.58 +                            pgp_tpk_key_iter_t iter = pgp_tpk_key_iter_all(tpk);
    4.59 +                            pgp_key_t key;
    4.60 +                            pgp_signature_t sig;
    4.61 +                            while ((key = pgp_tpk_key_iter_next(iter, &sig, &rs))
    4.62 +                                   && good) {
    4.63 +                                pgp_keyid_t x = pgp_key_keyid(key);
    4.64 +                                if (pgp_keyid_equal(keyid, x)) {
    4.65 +                                    // Found the signing key.  Let's make
    4.66 +                                    // sure it is valid.
    4.67 +
    4.68 +                                    revoked = (pgp_revocation_status_variant(rs)
    4.69 +                                               == PGP_REVOCATION_STATUS_REVOKED);
    4.70 +                                    if (revoked) {
    4.71 +                                        T("TPK %s's signing key %s is revoked.",
    4.72 +                                          primary_fpr_str, keyid_str);
    4.73 +                                        good = false;
    4.74 +                                        cookie->good_but_revoked ++;
    4.75 +                                    } else if (! pgp_signature_key_alive(sig, key)) {
    4.76 +                                        T("TPK %s's signing key %s is expired.",
    4.77 +                                          primary_fpr_str, keyid_str);
    4.78 +                                        good = false;
    4.79 +                                        cookie->good_but_expired ++;
    4.80 +                                    }
    4.81 +                                }
    4.82 +                                pgp_keyid_free(x);
    4.83 +                                pgp_revocation_status_free(rs);
    4.84 +                                pgp_signature_free(sig);
    4.85 +                                pgp_key_free(key);
    4.86 +                            }
    4.87 +                            pgp_tpk_key_iter_free(iter);
    4.88 +                        }
    4.89 +
    4.90 +                        if (good) {
    4.91 +                            stringlist_add_unique(cookie->signer_keylist,
    4.92 +                                                  primary_fpr_str);
    4.93 +
    4.94 +                            T("Good signature from %s", primary_fpr_str);
    4.95 +
    4.96 +                            cookie->good_checksums ++;
    4.97 +                        }
    4.98  
    4.99                          free(primary_fpr_str);
   4.100                          pgp_fingerprint_free(primary_fpr);
   4.101                          pgp_tpk_free(tpk);
   4.102                      } else {
   4.103                          // If we get
   4.104 -                        // PGP_VERIFICATION_RESULT_CODE_GOOD_CHECKSUM, then the
   4.105 -                        // TPK should be available.  But, another process
   4.106 -                        // could have deleted the key from the store in the
   4.107 -                        // mean time, so be tolerant.
   4.108 +                        // PGP_VERIFICATION_RESULT_CODE_GOOD_CHECKSUM,
   4.109 +                        // then the TPK should be available.  But,
   4.110 +                        // another process could have deleted the key
   4.111 +                        // from the store in the mean time, so be
   4.112 +                        // tolerant.
   4.113                          T("Key to check signature from %s disappeared",
   4.114                            keyid_str);
   4.115                          cookie->missing_keys ++;
   4.116 @@ -1236,7 +1292,7 @@
   4.117      char** filename_ptr)
   4.118  {
   4.119      PEP_STATUS status = PEP_STATUS_OK;
   4.120 -    struct decrypt_cookie cookie = { session, 0, NULL, NULL, 0, 0, 0, };
   4.121 +    struct decrypt_cookie cookie = { session, 0, NULL, NULL, 0, 0, 0, 0, 0, 0, };
   4.122      pgp_reader_t reader = NULL;
   4.123      pgp_writer_t writer = NULL;
   4.124      pgp_reader_t decryptor = NULL;
   4.125 @@ -1297,13 +1353,23 @@
   4.126  
   4.127   out:
   4.128      if (status == PEP_STATUS_OK) {
   4.129 -        if (cookie.bad_checksums) {
   4.130 -            // If there are any bad signatures, fail.
   4.131 -            status = PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH;
   4.132 -        } else if (cookie.good_checksums) {
   4.133 +        // **********************************
   4.134 +        // Sync changes with pgp_verify_text.
   4.135 +        // **********************************
   4.136 +
   4.137 +        if (cookie.good_checksums) {
   4.138              // If there is at least one signature that we can verify,
   4.139              // succeed.
   4.140              status = PEP_DECRYPTED_AND_VERIFIED;
   4.141 +        } else if (cookie.good_but_revoked) {
   4.142 +            // If there are any signatures from revoked keys, fail.
   4.143 +            status = PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH;
   4.144 +        } else if (cookie.bad_checksums) {
   4.145 +            // If there are any bad signatures, fail.
   4.146 +            status = PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH;
   4.147 +        } else if (cookie.good_but_expired) {
   4.148 +            // If there are any signatures from expired keys, fail.
   4.149 +            status = PEP_DECRYPTED;
   4.150          } else {
   4.151              // We couldn't verify any signatures (possibly because we
   4.152              // don't have the keys).
   4.153 @@ -1387,7 +1453,17 @@
   4.154  
   4.155   out:
   4.156      if (status == PEP_STATUS_OK) {
   4.157 -        if (cookie.bad_checksums) {
   4.158 +        // *****************************************
   4.159 +        // Sync changes with pgp_decrypt_and_verify.
   4.160 +        // *****************************************
   4.161 +
   4.162 +        if (cookie.good_but_expired) {
   4.163 +            // If there are any signatures from expired keys, fail.
   4.164 +            status = PEP_UNENCRYPTED;
   4.165 +        } else if (cookie.good_but_revoked) {
   4.166 +            // If there are any signatures from revoked keys, fail.
   4.167 +            status = PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH;
   4.168 +        } else if (cookie.bad_checksums) {
   4.169              // If there are any bad signatures, fail.
   4.170              status = PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH;
   4.171          } else if (cookie.good_checksums) {
   4.172 @@ -1746,7 +1822,6 @@
   4.173      return PEP_STATUS_OK;
   4.174  }
   4.175  
   4.176 -// XXX: This also needs to handle revocation certificates.
   4.177  PEP_STATUS pgp_import_keydata(PEP_SESSION session, const char *key_data,
   4.178                                size_t size, identity_list **private_idents)
   4.179  {
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/test/include/VerifyTests.h	Wed May 15 14:03:15 2019 +0200
     5.3 @@ -0,0 +1,23 @@
     5.4 +// This file is under GNU General Public License 3.0
     5.5 +// see LICENSE.txt
     5.6 +
     5.7 +#ifndef VERIFY_H
     5.8 +#define VERIFY_H
     5.9 +
    5.10 +#include <string>
    5.11 +#include "EngineTestIndividualSuite.h"
    5.12 +
    5.13 +using namespace std;
    5.14 +
    5.15 +class VerifyTests : public EngineTestIndividualSuite {
    5.16 +    public:
    5.17 +        VerifyTests(string test_suite, string test_home_dir);
    5.18 +    private:
    5.19 +        static constexpr const char *mary_fpr = "599B3D67800DB37E2DCE05C07F59F03CD04A226E";
    5.20 +        void check_revoked_tpk();
    5.21 +        void check_revoked_signing_key();
    5.22 +        void check_expired_tpk();
    5.23 +        void check_expired_signing_key();
    5.24 +};
    5.25 +
    5.26 +#endif
     6.1 --- a/test/src/SuiteMaker.cc	Wed May 15 13:59:55 2019 +0200
     6.2 +++ b/test/src/SuiteMaker.cc	Wed May 15 14:03:15 2019 +0200
     6.3 @@ -16,6 +16,7 @@
     6.4  #include "MimeTests.h"
     6.5  #include "OwnIdentitiesRetrieveTests.h"
     6.6  #include "ExpiredSubkeyTests.h"
     6.7 +#include "VerifyTests.h"
     6.8  #include "UserIdCollisionTests.h"
     6.9  #include "Engine463Tests.h"
    6.10  #include "BloblistTests.h"
    6.11 @@ -77,6 +78,7 @@
    6.12      "MimeTests",
    6.13      "OwnIdentitiesRetrieveTests",
    6.14      "ExpiredSubkeyTests",
    6.15 +    "VerifyTests",
    6.16      "UserIdCollisionTests",
    6.17      "Engine463Tests",
    6.18      "BloblistTests",
    6.19 @@ -134,7 +136,7 @@
    6.20  };
    6.21  
    6.22  // This file is generated, so magic constants are ok.
    6.23 -int SuiteMaker::num_suites = 58;
    6.24 +int SuiteMaker::num_suites = 59;
    6.25  
    6.26  void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
    6.27      if (strcmp(test_class_name, "URIAddressTests") == 0)
    6.28 @@ -145,6 +147,8 @@
    6.29          *test_suite = new OwnIdentitiesRetrieveTests(test_class_name, test_home);
    6.30      else if (strcmp(test_class_name, "ExpiredSubkeyTests") == 0)
    6.31          *test_suite = new ExpiredSubkeyTests(test_class_name, test_home);
    6.32 +    else if (strcmp(test_class_name, "VerifyTests") == 0)
    6.33 +        *test_suite = new VerifyTests(test_class_name, test_home);
    6.34      else if (strcmp(test_class_name, "UserIdCollisionTests") == 0)
    6.35          *test_suite = new UserIdCollisionTests(test_class_name, test_home);
    6.36      else if (strcmp(test_class_name, "Engine463Tests") == 0)
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/test/src/engine_tests/VerifyTests.cc	Wed May 15 14:03:15 2019 +0200
     7.3 @@ -0,0 +1,248 @@
     7.4 +// This file is under GNU General Public License 3.0
     7.5 +// see LICENSE.txt
     7.6 +
     7.7 +#include <stdlib.h>
     7.8 +#include <string>
     7.9 +#include <cstring>
    7.10 +#include <cpptest.h>
    7.11 +#include <fstream>
    7.12 +
    7.13 +#include "pEpEngine.h"
    7.14 +
    7.15 +#include "test_util.h"
    7.16 +#include "EngineTestIndividualSuite.h"
    7.17 +#include "VerifyTests.h"
    7.18 +
    7.19 +using namespace std;
    7.20 +
    7.21 +VerifyTests::VerifyTests(string suitename, string test_home_dir) :
    7.22 +    EngineTestIndividualSuite::EngineTestIndividualSuite(suitename, test_home_dir) {
    7.23 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("VerifyTests::check_revoked_tpk"),
    7.24 +                                                                      static_cast<Func>(&VerifyTests::check_revoked_tpk)));
    7.25 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("VerifyTests::check_revoked_signing_key"),
    7.26 +                                                                      static_cast<Func>(&VerifyTests::check_revoked_signing_key)));
    7.27 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("VerifyTests::check_expired_tpk"),
    7.28 +                                                                      static_cast<Func>(&VerifyTests::check_expired_tpk)));
    7.29 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("VerifyTests::check_expired_signing_key"),
    7.30 +                                                                      static_cast<Func>(&VerifyTests::check_expired_signing_key)));
    7.31 +}
    7.32 +
    7.33 +void VerifyTests::check_revoked_tpk() {
    7.34 +    slurp_and_import_key(session, "test_keys/priv/pep-test-mary-0x7F59F03CD04A226E_priv.asc");
    7.35 +
    7.36 +    string ciphertext = slurp("test_files/pep-test-mary-signed-encrypted-to-self.asc");
    7.37 +
    7.38 +    // Decrypt and verify it.
    7.39 +    char *plaintext = NULL;
    7.40 +    size_t plaintext_size = 0;
    7.41 +    stringlist_t *keylist = NULL;
    7.42 +    PEP_STATUS status = decrypt_and_verify(session,
    7.43 +                                           ciphertext.c_str(),
    7.44 +                                           ciphertext.size(),
    7.45 +                                           NULL, 0,
    7.46 +                                           &plaintext, &plaintext_size,
    7.47 +                                           &keylist, NULL);
    7.48 +
    7.49 +    TEST_ASSERT_MSG(status == PEP_DECRYPTED_AND_VERIFIED, tl_status_string(status));
    7.50 +    TEST_ASSERT(keylist);
    7.51 +    // Signer is mary.
    7.52 +    TEST_ASSERT(keylist->value);
    7.53 +    cout << "fpr: " << mary_fpr << "; got: " << keylist->value << endl;
    7.54 +    TEST_ASSERT(strcmp(mary_fpr, keylist->value) == 0);
    7.55 +    // Recipient is mary.
    7.56 +    TEST_ASSERT(keylist->next);
    7.57 +    TEST_ASSERT(keylist->next->value);
    7.58 +    TEST_ASSERT(strcmp(mary_fpr, keylist->next->value) == 0);
    7.59 +    // Content is returned.
    7.60 +    TEST_ASSERT(strcmp(plaintext, "tu was!\n") == 0);
    7.61 +
    7.62 +    // Import the revocation certificate.
    7.63 +    slurp_and_import_key(session, "test_keys/priv/pep-test-mary-0x7F59F03CD04A226E.rev");
    7.64 +
    7.65 +    plaintext = NULL;
    7.66 +    plaintext_size = 0;
    7.67 +    keylist = NULL;
    7.68 +    status = decrypt_and_verify(session,
    7.69 +                                ciphertext.c_str(), ciphertext.size(),
    7.70 +                                NULL, 0,
    7.71 +                                &plaintext, &plaintext_size,
    7.72 +                                &keylist, NULL);
    7.73 +
    7.74 +    // Now it should fail.
    7.75 +    TEST_ASSERT_MSG(status == PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH, tl_status_string(status));
    7.76 +    TEST_ASSERT(keylist);
    7.77 +    // No signer.
    7.78 +    TEST_ASSERT(strcmp(keylist->value, "") == 0);
    7.79 +    // Recipient is mary.
    7.80 +    TEST_ASSERT(keylist->next);
    7.81 +    TEST_ASSERT(keylist->next->value);
    7.82 +    TEST_ASSERT(strcmp(mary_fpr, keylist->next->value) == 0);
    7.83 +    // Content is returned.
    7.84 +    TEST_ASSERT(strcmp(plaintext, "tu was!\n") == 0);
    7.85 +
    7.86 +
    7.87 +    string text = slurp("test_files/pep-test-mary-signed.txt");
    7.88 +    string sig = slurp("test_files/pep-test-mary-signed.txt.sig");
    7.89 +
    7.90 +    plaintext = NULL;
    7.91 +    plaintext_size = 0;
    7.92 +    keylist = NULL;
    7.93 +    status = verify_text(session,
    7.94 +                         text.c_str(), text.size(),
    7.95 +                         sig.c_str(), sig.size(),
    7.96 +                         &keylist);
    7.97 +
    7.98 +    // Now it should fail.
    7.99 +    TEST_ASSERT_MSG(status == PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH, tl_status_string(status));
   7.100 +    TEST_ASSERT(keylist);
   7.101 +    // No signer.
   7.102 +    TEST_ASSERT(strcmp(keylist->value, "") == 0);
   7.103 +    TEST_ASSERT(! keylist->next);
   7.104 +}
   7.105 +
   7.106 +void VerifyTests::check_revoked_signing_key() {
   7.107 +    slurp_and_import_key(session, "test_keys/priv/pep-test-mary-0x7F59F03CD04A226E_priv.asc");
   7.108 +    slurp_and_import_key(session, "test_keys/pub/pep-test-mary-0x7F59F03CD04A226E_revoked_sig_key.asc");
   7.109 +
   7.110 +    string ciphertext = slurp("test_files/pep-test-mary-signed-encrypted-to-self.asc");
   7.111 +
   7.112 +    // Decrypt and verify it.
   7.113 +    char *plaintext = NULL;
   7.114 +    size_t plaintext_size = 0;
   7.115 +    stringlist_t *keylist = NULL;
   7.116 +    PEP_STATUS status = decrypt_and_verify(session,
   7.117 +                                           ciphertext.c_str(),
   7.118 +                                           ciphertext.size(),
   7.119 +                                           NULL, 0,
   7.120 +                                           &plaintext, &plaintext_size,
   7.121 +                                           &keylist, NULL);
   7.122 +
   7.123 +    // It should fail.
   7.124 +    TEST_ASSERT_MSG(status == PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH, tl_status_string(status));
   7.125 +    TEST_ASSERT(keylist);
   7.126 +    // No signer.
   7.127 +    TEST_ASSERT(strcmp(keylist->value, "") == 0);
   7.128 +    // Recipient is mary.
   7.129 +    TEST_ASSERT(keylist->next);
   7.130 +    TEST_ASSERT(keylist->next->value);
   7.131 +    TEST_ASSERT(strcmp(mary_fpr, keylist->next->value) == 0);
   7.132 +    // Content is returned.
   7.133 +    TEST_ASSERT(strcmp(plaintext, "tu was!\n") == 0);
   7.134 +
   7.135 +
   7.136 +    string text = slurp("test_files/pep-test-mary-signed.txt");
   7.137 +    string sig = slurp("test_files/pep-test-mary-signed.txt.sig");
   7.138 +
   7.139 +    plaintext = NULL;
   7.140 +    plaintext_size = 0;
   7.141 +    keylist = NULL;
   7.142 +    status = verify_text(session,
   7.143 +                         text.c_str(), text.size(),
   7.144 +                         sig.c_str(), sig.size(),
   7.145 +                         &keylist);
   7.146 +
   7.147 +    // Now it should fail.
   7.148 +    TEST_ASSERT_MSG(status == PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH, tl_status_string(status));
   7.149 +    TEST_ASSERT(keylist);
   7.150 +    // No signer.
   7.151 +    TEST_ASSERT(strcmp(keylist->value, "") == 0);
   7.152 +    TEST_ASSERT(! keylist->next);
   7.153 +}
   7.154 +
   7.155 +void VerifyTests::check_expired_tpk() {
   7.156 +    slurp_and_import_key(session, "test_keys/priv/pep-test-mary-0x7F59F03CD04A226E_priv.asc");
   7.157 +    slurp_and_import_key(session, "test_keys/pub/pep-test-mary-0x7F59F03CD04A226E_expired_pub.asc");
   7.158 +
   7.159 +    string ciphertext = slurp("test_files/pep-test-mary-signed-encrypted-to-self.asc");
   7.160 +
   7.161 +    // Decrypt and verify it.
   7.162 +    char *plaintext = NULL;
   7.163 +    size_t plaintext_size = 0;
   7.164 +    stringlist_t *keylist = NULL;
   7.165 +    PEP_STATUS status = decrypt_and_verify(session,
   7.166 +                                           ciphertext.c_str(),
   7.167 +                                           ciphertext.size(),
   7.168 +                                           NULL, 0,
   7.169 +                                           &plaintext, &plaintext_size,
   7.170 +                                           &keylist, NULL);
   7.171 +
   7.172 +    // It should fail.
   7.173 +    TEST_ASSERT_MSG(status == PEP_DECRYPTED, tl_status_string(status));
   7.174 +    TEST_ASSERT(keylist);
   7.175 +    // No signer.
   7.176 +    TEST_ASSERT(strcmp(keylist->value, "") == 0);
   7.177 +    // Recipient is mary.
   7.178 +    TEST_ASSERT(keylist->next);
   7.179 +    TEST_ASSERT(keylist->next->value);
   7.180 +    TEST_ASSERT(strcmp(mary_fpr, keylist->next->value) == 0);
   7.181 +    // Content is returned.
   7.182 +    TEST_ASSERT(strcmp(plaintext, "tu was!\n") == 0);
   7.183 +
   7.184 +
   7.185 +    string text = slurp("test_files/pep-test-mary-signed.txt");
   7.186 +    string sig = slurp("test_files/pep-test-mary-signed.txt.sig");
   7.187 +
   7.188 +    plaintext = NULL;
   7.189 +    plaintext_size = 0;
   7.190 +    keylist = NULL;
   7.191 +    status = verify_text(session,
   7.192 +                         text.c_str(), text.size(),
   7.193 +                         sig.c_str(), sig.size(),
   7.194 +                         &keylist);
   7.195 +
   7.196 +    // Now it should fail.
   7.197 +    TEST_ASSERT_MSG(status == PEP_UNENCRYPTED, tl_status_string(status));
   7.198 +    TEST_ASSERT(keylist);
   7.199 +    // No signer.
   7.200 +    TEST_ASSERT(strcmp(keylist->value, "") == 0);
   7.201 +    TEST_ASSERT(! keylist->next);
   7.202 +}
   7.203 +
   7.204 +void VerifyTests::check_expired_signing_key() {
   7.205 +    slurp_and_import_key(session, "test_keys/priv/pep-test-mary-0x7F59F03CD04A226E_priv.asc");
   7.206 +    slurp_and_import_key(session, "test_keys/pub/pep-test-mary-0x7F59F03CD04A226E_expired_sig_key.asc");
   7.207 +
   7.208 +    string ciphertext = slurp("test_files/pep-test-mary-signed-encrypted-to-self.asc");
   7.209 +
   7.210 +    // Decrypt and verify it.
   7.211 +    char *plaintext = NULL;
   7.212 +    size_t plaintext_size = 0;
   7.213 +    stringlist_t *keylist = NULL;
   7.214 +    PEP_STATUS status = decrypt_and_verify(session,
   7.215 +                                           ciphertext.c_str(),
   7.216 +                                           ciphertext.size(),
   7.217 +                                           NULL, 0,
   7.218 +                                           &plaintext, &plaintext_size,
   7.219 +                                           &keylist, NULL);
   7.220 +
   7.221 +    // It should fail.
   7.222 +    TEST_ASSERT_MSG(status == PEP_DECRYPTED, tl_status_string(status));
   7.223 +    TEST_ASSERT(keylist);
   7.224 +    // No signer.
   7.225 +    TEST_ASSERT(strcmp(keylist->value, "") == 0);
   7.226 +    // Recipient is mary.
   7.227 +    TEST_ASSERT(keylist->next);
   7.228 +    TEST_ASSERT(keylist->next->value);
   7.229 +    TEST_ASSERT(strcmp(mary_fpr, keylist->next->value) == 0);
   7.230 +    // Content is returned.
   7.231 +    TEST_ASSERT(strcmp(plaintext, "tu was!\n") == 0);
   7.232 +
   7.233 +
   7.234 +    string text = slurp("test_files/pep-test-mary-signed.txt");
   7.235 +    string sig = slurp("test_files/pep-test-mary-signed.txt.sig");
   7.236 +
   7.237 +    plaintext = NULL;
   7.238 +    plaintext_size = 0;
   7.239 +    keylist = NULL;
   7.240 +    status = verify_text(session,
   7.241 +                         text.c_str(), text.size(),
   7.242 +                         sig.c_str(), sig.size(),
   7.243 +                         &keylist);
   7.244 +
   7.245 +    // Now it should fail.
   7.246 +    TEST_ASSERT_MSG(status == PEP_UNENCRYPTED, tl_status_string(status));
   7.247 +    TEST_ASSERT(keylist);
   7.248 +    // No signer.
   7.249 +    TEST_ASSERT(strcmp(keylist->value, "") == 0);
   7.250 +    TEST_ASSERT(! keylist->next);
   7.251 +}
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/test/test_files/pep-test-mary-signed-encrypted-to-self.asc	Wed May 15 14:03:15 2019 +0200
     8.3 @@ -0,0 +1,24 @@
     8.4 +-----BEGIN PGP MESSAGE-----
     8.5 +
     8.6 +hQGMA6aSYtgJ++dOAQv/f5Q5icNJ2cXMe9HJgWeTiBDDBflPwuIUEVyeCGa82kyl
     8.7 +DwwWG/vS/KMwkJOzzttdT4PDlUKotRy1ujYtxYGByM8QLDEgWwGSGkS+XN0iG4Uz
     8.8 +p8SHzJbGgDbvsZCbEXrcSeR8XBLCGHRzvu1l2Dg43Co8QO250BV8PvhFAJrjEOUT
     8.9 +BhiR++biD64OuEA///zp+7lhqN6ejZw9P8lhqcl8e8wpirUTmZjrpWhNK/nSkWs1
    8.10 +ghBcteVBVdDFQX/UYKgluGldyGNy/CmYGhOuUfx3cmPGxO9qef+p3OjMVNlyYViM
    8.11 +xoawV+fn8c5hv9IK/jkCYyQmzJflzO1boQLMTCGL7DyyL9B7x58ib2lbHqIqWVTC
    8.12 +0Lq/IxKDhOf/E/qMT88g+uRRD6AUV5/CtxnHXPsomOhRINnuq8FNQjSBqws3jeXd
    8.13 +6zzI24ys0bpKk1VX3SAxIyPOcyHbSQQ4xRUGdo0dWdcm6XanC0oeri2ZaMJzfDnv
    8.14 +dUgQ8pr1AGfiih7l2MjP0ukB9SIGGjlqf7P+KQiU6TgCd5ZOPrp0hDp4vsP0wVNK
    8.15 +2S5kfK6sv+coGpEUEnUoBO827JW19MU0vLLwWkXZFoCB3DmI2KDvSBett9t2bSbT
    8.16 +N2Djvi9dLDCt05oNdmfR1e1HVIwZQm5qetHHycxQy8OscTUp9ZYlGkyrQ6jlMMeE
    8.17 +40OxcxSCmuk2ln5N5EZqUImAFv6ynuWNiN1vmKVI1ozTrDvb7QVn72QWN1slS0z6
    8.18 +b5WVunNYso58fFOjnJ4CFVCuWt5XhEhn5ArQoZrzWeDdWwV2l+vfwXlu2SXZdg6l
    8.19 +jW6tIJaUtEjPLg6PeTG0coLGE6JrUDcWCiqGEBdrV/9txssKG/efVdPn+Q1JXqom
    8.20 +//jAWwjFcDkRkrMbWVgEbtaUFHt67mTRQTQojfueqh8JbkmEVcxDzyAVtPiAnl9G
    8.21 +EZmWUD/OGePlJJjbf/B8ddRmUWzSjgtLfEQLekj9ubjq0e6+095bYHv14BOGbpdo
    8.22 +sqlxEevCwtx1F8+NoRFZq3qi1y+5BZacfoUZip3M7BVDpvAXX2t+6lKVQiMUsnSZ
    8.23 +SmupON6y8n/m6WaxnPqZkGbL07+umdPYUh68UO51A/UrCUujfFweaL2rXOK8pNkB
    8.24 +179q9WmLOWhBRNghDJlEZHbw/+OsJDiss96oGrxVBYq8T2iBM7MpFj3gW3ZDoIOr
    8.25 +Qws8uwuXIkEkwe8t+Q==
    8.26 +=BXG/
    8.27 +-----END PGP MESSAGE-----
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/test/test_files/pep-test-mary-signed.txt	Wed May 15 14:03:15 2019 +0200
     9.3 @@ -0,0 +1,1 @@
     9.4 +was soll ich machen?
    10.1 Binary file test/test_files/pep-test-mary-signed.txt.sig has changed
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/test/test_keys/priv/pep-test-mary-0x7F59F03CD04A226E.rev	Wed May 15 14:03:15 2019 +0200
    11.3 @@ -0,0 +1,15 @@
    11.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    11.5 +Comment: This is a revocation certificate
    11.6 +
    11.7 +iQG2BCABCAAgFiEEWZs9Z4ANs34tzgXAf1nwPNBKIm4FAlzakXgCHQAACgkQf1nw
    11.8 +PNBKIm6RXgv/X4oQggntl/bpPA31RJCrfND2bQUekpH8rG0BsoY5VdXww2JuGdS5
    11.9 +q7CluWviPshEYLOe1xcb9wPM1Yo2c1OQfXapDhnLXR69q32vA7yxdkcdVcvJRD5I
   11.10 +Lotm2bwe5DURW256G8dLcL4pmCweCt8UKJNppyXUk7FB4U7wQcYHdR6dAVIebovh
   11.11 +aCopH/gXEsIxKXl5/P3E+1cb4jJlsmGrP2SBymx8etvGmT48F/PG1L2lWnZrkUfc
   11.12 +Ldj/W2ds/ukhizswpL/RI7fT+nmRmDCY11tWRzMxGOBYb2/fZmeqOtaFZe/PnVC7
   11.13 +Zv3XyK/WA0wLnpHCBtM9TmWwHOwyVwI4/o2cGtZMAtVlIcWNgYYnpf5BZY7vJjM0
   11.14 +eaUjNbuCUCuiOFeW35qHNZAq1VJj5QrfwBvvLWQrEpVPzCSMNSe9YuFEhKH4z5b7
   11.15 +YHX0Na3sSEBuvtnSkPKtixkd8H6lMhJ8eEpIyKJTjDgNVFSkMsLmiK+jikuJgIpw
   11.16 ++IM1ZSCnyfCF
   11.17 +=kqka
   11.18 +-----END PGP PUBLIC KEY BLOCK-----
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/test/test_keys/priv/pep-test-mary-0x7F59F03CD04A226E_priv.asc	Wed May 15 14:03:15 2019 +0200
    12.3 @@ -0,0 +1,129 @@
    12.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
    12.5 +
    12.6 +lQVYBFzakXIBDADFQ/yauFR/q9HPFfszr8Cd2t4tZA9xBC46CtTnvetfL40EnCPV
    12.7 +umzsKCt0ZICiqMS538yMzgE5V7cUGCJJxabTt9Xnm/mqD6JJFiNxx49+BxapiJgN
    12.8 +VE7Uo5s2tXzy/BUGP3B5OeW2frFbse0zRWkgN/jvbkNr43LsHVYkBUQKSiqm3Ud7
    12.9 +1NZRaapAbkxisCOHNTZ2uyayX2WZlxKgufp/61wL75XRoPoQdnajaQvro1rr35sC
   12.10 +teG9k425WS60j80ie+AmGEIguPPc4Go5rhwf3SCqU7BfiYCxVAvX5ESr+HpyicEF
   12.11 +5iL+4wm/VMxj4zzFMQKQvQ0lHmw4I1SreS250sVfkXWdYtjiq+2XWGoQUWOnU/j4
   12.12 +nBol10pwOQVI0jL+ok8OlXfFZm6LIYY7Pmd9O4e5WbCid/UU+uc0UW1qDtkHie8t
   12.13 +25epIQGqmLOHgQJDWxdSnmNRcM7A9ckktGNMG3n53qJ8bvdfqlioRNJwm0IUF1cz
   12.14 +dHZuhDzoSFpPTbMAEQEAAQAL/ijRhZ6aT9nPOu3n9X/feTLwzBKGZu+S1uHpxd5i
   12.15 +HScoFr0CdiPOnKVNNpiyBzAhTfvMRG5KXlR4QwjkaYvsWzXqD1gKnWHENGd9Lj5n
   12.16 +9dg1LUpNWnE/pcQ4SnDKox1AbjVJwUNEaLUXiCmaKqP2U+d3zYn1vfvAJ9KVy3JO
   12.17 +qKKccDDxDs6f3u0fuTv11taA7gkXSLrOxRYZyVM7wH4DncMEd5p8q/qhnbz0Vl4/
   12.18 +6ViMB89RCKlJ63kn5CabPp/cNU+5X8bC700tgg30EcUfwE6a+GSnfLVwAquZAfPI
   12.19 ++6ikSjaA+4Ha0LiDYTqtVzW1LohKHbU9ZQgwuCngIVUn3LmFGk7NFN4QHIw4MmnA
   12.20 +un5bfoIELxBPbpGFPguZ1b+UwUjabrfXyoC6xEydIGNqV7vTYo8BW5JZqaMvMWQY
   12.21 +7RXGJpTZdxRV8FBA2PsnhmD1aGI0DR1/xjiTdiZLl+wvRj3b4s/0dvisYDAx6fbL
   12.22 +AWFqH+FxAlxdHE2qtvaHcNmK0QYAyKpbX7tb8rRpdM67yiYCT33jall0wewZn4pb
   12.23 +bJr54eoSCcpIS17AP+A3pk67ppvWJTQGGx6lMNYpy8kfgF1EsL4JD70lrAHMrXke
   12.24 +o6DbDxzG1tl+FBAvCtvVcC/wICiX97XTvsk85X/SsfGGYi4ZdrVMiLwLY0A++uHl
   12.25 +khe11Odope8ZLuGo43xi9Ug3G+1g5FsLmn2IyTuELOgyV8NBRTiewBTQcr1ON4HZ
   12.26 +rVCjWx3svk3c2kEOUWtGP/uE9hdJBgD7qZ7mI7LZaWF4la3icvMge80a1BfYC+kR
   12.27 +h5aKrlrS0QU61XHqt6n3IeXv5brm1xMBwyUiVB4JgWU9xo/BxJp1nKh0UAFG5TLc
   12.28 +7mvrtdE1AY0PjfXVaouCgsyYb+cW6HOsrMvqBMfrLz/ehZc3uKv+zRc4eHITOm4R
   12.29 +UqEH/SxKPje15IkhQf7QfqI4LwZU0HKeU5ehTqzNwm0I33eBbXQClGNbBtWfPH1e
   12.30 +aSFQmjWu5hlLH4uATnIffqBwQ3tXERsF/1rBF+nFczeJduKgzjQpNV5TBzKQrgWX
   12.31 ++12LSjcBYPsBPct9k9H36JoO8zPZ2N0Xa+YBn+dgp9g3g2mN4/D3Q0lKrEReRfnN
   12.32 +nN8/54LlbEIRTgkFlt+evH46t5lVNui4pegyBQMMUAGew4TATkf6wTcrG4644Z9C
   12.33 +wpGi2Lxe0xsM8DxngRAMtT7u87vuKTgwPZWPIlUNmyCepISHnTOxdqgRx4Dujvsb
   12.34 +h6f6XkSd8QJpnRBrZ5HGsgfSN/Qt/NNcrt+StElNYXJ5IFN1c2FuIE1hcmlhIEth
   12.35 +cmVuIExpc2EgTGluZGEgRG9ubmEgUGF0cmljaWEgU21pdGggPDE5NjBAZXhhbXBs
   12.36 +ZS5vcmc+iQHOBBMBCAA4FiEEWZs9Z4ANs34tzgXAf1nwPNBKIm4FAlzakXICGwEF
   12.37 +CwkIBwIGFQgJCgsCBBYCAwECHgECF4AACgkQf1nwPNBKIm4ebgv/ax2NjqFViCSY
   12.38 +wpH0O2Mre+sdy+Qlk+IZlVs33WgLTF3+6UEtO2mSWriwTw0FJVKkKmFcC2JDnDCY
   12.39 +eR13FZVB1W7RPHHkpJzheqRTommYXvYLQN1squUVD1d1rrxsWCwMDB3j+nfmixds
   12.40 +T3GZYBdmaZbvSXnwyhm5XTUqzs9tYgftHOGwpE20ySSOSNDpJ0t6wOlp7CuuZlTp
   12.41 +BBfZl1PmiALKwbPSKhXOJyuEI/W7cJ2/LyKfGPW7lkGAbek9JowK6Y9DGos6kOf8
   12.42 +W8Api3ZBXJJeBaSPqCZ0Nk/LP93JFv8yAdgKZiLKrr7YWylSEGLD/PVwOcTW/mUR
   12.43 +vnecah3WAbBVSN6fRYzjV8sDzNCPRTmObXsLmxC7uM6F8sMlzFCUPhZTY3ghjmU6
   12.44 +jDQlXEJn/6I2Q38lsjOX6dPnvFy7221LwHz9KYBIB8GgVT9rxJ0pNlZwChUmAOTn
   12.45 +rRUFjx+zMh1G0uKk6cDsqaVBjwncOu/aQJ+nVaCp6uxDXrnuhUienQVYBFzakZYB
   12.46 +DAC2Goe/yDgr+5Nj+XwMEENhIgo0FnUJMcYXSZhb1Cp8I5k2j7ge8yet6BVVYlEj
   12.47 +VKZ7C2UWqh7h5WlaVBn/ICqoDUqkJl9LktXNVbeTswoTVJTyKagJ/FaUb7Ysb51+
   12.48 +iWsC7LZNKUY8h7CLHsaF442iHHks97iSwl5EMTv/0q1AeBa/c1wmJh3w1c0fEYjy
   12.49 +TRe/VREhYBsnHkcRns8qZKX+FyJxtgKlGh7LFxqOUEA8rKzS8157qaS+GG8HvN3X
   12.50 +r1d8cwf/XnADAwsfQahxEMeFZoUUWtclfgcBDAEJTU9davTZJrvd43IR3rqYHBCc
   12.51 +Kic0Do+Qvt43DM/Y2are2NuIo7uliEY380gSHZAI9EmVRuOe/TrwmIPyxHTocxUx
   12.52 +5oNLXN3b0G3gnzaCLv2bMGeFszIcOtmuev1zHiRRcMbIuQQbRaVsGG6Rsy7S3hmw
   12.53 +G427bbI4k+Kqmteuy0WGEgUdMZEr629focujrS0Qh2E30KM6H2P8pKFjK20QSQZ0
   12.54 +gNkAEQEAAQAL/0E4X0Ygv32BLNixkewAJyGyv1TIdkJEwV21zguVgWHUnhscfiUX
   12.55 +kS6H4JwkCktNFhMbkaj8ZPMi5wii9myZaK2nlQQVeivm+wv/lzAe/4zMzkus/7IT
   12.56 +3i5rlCN2FkIrlVgGz4PzNGSZdHFfJFrvlNpquDuSvVhSpNBnkcWd/s8IM51+A5Lm
   12.57 +M/L9n+lwrkuZsNel7+y0LwVjorB84FWelpTaVEvFlEztffne3HP76gXRElS7NSu1
   12.58 +Jnuu5JUw34NQGLnB4T77upRHa4ngZeK3+VV5UYX9vHWEiz+TrvGkHA4fFbik04jF
   12.59 +rBwxcc0lHFC2O+lxiEzWGAgxDbqHifE9TzWrpPxAUZSo4On1XnKzu9EHAZVpexHJ
   12.60 +9l8jH1H7XvxBQGbG42e/aRAL3rlbP6iZqXhJ6pUeF4KlsVRbFo1XqwKUYhcryKCp
   12.61 +6bEip5R8W4S8/3EfrSpmRymsei7cV8e572ROPYlx6tDwOUJMRNDBarvT75Z3vZ2Y
   12.62 +xfP1/4Uy7uwfwQYAwjFRDnNYC+ChfP5cdWDpfBGoulCKQ107+2TzKwnDqCi+a901
   12.63 +KxnK1iE7PVNEVL/SkF1RKJPgU2yAXJacd9AlrPRaXV8ftTaL8F8wZkSrybCodpcO
   12.64 +avOuMSztqvnldJjZk0ZJrKa+kgyKRESMDmPSe6WV7zl9S/qFox1vzncYfnCYD90X
   12.65 +DABxeqBukUEk+hWBSyZY+t0qnOcW2XP0LxFZHOix+ZWwIlRj50AS2s6uIlGKv99Z
   12.66 +fotRuwxRaxAFysiXBgDwEDWfdQX9vmw8vqzMxK0z4cj9NhMWHrDNH9QMeX4/K9V9
   12.67 +7LsTibsbTw6jpwPh/+s9zxC0RR1Ro+kZQnvleLz6+k0gqiJErHHvl4qmgFdq4T13
   12.68 +J7ISEPCH5sVO+1t1Di3oLBtEP1COY2UpNyC2Otjml3A1/CmYdGI9G6JyEVKQF4Ju
   12.69 +BwJ14RSz0b1i5pjotkD8PfGmNIVF2nOUATbFRYYnDP8MH8c8TzasIwjKrnPxY2Yx
   12.70 +k2kEOWGqm9d3TQabQA8F/2PKyMSbIjBwiGpi9PMC0MZCDjc+j2H4J/C06ycaMWiK
   12.71 +1ZPKE3yGv8bhA6zhQAAYuH02BUZBrRY2uTXHcgnyULcg0/+AWvJklaw4dbRy3iLT
   12.72 +O45J1N392Q5JFO9bOaIpemamEP+/MoD+VV8+U/Al9RSBMmxgq8BmRt0+F881d5n5
   12.73 +71g9dOjrdd1zX4Xl7eASS00kbAcGoZCb34oW0uRi9nYunzltXzM+s5INXvycoTjo
   12.74 +jEpb4FyLMeS6CPJwphAGvdy7iQNsBBgBCAAgFiEEWZs9Z4ANs34tzgXAf1nwPNBK
   12.75 +Im4FAlzakZYCGwIBwAkQf1nwPNBKIm7A9CAEGQEIAB0WIQQ0rQXUJuRMayXQhG++
   12.76 +0LH0HLDcUQUCXNqRlgAKCRC+0LH0HLDcUavFC/48V+NZzS3NlSa/R2mcBwAZyEZi
   12.77 +CGstMeualsNtpxeAI3dJD2YOptqF0EwCardYBrRYH4lvbPNCUC0/pPVBdlZGi+nX
   12.78 +7LqOffSlmYRyz9K6idLOWqLQcab7NZG8fgyygtx/zVyLvRtCcqsGuCj98vIZXgyA
   12.79 +QZnaDDaUXRPwlXlCUXXAYmEMr2zTVZzxmz18Kzr1bK7w0f6wxDHiN7gGpSX7ASp4
   12.80 +fh3glAIW7V6o03eUfzcIizXqVP+jNVrR2XbdFP6b3eW2UAXf1nAmUX7JKS1fGhk6
   12.81 +f+3Cdzmy1tGsCfB6bUQhxkzYhuWvzuLXwG5BVpKzjwMqGqwy2UnaIuq0Q8sU8N1u
   12.82 +AmphZm7+1x/4jVdQLm9if6okY51du/zPdoHucRo/sT+Sr+xAXn6QkB6SdzkwUXAC
   12.83 +/uRF3Zg2RBVyhcrrIG+mrIAW5FO12njOgrJAWP09zKilYnOGoDnbnexrqTUjpcZu
   12.84 +oaW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k9w1MNwoyaAo96qEqLbFbpO1HB2k8ak3uCvdysWWkV2/zPRph3R1zcXWEm/vAD
  12.100 +Ja9sztx7dZDTy9AjDmquBWSk2/Fhs9noQsXI2xOPZd4rBwimTSNHX2xDEC8AEQEA
  12.101 +AQAL/RFyuGjT05owwjuzSjPVqsqxNpK6Pfjz+IQuQDKV8MwevcMg0w/jlE+gAryY
  12.102 +fQe8V24fy62ebhRmffIPWTRTig2VVw3ZgvgsNxW5Fvaqo2IxGHPih59rvVT2egyM
  12.103 +c8PnxCDFjyZtg3me91ntLBGxjUjbfWY9C44wfsRPWXcDaDxh7Ie6FsY578LTVXTl
  12.104 +2d6obV97d9/oKH/Ydqlkw8TsYHFmWiZbf07luNCalrlDHklhLfe2jImQqu5do7ve
  12.105 +uAvdK087vvm4G6THAEdOjLx+bs46QbeVDuCKQcI4CQbYtik4BtXlY6BNkORJczxd
  12.106 +8S9V2n61fp4TEFdzDQw/udDPXUkue6RW8as0EOT7VFiTlTvsCoK0d4L3bkYKJ2w5
  12.107 +cjt014i2959NFR4qOO+M36/mcEc2l12tA3dzZWnj/h8L9gZOcDwlgldCGY+FdIEe
  12.108 +pgwZ8hjMfNC94qhGyn/+RAbjUCgYthZx5RH6zf1WNSBMEkFRR+WJcFENCuPuXl4H
  12.109 +w536BQYAyn30zNYJlm2XsYgrM9B27ZavUNNehHu8K9yeD3oASa5E0gGk4Oj9JQm6
  12.110 +vDIbpP1ImbbiI1hUHkL+XK8tdvjxu8cKISi3KfUZvSxs12G2ax7tmUyWtnql4CHx
  12.111 +PJJOIagFlPY0f1LEuAXVGPd68hSZ5mzn3zuUbt/pLdbZ7YNTJ1aIawOZqWOBYltr
  12.112 +znrAKcjVs6OFzKeujNa+K2JYyawEU/eG4322OBVSDspEV0Z2X/z8sGgDhfAlyZmq
  12.113 +HdebYdSDBgDmVGUiErIVQAMp/LsuYr+GdrZDdAwkusAUcAS5JLt2MvLOhDjJ910t
  12.114 +ByUjU0uHWxYCZH4kcv0/aA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khYaDfsDVoBrKOn4qF7Lj1PNN1xt0qNxYPy3tbQVnCOD6a0po
  12.130 +mCsddt0ANDA4BDMM32UW0FU2Ahu0
  12.131 +=EuxL
  12.132 +-----END PGP PRIVATE KEY BLOCK-----
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/test/test_keys/pub/pep-test-mary-0x7F59F03CD04A226E_expired_pub.asc	Wed May 15 14:03:15 2019 +0200
    13.3 @@ -0,0 +1,68 @@
    13.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    13.5 +
    13.6 +mQGNBFzakXIBDADFQ/yauFR/q9HPFfszr8Cd2t4tZA9xBC46CtTnvetfL40EnCPV
    13.7 +umzsKCt0ZICiqMS538yMzgE5V7cUGCJJxabTt9Xnm/mqD6JJFiNxx49+BxapiJgN
    13.8 +VE7Uo5s2tXzy/BUGP3B5OeW2frFbse0zRWkgN/jvbkNr43LsHVYkBUQKSiqm3Ud7
    13.9 +1NZRaapAbkxisCOHNTZ2uyayX2WZlxKgufp/61wL75XRoPoQdnajaQvro1rr35sC
   13.10 +teG9k425WS60j80ie+AmGEIguPPc4Go5rhwf3SCqU7BfiYCxVAvX5ESr+HpyicEF
   13.11 +5iL+4wm/VMxj4zzFMQKQvQ0lHmw4I1SreS250sVfkXWdYtjiq+2XWGoQUWOnU/j4
   13.12 +nBol10pwOQVI0jL+ok8OlXfFZm6LIYY7Pmd9O4e5WbCid/UU+uc0UW1qDtkHie8t
   13.13 +25epIQGqmLOHgQJDWxdSnmNRcM7A9ckktGNMG3n53qJ8bvdfqlioRNJwm0IUF1cz
   13.14 +dHZuhDzoSFpPTbMAEQEAAbRJTWFyeSBTdXNhbiBNYXJpYSBLYXJlbiBMaXNhIExp
   13.15 +bmRhIERvbm5hIFBhdHJpY2lhIFNtaXRoIDwxOTYwQGV4YW1wbGUub3JnPokB1AQT
   13.16 +AQgAPgIbAQULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgBYhBFmbPWeADbN+Lc4FwH9Z
   13.17 +8DzQSiJuBQJc2pITBQkAAVIhAAoJEH9Z8DzQSiJuT9oMAMDohz5ee4mz8d1GZxgn
   13.18 +IVmktrUxhr7PoJoLjyQF5VHCifYC1fdH3ax8EblRfnjI9G+JlGXcS+Vyae0UXlTe
   13.19 +zfVHBSyDM1VWZ4X+mSs4mXgU6IQOn/zGIFfEU1TgEl7FjK70zhjJNfr1LruVA/I/
   13.20 ++oLD2oH8AObOTrYF6ZsKqqnLyAC3H0NI+FoczkXJom7h27RoRXJsCO2FGElLGhak
   13.21 +zSJwSYTbGLBT9ELqpboCop5AIiL9daPqkcHktbONNKyC5sBbXn+nRU6cWirbLrsF
   13.22 +t9epabSVpI0QlnvWsTcr0jv6yCXx5vyS8kBqmXt3hi9UbC3nsg4+7V+8iBlOTjUL
   13.23 +R3CTZepj1b4mE0vRr+JBKHXfakwdAJYvQRuPYPC6w2Hmwk7MIio+ROVdD9yb/yOA
   13.24 +LoVNzLllGM9wmpX6921suFh7romAZXD1V4AH8UzBgcRSDZfcW0oxjcYfdlQpO5QW
   13.25 +eujvNxeUXqXui7ia5f6EjGT0wAgknZd3IY/M/DsR6jHqu7kBjQRc2pGWAQwAthqH
   13.26 +v8g4K/uTY/l8DBBDYSIKNBZ1CTHGF0mYW9QqfCOZNo+4HvMnregVVWJRI1Smewtl
   13.27 +Fqoe4eVpWlQZ/yAqqA1KpCZfS5LVzVW3k7MKE1SU8imoCfxWlG+2LG+dfolrAuy2
   13.28 +TSlGPIewix7GheONohx5LPe4ksJeRDE7/9KtQHgWv3NcJiYd8NXNHxGI8k0Xv1UR
   13.29 +IWAbJx5HEZ7PKmSl/hcicbYCpRoeyxcajlBAPKys0vNee6mkvhhvB7zd169XfHMH
   13.30 +/15wAwMLH0GocRDHhWaFFFrXJX4HAQwBCU1PXWr02Sa73eNyEd66mBwQnConNA6P
   13.31 +kL7eNwzP2Nmq3tjbiKO7pYhGN/NIEh2QCPRJlUbjnv068JiD8sR06HMVMeaDS1zd
   13.32 +29Bt4J82gi79mzBnhbMyHDrZrnr9cx4kUXDGyLkEG0WlbBhukbMu0t4ZsBuNu22y
   13.33 +OJPiqprXrstFhhIFHTGRK+tvX6HLo60tEIdhN9CjOh9j/KShYyttEEkGdIDZABEB
   13.34 +AAGJA2wEGAEIACAWIQRZmz1ngA2zfi3OBcB/WfA80EoibgUCXNqRlgIbAgHACRB/
   13.35 +WfA80EoibsD0IAQZAQgAHRYhBDStBdQm5ExrJdCEb77QsfQcsNxRBQJc2pGWAAoJ
   13.36 +EL7QsfQcsNxRq8UL/jxX41nNLc2VJr9HaZwHABnIRmIIay0x65qWw22nF4Ajd0kP
   13.37 +Zg6m2oXQTAJqt1gGtFgfiW9s80JQLT+k9UF2VkaL6dfsuo599KWZhHLP0rqJ0s5a
   13.38 +otBxpvs1kbx+DLKC3H/NXIu9G0Jyqwa4KP3y8hleDIBBmdoMNpRdE/CVeUJRdcBi
   13.39 +YQyvbNNVnPGbPXwrOvVsrvDR/rDEMeI3uAalJfsBKnh+HeCUAhbtXqjTd5R/NwiL
   13.40 +NepU/6M1WtHZdt0U/pvd5bZQBd/WcCZRfskpLV8aGTp/7cJ3ObLW0awJ8HptRCHG
   13.41 +TNiG5a/O4tfAbkFWkrOPAyoarDLZSdoi6rRDyxTw3W4CamFmbv7XH/iNV1Aub2J/
   13.42 +qiRjnV27/M92ge5xGj+xP5Kv7EBefpCQHpJ3OTBRcAL+5EXdmDZEFXKFyusgb6as
   13.43 +gBbkU7XaeM6CskBY/T3MqKVic4agOdud7GupNSOlxm6hpb9ifYOhsgkUCX93qZPH
   13.44 +aeU19TQ6XWDCZY4DVg3iDACGyeTNbkrkcRQ+5gHETYZQBmByVB2HT9NZ1SvFyihF
   13.45 +KHBnenRxWqabPfFmVRTLxq3HrD+FSeHXvd1/zYP9d8jsedo3bunqEDrUYGGQZddH
   13.46 +khgid6wH54o+CnaPMe1vHOFvhy5P4I2zIJi2WSY3bvz1zFp1imyTCEwMVYI+AYPd
   13.47 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.62 +zPqmmprEolo2iPZFLBwVqXueIPjQS6YOVaitJxQePNOHpkWJqGaVRpmVlUg7z0oC
   13.63 +smfLjfQSV6FygdjjFRjbhm14ny1vZeSbYNROSwWVDWB/KoLnC3YFQh4BjhxqORsG
   13.64 +vZ6BnWWKEtXyBN2vTCZC8+hGfo6p+WbTbwCnzPWTvuhxqxFC/P9esgBfYzUDa/qR
   13.65 +KggZvecQL+k0ebWeQzUwvTTWgfDaVh+Fl2OB3tt9kI9th46mfw1a6MXQssyH0Shd
   13.66 +1J/cQtAZiZCCnKS41aLUKnMNjrGtMdYjCq6f9WGTqB5tXhYYkMZBCiJBmXaXR1Vl
   13.67 +i8ERoZm5GXki9d54Gu1lAZ6QDM6OiKngsknRFAyvQz4zDAHm0olGA4+SIdRT9iQ6
   13.68 +I2NDR/R9kZzuQ/42CiUf8XX/4TzbvU/DhExIEyxN6S8khYaDfsDVoBrKOn4qF7Lj
   13.69 +1PNN1xt0qNxYPy3tbQVnCOD6a0pomCsddt0ANDA4BDMM32UW0FU2Ahu0
   13.70 +=Lvco
   13.71 +-----END PGP PUBLIC KEY BLOCK-----
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/test/test_keys/pub/pep-test-mary-0x7F59F03CD04A226E_expired_sig_key.asc	Wed May 15 14:03:15 2019 +0200
    14.3 @@ -0,0 +1,68 @@
    14.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    14.5 +
    14.6 +mQGNBFzakXIBDADFQ/yauFR/q9HPFfszr8Cd2t4tZA9xBC46CtTnvetfL40EnCPV
    14.7 +umzsKCt0ZICiqMS538yMzgE5V7cUGCJJxabTt9Xnm/mqD6JJFiNxx49+BxapiJgN
    14.8 +VE7Uo5s2tXzy/BUGP3B5OeW2frFbse0zRWkgN/jvbkNr43LsHVYkBUQKSiqm3Ud7
    14.9 +1NZRaapAbkxisCOHNTZ2uyayX2WZlxKgufp/61wL75XRoPoQdnajaQvro1rr35sC
   14.10 +teG9k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7KmlQY8J3Drv2kCfp1WgqersQ1657oVInrkBjQRc2pGWAQwAthqHv8g4K/uT
   14.26 +Y/l8DBBDYSIKNBZ1CTHGF0mYW9QqfCOZNo+4HvMnregVVWJRI1SmewtlFqoe4eVp
   14.27 +WlQZ/yAqqA1KpCZfS5LVzVW3k7MKE1SU8imoCfxWlG+2LG+dfolrAuy2TSlGPIew
   14.28 +ix7GheONohx5LPe4ksJeRDE7/9KtQHgWv3NcJiYd8NXNHxGI8k0Xv1URIWAbJx5H
   14.29 +EZ7PKmSl/hcicbYCpRoeyxcajlBAPKys0vNee6mkvhhvB7zd169XfHMH/15wAwML
   14.30 +H0GocRDHhWaFFFrXJX4HAQwBCU1PXWr02Sa73eNyEd66mBwQnConNA6PkL7eNwzP
   14.31 +2Nmq3tjbiKO7pYhGN/NIEh2QCPRJlUbjnv068JiD8sR06HMVMeaDS1zd29Bt4J82
   14.32 +gi79mzBnhbMyHDrZrnr9cx4kUXDGyLkEG0WlbBhukbMu0t4ZsBuNu22yOJPiqprX
   14.33 +rstFhhIFHTGRK+tvX6HLo60tEIdhN9CjOh9j/KShYyttEEkGdIDZABEBAAGJA3IE
   14.34 +GAEIACYCGwIWIQRZmz1ngA2zfi3OBcB/WfA80EoibgUCXNqSVQUJAAFSPwHAwPQg
   14.35 +BBkBCAAdFiEENK0F1CbkTGsl0IRvvtCx9Byw3FEFAlzakZYACgkQvtCx9Byw3FGr
   14.36 +xQv+PFfjWc0tzZUmv0dpnAcAGchGYghrLTHrmpbDbacXgCN3SQ9mDqbahdBMAmq3
   14.37 +WAa0WB+Jb2zzQlAtP6T1QXZWRovp1+y6jn30pZmEcs/SuonSzlqi0HGm+zWRvH4M
   14.38 +soLcf81ci70bQnKrBrgo/fLyGV4MgEGZ2gw2lF0T8JV5QlF1wGJhDK9s01Wc8Zs9
   14.39 +fCs69Wyu8NH+sMQx4je4BqUl+wEqeH4d4JQCFu1eqNN3lH83CIs16lT/ozVa0dl2
   14.40 +3RT+m93ltlAF39ZwJlF+ySktXxoZOn/twnc5stbRrAnwem1EIcZM2Iblr87i18Bu
   14.41 +QVaSs48DKhqsMtlJ2iLqtEPLFPDdbgJqYWZu/tcf+I1XUC5vYn+qJGOdXbv8z3aB
   14.42 +7nEaP7E/kq/sQF5+kJAeknc5MFFwAv7kRd2YNkQVcoXK6yBvpqyAFuRTtdp4zoKy
   14.43 +QFj9PcyopWJzhqA5253sa6k1I6XGbqGlv2J9g6GyCRQJf3epk8dp5TX1NDpdYMJl
   14.44 +jgNWCRB/WfA80EoibqLdC/4ssznHmOhxlEmPHZOgOsJQgtQGt3Zz4EDqOY5ejxaj
   14.45 +B9Nl5zJdypDhx1Dfb6gCR9ZOsKelpZJeees2HjKA0mqwFkQ30s/HN1ocVCKaq3md
   14.46 +ozGQv0z5Cihw1Buj+CZwHztPRbtDPNAyrLUjgJN0Lg/jfU4G90aS1aQEGnnlksE3
   14.47 +qkBw+86RV2gHoVfWOGQGFCajlJgnz6X93YL1A7IJv19rP+4fHJKubq98gnXvo60Z
   14.48 +OBiUKmIkgja2lDlZo26qz/yHiS/WBo/ZWMBiH7brM7TikIAC3JgXrc+98m8vJqAQ
   14.49 ++Ak6yndQDaMmnfaj53E4YaZ937xGiNRZq5lEnPZqII5Ki+gvscpBOrVo/N1hVsAB
   14.50 +Zqiy29r67lcrZjYAWpYVtTWtQP1el6WyhClZnZiRJJ0blnhSWF+W6G9anjPerqnw
   14.51 ++hC1oVehym7tCm/NoIMwxaUHa90T8637jYh/pEutQD3xWFRUcEMa+l9rvW9yuIYW
   14.52 +kXTPWsuZllyaw37qSGCMUA+5AY0EXNqRpQEMALYv60MAm+OLnGqt8+6ekJrT8L5D
   14.53 +nNrHjKkNiU2P7spTZ50813djtk5ddTnye/YFt4pWqhlVSzmNsB7jRrtdhRKipN55
   14.54 +yGT0nEsjCy+kuHkTVsYPrtTsWdd9mq+b1vuYpZ4OuI+Y98lx5ZDLhvqz3rwE56jQ
   14.55 +vWJHS0O7Ti7mYCBkNdMeYuvmjGEeLG0zE4mRBQiURok/80ZLhH2urV+CRLeS/6Q2
   14.56 +96JlGXGra8YTb+D65TgKxyr6P7X0N3NNmA67oljTa5e1s+/Rn0ZqP1JSBOdRsUX/
   14.57 +2qVX8WQAAcrVD+Pxc+g8WR4L5qR4QA/cbKEuacSBj53cwDnFZEOCw577T7E/diEA
   14.58 +Eg4yTQtM1vk1Jd4hL7a3703MADUFP0TUJO2EMcLfBovkWT3DUw3CjJoCj3qoSots
   14.59 +Vuk7UcHaTxqTe4K93KxZaRXb/M9GmHdHXNxdYSb+8AMlr2zO3Ht1kNPL0CMOaq4F
   14.60 +ZKTb8WGz2ehCxcjbE49l3isHCKZNI0dfbEMQLwARAQABiQG2BBgBCAAgFiEEWZs9
   14.61 +Z4ANs34tzgXAf1nwPNBKIm4FAlzakaUCGwwACgkQf1nwPNBKIm6jJwwAhjrzhMBo
   14.62 +zPqmmprEolo2iPZFLBwVqXueIPjQS6YOVaitJxQePNOHpkWJqGaVRpmVlUg7z0oC
   14.63 +smfLjfQSV6FygdjjFRjbhm14ny1vZeSbYNROSwWVDWB/KoLnC3YFQh4BjhxqORsG
   14.64 +vZ6BnWWKEtXyBN2vTCZC8+hGfo6p+WbTbwCnzPWTvuhxqxFC/P9esgBfYzUDa/qR
   14.65 +KggZvecQL+k0ebWeQzUwvTTWgfDaVh+Fl2OB3tt9kI9th46mfw1a6MXQssyH0Shd
   14.66 +1J/cQtAZiZCCnKS41aLUKnMNjrGtMdYjCq6f9WGTqB5tXhYYkMZBCiJBmXaXR1Vl
   14.67 +i8ERoZm5GXki9d54Gu1lAZ6QDM6OiKngsknRFAyvQz4zDAHm0olGA4+SIdRT9iQ6
   14.68 +I2NDR/R9kZzuQ/42CiUf8XX/4TzbvU/DhExIEyxN6S8khYaDfsDVoBrKOn4qF7Lj
   14.69 +1PNN1xt0qNxYPy3tbQVnCOD6a0pomCsddt0ANDA4BDMM32UW0FU2Ahu0
   14.70 +=INdi
   14.71 +-----END PGP PUBLIC KEY BLOCK-----
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/test/test_keys/pub/pep-test-mary-0x7F59F03CD04A226E_revoked_sig_key.asc	Wed May 15 14:03:15 2019 +0200
    15.3 @@ -0,0 +1,77 @@
    15.4 +-----BEGIN PGP PUBLIC KEY BLOCK-----
    15.5 +
    15.6 +mQGNBFzakXIBDADFQ/yauFR/q9HPFfszr8Cd2t4tZA9xBC46CtTnvetfL40EnCPV
    15.7 +umzsKCt0ZICiqMS538yMzgE5V7cUGCJJxabTt9Xnm/mqD6JJFiNxx49+BxapiJgN
    15.8 +VE7Uo5s2tXzy/BUGP3B5OeW2frFbse0zRWkgN/jvbkNr43LsHVYkBUQKSiqm3Ud7
    15.9 +1NZRaapAbkxisCOHNTZ2uyayX2WZlxKgufp/61wL75XRoPoQdnajaQvro1rr35sC
   15.10 +teG9k425WS60j80ie+AmGEIguPPc4Go5rhwf3SCqU7BfiYCxVAvX5ESr+HpyicEF
   15.11 +5iL+4wm/VMxj4zzFMQKQvQ0lHmw4I1SreS250sVfkXWdYtjiq+2XWGoQUWOnU/j4
   15.12 +nBol10pwOQVI0jL+ok8OlXfFZm6LIYY7Pmd9O4e5WbCid/UU+uc0UW1qDtkHie8t
   15.13 +25epIQGqmLOHgQJDWxdSnmNRcM7A9ckktGNMG3n53qJ8bvdfqlioRNJwm0IUF1cz
   15.14 +dHZuhDzoSFpPTbMAEQEAAbRJTWFyeSBTdXNhbiBNYXJpYSBLYXJlbiBMaXNhIExp
   15.15 +bmRhIERvbm5hIFBhdHJpY2lhIFNtaXRoIDwxOTYwQGV4YW1wbGUub3JnPokBzgQT
   15.16 +AQgAOBYhBFmbPWeADbN+Lc4FwH9Z8DzQSiJuBQJc2pFyAhsBBQsJCAcCBhUICQoL
   15.17 +AgQWAgMBAh4BAheAAAoJEH9Z8DzQSiJuHm4L/2sdjY6hVYgkmMKR9DtjK3vrHcvk
   15.18 +JZPiGZVbN91oC0xd/ulBLTtpklq4sE8NBSVSpCphXAtiQ5wwmHkddxWVQdVu0Txx
   15.19 +5KSc4XqkU6JpmF72C0DdbKrlFQ9Xda68bFgsDAwd4/p35osXbE9xmWAXZmmW70l5
   15.20 +8MoZuV01Ks7PbWIH7RzhsKRNtMkkjkjQ6SdLesDpaewrrmZU6QQX2ZdT5ogCysGz
   15.21 +0ioVzicrhCP1u3Cdvy8inxj1u5ZBgG3pPSaMCumPQxqLOpDn/FvAKYt2QVySXgWk
   15.22 +j6gmdDZPyz/dyRb/MgHYCmYiyq6+2FspUhBiw/z1cDnE1v5lEb53nGod1gGwVUje
   15.23 +n0WM41fLA8zQj0U5jm17C5sQu7jOhfLDJcxQlD4WU2N4IY5lOow0JVxCZ/+iNkN/
   15.24 +JbIzl+nT57xcu9ttS8B8/SmASAfBoFU/a8SdKTZWcAoVJgDk560VBY8fszIdRtLi
   15.25 +pOnA7KmlQY8J3Drv2kCfp1WgqersQ1657oVInrkBjQRc2pGWAQwAthqHv8g4K/uT
   15.26 +Y/l8DBBDYSIKNBZ1CTHGF0mYW9QqfCOZNo+4HvMnregVVWJRI1SmewtlFqoe4eVp
   15.27 +WlQZ/yAqqA1KpCZfS5LVzVW3k7MKE1SU8imoCfxWlG+2LG+dfolrAuy2TSlGPIew
   15.28 +ix7GheONohx5LPe4ksJeRDE7/9KtQHgWv3NcJiYd8NXNHxGI8k0Xv1URIWAbJx5H
   15.29 +EZ7PKmSl/hcicbYCpRoeyxcajlBAPKys0vNee6mkvhhvB7zd169XfHMH/15wAwML
   15.30 +H0GocRDHhWaFFFrXJX4HAQwBCU1PXWr02Sa73eNyEd66mBwQnConNA6PkL7eNwzP
   15.31 +2Nmq3tjbiKO7pYhGN/NIEh2QCPRJlUbjnv068JiD8sR06HMVMeaDS1zd29Bt4J82
   15.32 +gi79mzBnhbMyHDrZrnr9cx4kUXDGyLkEG0WlbBhukbMu0t4ZsBuNu22yOJPiqprX
   15.33 +rstFhhIFHTGRK+tvX6HLo60tEIdhN9CjOh9j/KShYyttEEkGdIDZABEBAAGJAbYE
   15.34 +KAEIACAWIQRZmz1ngA2zfi3OBcB/WfA80EoibgUCXNqSlwIdAAAKCRB/WfA80Eoi
   15.35 +bh1TC/96wk38W5QoHEff/k09349xQv1+JwvSiQSyPwaOfFM03tymNhzA/hVTsm5t
   15.36 +qihmSNRRPAyeyIcoBxkDGdr6Kr2cfeOwCroKKGzLuwh4RVc8nnzIIG4NEox+pUUa
   15.37 +V8UvQRBOgsmzedfFHmfAn48VET1hShy8a25XvFS/foRrUO4zPZatLuFbfZFGDWEt
   15.38 +mQeXvxv3w34LTcMwLo6PGLZlj0qX0qkUBP5DM37iG+eVOh5GFmg24NDKFYdoNmyf
   15.39 +w32ThCbE6hsyo18k8jdbJ3mi2Llyl0pU7MTO9VPO1N16aj9dv2G2hg3tvFIXV1r0
   15.40 +t1P2iJ3697is4fmUpt7zNTvuzbt0h4ZSSXXm9mRY0zh6DaBjIvj+k98i3Yo0czY9
   15.41 +uZDsjE3eHD6fZG0Yzg92ifDXlXSkunEBp43ofBDUcZ1Zr4AcioxGd+KUwUt6CLn7
   15.42 +0deDKETnzokYeNt0jgePrz6QvevQnfDlEEXqEo/Hevp5UeGekI18ecN6Pi226NuH
   15.43 +mNc//saJA2wEGAEIACAWIQRZmz1ngA2zfi3OBcB/WfA80EoibgUCXNqRlgIbAgHA
   15.44 +CRB/WfA80EoibsD0IAQZAQgAHRYhBDStBdQm5ExrJdCEb77QsfQcsNxRBQJc2pGW
   15.45 +AAoJEL7QsfQcsNxRq8UL/jxX41nNLc2VJr9HaZwHABnIRmIIay0x65qWw22nF4Aj
   15.46 +d0kPZg6m2oXQTAJqt1gGtFgfiW9s80JQLT+k9UF2VkaL6dfsuo599KWZhHLP0rqJ
   15.47 +0s5aotBxpvs1kbx+DLKC3H/NXIu9G0Jyqwa4KP3y8hleDIBBmdoMNpRdE/CVeUJR
   15.48 +dcBiYQyvbNNVnPGbPXwrOvVsrvDR/rDEMeI3uAalJfsBKnh+H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MM32UW0FU2Ahu0
   15.79 +=CDai
   15.80 +-----END PGP PUBLIC KEY BLOCK-----