sequoia: Make email address comparison more robust email_comparison
authorNeal H. Walfield <neal@pep.foundation>
Wed, 08 May 2019 11:57:13 +0200
branchemail_comparison
changeset 3648f7f07e2825d1
parent 3643 7d41a09ebd76
child 3649 1dd837adc30b
sequoia: Make email address comparison more robust

- Compare case insensitively and normalize puny code when comparing
email addresses.
Makefile.conf
src/pgp_sequoia.c
test/Makefile
test/include/LookupTests.h
test/src/SuiteMaker.cc
test/src/engine_tests/LookupTests.cc
test/test_keys/priv/hans@xn--bcher-kva.tld_-0x08AD6E9400D38894_priv.asc
test/test_keys/pub/hans@xn--bcher-kva.tld_-0x08AD6E9400D38894_pub.asc
     1.1 --- a/Makefile.conf	Tue May 07 13:24:07 2019 +0200
     1.2 +++ b/Makefile.conf	Wed May 08 11:57:13 2019 +0200
     1.3 @@ -85,7 +85,7 @@
     1.4  endif
     1.5  
     1.6  ifeq ($(BUILD_FOR),Linux)
     1.7 -    CFLAGS=-fPIC -fstrict-aliasing -fdiagnostics-color=always
     1.8 +    CFLAGS=-fPIC -fstrict-aliasing
     1.9  else ifeq ($(BUILD_FOR),Darwin)
    1.10      CFLAGS=-pthread -fPIC -fstrict-aliasing -fcolor-diagnostics
    1.11  endif
    1.12 @@ -141,7 +141,7 @@
    1.13  # The flag -DNDEBUG will always be removed from CXXFLAGS for compiling tests.
    1.14  # The tests do not work properly, if compiled with -DNDEBUG
    1.15  ifeq ($(BUILD_FOR),Linux)
    1.16 -    CXXFLAGS=-fdiagnostics-color=always -I../src -I../asn.1 $(ETPAN_INC)
    1.17 +    CXXFLAGS=-I../src -I../asn.1 $(ETPAN_INC)
    1.18      ifdef WARN
    1.19          CXXFLAGS+=
    1.20      else
     2.1 --- a/src/pgp_sequoia.c	Tue May 07 13:24:07 2019 +0200
     2.2 +++ b/src/pgp_sequoia.c	Wed May 08 11:57:13 2019 +0200
     2.3 @@ -77,6 +77,48 @@
     2.4      }                                                               \
     2.5  } while(0)
     2.6  
     2.7 +int email_cmp(void *cookie, int a_len, const void *a, int b_len, const void *b)
     2.8 +{
     2.9 +    pgp_packet_t a_userid = pgp_user_id_from_raw (a, a_len);
    2.10 +    pgp_packet_t b_userid = pgp_user_id_from_raw (b, b_len);
    2.11 +
    2.12 +    T("(%.*s, %.*s)", a_len, a, b_len, b);
    2.13 +
    2.14 +    char *a_address = NULL;
    2.15 +    pgp_user_id_address_normalized(NULL, a_userid, &a_address);
    2.16 +
    2.17 +    char *b_address = NULL;
    2.18 +    pgp_user_id_address_normalized(NULL, b_userid, &b_address);
    2.19 +
    2.20 +    pgp_packet_free(a_userid);
    2.21 +    pgp_packet_free(b_userid);
    2.22 +
    2.23 +    // return an integer that is negative, zero, or positive if the
    2.24 +    // first string is less than, equal to, or greater than the
    2.25 +    // second, respectively.
    2.26 +    int result;
    2.27 +    if (!a_address && !b_address)
    2.28 +        result = 0;
    2.29 +    else if (!a_address)
    2.30 +        result = -1;
    2.31 +    else if (!b_address)
    2.32 +        result = 1;
    2.33 +    else
    2.34 +        result = strcmp(a_address, b_address);
    2.35 +
    2.36 +    if (true) {
    2.37 +        T("'%s' %s '%s'",
    2.38 +          a_address,
    2.39 +          result == 0 ? "==" : result < 0 ? "<" : ">",
    2.40 +          b_address);
    2.41 +    }
    2.42 +
    2.43 +    free(a_address);
    2.44 +    free(b_address);
    2.45 +
    2.46 +    return result;
    2.47 +}
    2.48 +
    2.49  PEP_STATUS pgp_init(PEP_SESSION session, bool in_first)
    2.50  {
    2.51      PEP_STATUS status = PEP_STATUS_OK;
    2.52 @@ -123,6 +165,17 @@
    2.53  
    2.54      sqlite3_busy_timeout(session->key_db, BUSY_WAIT_TIME);
    2.55  
    2.56 +    sqlite_result =
    2.57 +        sqlite3_create_collation(session->key_db,
    2.58 +                                "EMAIL",
    2.59 +                                SQLITE_UTF8,
    2.60 +                                /* pArg (cookie) */ NULL,
    2.61 +                                email_cmp);
    2.62 +    if (sqlite_result != SQLITE_OK)
    2.63 +        ERROR_OUT(NULL, PEP_INIT_CANNOT_OPEN_DB,
    2.64 +                  "registering EMAIL collation function: %s",
    2.65 +                  sqlite3_errmsg(session->key_db));
    2.66 +
    2.67      sqlite_result = sqlite3_exec(session->key_db,
    2.68                                   "CREATE TABLE IF NOT EXISTS keys (\n"
    2.69                                   "   primary_key TEXT UNIQUE PRIMARY KEY,\n"
    2.70 @@ -156,7 +209,7 @@
    2.71  
    2.72      sqlite_result = sqlite3_exec(session->key_db,
    2.73                                   "CREATE TABLE IF NOT EXISTS userids (\n"
    2.74 -                                 "   userid TEXT NOT NULL,\n"
    2.75 +                                 "   userid TEXT NOT NULL COLLATE EMAIL,\n"
    2.76                                   "   primary_key TEXT NOT NULL,\n"
    2.77                                   "   UNIQUE(userid, primary_key),\n"
    2.78                                   "   FOREIGN KEY (primary_key)\n"
    2.79 @@ -164,7 +217,7 @@
    2.80                                   "     ON DELETE CASCADE\n"
    2.81                                   ");\n"
    2.82                                   "CREATE INDEX IF NOT EXISTS userids_index\n"
    2.83 -                                 "  ON userids (userid, primary_key)\n",
    2.84 +                                 "  ON userids (userid COLLATE EMAIL, primary_key)\n",
    2.85                                   NULL, NULL, NULL);
    2.86      if (sqlite_result != SQLITE_OK)
    2.87          ERROR_OUT(NULL, PEP_INIT_CANNOT_OPEN_DB,
     3.1 --- a/test/Makefile	Tue May 07 13:24:07 2019 +0200
     3.2 +++ b/test/Makefile	Wed May 08 11:57:13 2019 +0200
     3.3 @@ -127,7 +127,7 @@
     3.4  endif
     3.5  
     3.6  test: all
     3.7 -	$(TEST_CMD_PFX) $(TEST_DEBUGGER) ./$(TARGET)
     3.8 +	ulimit -n 30000; $(TEST_DEBUGGER) ./$(TARGET) LookupTests
     3.9  
    3.10  clean:
    3.11  	$(RM) $(TARGET) $(TARGET).o $(TARGET).d $(OBJS) $(notdir $(basename $(OBJS))) $(DEPS)
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/test/include/LookupTests.h	Wed May 08 11:57:13 2019 +0200
     4.3 @@ -0,0 +1,22 @@
     4.4 +// This file is under GNU General Public License 3.0
     4.5 +// see LICENSE.txt
     4.6 +
     4.7 +#ifndef LOOKUP_H
     4.8 +#define LOOKUP_H
     4.9 +
    4.10 +#include <string>
    4.11 +#include "EngineTestSessionSuite.h"
    4.12 +
    4.13 +using namespace std;
    4.14 +
    4.15 +class LookupTests : public EngineTestSessionSuite {
    4.16 +    public:
    4.17 +        LookupTests(string test_suite, string test_home_dir);
    4.18 +	protected:
    4.19 +        void setup();
    4.20 +        void tear_down();
    4.21 +    private:
    4.22 +        void lookup();
    4.23 +};
    4.24 +
    4.25 +#endif
     5.1 --- a/test/src/SuiteMaker.cc	Tue May 07 13:24:07 2019 +0200
     5.2 +++ b/test/src/SuiteMaker.cc	Wed May 08 11:57:13 2019 +0200
     5.3 @@ -12,231 +12,239 @@
     5.4  #include "SuiteMaker.h"
     5.5  
     5.6  // Begin where we generate stuff
     5.7 +#include "CaseAndDotAddressTests.h"
     5.8 +#include "SequenceTests.h"
     5.9 +#include "EncryptForIdentityTests.h"
    5.10 +#include "UserIdCollisionTests.h"
    5.11 +#include "DecryptAttachPrivateKeyTrustedTests.h"
    5.12 +#include "EnterLeaveDeviceGroupTests.h"
    5.13 +#include "EncryptAttachPrivateKeyTests.h"
    5.14 +#include "LeastCommonDenomColorTests.h"
    5.15 +#include "ExpiredSubkeyTests.h"
    5.16 +#include "KeyAttachmentTests.h"
    5.17 +#include "AppleMailTests.h"
    5.18 +#include "DeleteKeyTests.h"
    5.19 +#include "IdentityListTests.h"
    5.20 +#include "SignOnlyTests.h"
    5.21 +#include "CheckRenewedExpiredKeyTrustStatusTests.h"
    5.22 +#include "DecryptAttachPrivateKeyUntrustedTests.h"
    5.23 +#include "TrustwordsTests.h"
    5.24 +#include "ExternalRevokeTests.h"
    5.25 +#include "MapAsn1Tests.h"
    5.26 +#include "PgpListKeysTests.h"
    5.27 +#include "HeaderKeyImportTests.h"
    5.28 +#include "DecorateTests.h"
    5.29 +#include "OwnIdentitiesRetrieveTests.h"
    5.30 +#include "ReencryptPlusExtraKeysTests.h"
    5.31 +#include "RevokeRegenAttachTests.h"
    5.32 +#include "BlacklistAcceptNewKeyTests.h"
    5.33 +#include "UserIDAliasTests.h"
    5.34 +#include "BlacklistTests.h"
    5.35 +#include "EncryptMissingPrivateKeyTests.h"
    5.36 +#include "NewUpdateIdAndMyselfTests.h"
    5.37 +#include "TrustManipulationTests.h"
    5.38 +#include "MessageNullFromTests.h"
    5.39 +#include "KeyeditTests.h"
    5.40 +#include "PepSubjectReceivedTests.h"
    5.41 +#include "StringlistTests.h"
    5.42 +#include "PgpBinaryTests.h"
    5.43 +#include "Engine358Tests.h"
    5.44 +#include "NoOwnIdentWritesOnDecryptTests.h"
    5.45 +#include "SyncTests.h"
    5.46 +#include "StringpairListTests.h"
    5.47 +#include "OwnKeysRetrieveTests.h"
    5.48 +#include "ExportKeyTests.h"
    5.49 +#include "KeyResetMessageTests.h"
    5.50 +#include "SubkeyRatingEvalTests.h"
    5.51 +#include "CrashdumpTests.h"
    5.52 +#include "BloblistTests.h"
    5.53 +#include "Engine463Tests.h"
    5.54 +#include "I18nTests.h"
    5.55 +#include "LookupTests.h"
    5.56  #include "MimeTests.h"
    5.57 -#include "OwnIdentitiesRetrieveTests.h"
    5.58 -#include "ExpiredSubkeyTests.h"
    5.59 -#include "UserIdCollisionTests.h"
    5.60 -#include "Engine463Tests.h"
    5.61 -#include "BloblistTests.h"
    5.62 -#include "NewUpdateIdAndMyselfTests.h"
    5.63 -#include "NoOwnIdentWritesOnDecryptTests.h"
    5.64 -#include "I18nTests.h"
    5.65 -#include "IdentityListTests.h"
    5.66 -#include "PgpBinaryTests.h"
    5.67 -#include "SubkeyRatingEvalTests.h"
    5.68 -#include "MessageNullFromTests.h"
    5.69 -#include "ExportKeyTests.h"
    5.70 -#include "LeastCommonDenomColorTests.h"
    5.71 -#include "StringlistTests.h"
    5.72 -#include "PgpListKeysTests.h"
    5.73 +#include "TestTopicTests.h"
    5.74 +#include "LeastColorGroupTests.h"
    5.75  #include "MessageApiTests.h"
    5.76 -#include "EncryptMissingPrivateKeyTests.h"
    5.77 -#include "CaseAndDotAddressTests.h"
    5.78 -#include "UserIDAliasTests.h"
    5.79 -#include "EnterLeaveDeviceGroupTests.h"
    5.80 -#include "SignOnlyTests.h"
    5.81 +#include "MessageTwoPointOhTests.h"
    5.82  #include "BCCTests.h"
    5.83 -#include "Engine358Tests.h"
    5.84 -#include "BlacklistAcceptNewKeyTests.h"
    5.85 -#include "DecryptAttachPrivateKeyUntrustedTests.h"
    5.86 -#include "BlacklistTests.h"
    5.87 -#include "RevokeRegenAttachTests.h"
    5.88 -#include "PepSubjectReceivedTests.h"
    5.89 -#include "SequenceTests.h"
    5.90 -#include "HeaderKeyImportTests.h"
    5.91 -#include "EncryptAttachPrivateKeyTests.h"
    5.92 -#include "ExternalRevokeTests.h"
    5.93 -#include "KeyeditTests.h"
    5.94 -#include "LeastColorGroupTests.h"
    5.95 -#include "DecryptAttachPrivateKeyTrustedTests.h"
    5.96 -#include "CheckRenewedExpiredKeyTrustStatusTests.h"
    5.97 -#include "TrustwordsTests.h"
    5.98  #include "SimpleBodyNotAltTests.h"
    5.99 -#include "ReencryptPlusExtraKeysTests.h"
   5.100 -#include "MapAsn1Tests.h"
   5.101 -#include "DecorateTests.h"
   5.102 -#include "MessageTwoPointOhTests.h"
   5.103 -#include "CrashdumpTests.h"
   5.104 -#include "StringpairListTests.h"
   5.105 -#include "EncryptForIdentityTests.h"
   5.106 -#include "KeyResetMessageTests.h"
   5.107 -#include "DeleteKeyTests.h"
   5.108 -#include "KeyAttachmentTests.h"
   5.109 -#include "OwnKeysRetrieveTests.h"
   5.110 -#include "TrustManipulationTests.h"
   5.111 -#include "SyncTests.h"
   5.112 -#include "AppleMailTests.h"
   5.113  
   5.114  
   5.115  const char* SuiteMaker::all_suites[] = {
   5.116 +    "CaseAndDotAddressTests",
   5.117 +    "SequenceTests",
   5.118 +    "EncryptForIdentityTests",
   5.119 +    "UserIdCollisionTests",
   5.120 +    "DecryptAttachPrivateKeyTrustedTests",
   5.121 +    "EnterLeaveDeviceGroupTests",
   5.122 +    "EncryptAttachPrivateKeyTests",
   5.123 +    "LeastCommonDenomColorTests",
   5.124 +    "ExpiredSubkeyTests",
   5.125 +    "KeyAttachmentTests",
   5.126 +    "AppleMailTests",
   5.127 +    "DeleteKeyTests",
   5.128 +    "IdentityListTests",
   5.129 +    "SignOnlyTests",
   5.130 +    "CheckRenewedExpiredKeyTrustStatusTests",
   5.131 +    "DecryptAttachPrivateKeyUntrustedTests",
   5.132 +    "TrustwordsTests",
   5.133 +    "ExternalRevokeTests",
   5.134 +    "MapAsn1Tests",
   5.135 +    "PgpListKeysTests",
   5.136 +    "HeaderKeyImportTests",
   5.137 +    "DecorateTests",
   5.138 +    "OwnIdentitiesRetrieveTests",
   5.139 +    "ReencryptPlusExtraKeysTests",
   5.140 +    "RevokeRegenAttachTests",
   5.141 +    "BlacklistAcceptNewKeyTests",
   5.142 +    "UserIDAliasTests",
   5.143 +    "BlacklistTests",
   5.144 +    "EncryptMissingPrivateKeyTests",
   5.145 +    "NewUpdateIdAndMyselfTests",
   5.146 +    "TrustManipulationTests",
   5.147 +    "MessageNullFromTests",
   5.148 +    "KeyeditTests",
   5.149 +    "PepSubjectReceivedTests",
   5.150 +    "StringlistTests",
   5.151 +    "PgpBinaryTests",
   5.152 +    "Engine358Tests",
   5.153 +    "NoOwnIdentWritesOnDecryptTests",
   5.154 +    "SyncTests",
   5.155 +    "StringpairListTests",
   5.156 +    "OwnKeysRetrieveTests",
   5.157 +    "ExportKeyTests",
   5.158 +    "KeyResetMessageTests",
   5.159 +    "SubkeyRatingEvalTests",
   5.160 +    "CrashdumpTests",
   5.161 +    "BloblistTests",
   5.162 +    "Engine463Tests",
   5.163 +    "I18nTests",
   5.164 +    "LookupTests",
   5.165      "MimeTests",
   5.166 -    "OwnIdentitiesRetrieveTests",
   5.167 -    "ExpiredSubkeyTests",
   5.168 -    "UserIdCollisionTests",
   5.169 -    "Engine463Tests",
   5.170 -    "BloblistTests",
   5.171 -    "NewUpdateIdAndMyselfTests",
   5.172 -    "NoOwnIdentWritesOnDecryptTests",
   5.173 -    "I18nTests",
   5.174 -    "IdentityListTests",
   5.175 -    "PgpBinaryTests",
   5.176 -    "SubkeyRatingEvalTests",
   5.177 -    "MessageNullFromTests",
   5.178 -    "ExportKeyTests",
   5.179 -    "LeastCommonDenomColorTests",
   5.180 -    "StringlistTests",
   5.181 -    "PgpListKeysTests",
   5.182 +    "TestTopicTests",
   5.183 +    "LeastColorGroupTests",
   5.184      "MessageApiTests",
   5.185 -    "EncryptMissingPrivateKeyTests",
   5.186 -    "CaseAndDotAddressTests",
   5.187 -    "UserIDAliasTests",
   5.188 -    "EnterLeaveDeviceGroupTests",
   5.189 -    "SignOnlyTests",
   5.190 +    "MessageTwoPointOhTests",
   5.191      "BCCTests",
   5.192 -    "Engine358Tests",
   5.193 -    "BlacklistAcceptNewKeyTests",
   5.194 -    "DecryptAttachPrivateKeyUntrustedTests",
   5.195 -    "BlacklistTests",
   5.196 -    "RevokeRegenAttachTests",
   5.197 -    "PepSubjectReceivedTests",
   5.198 -    "SequenceTests",
   5.199 -    "HeaderKeyImportTests",
   5.200 -    "EncryptAttachPrivateKeyTests",
   5.201 -    "ExternalRevokeTests",
   5.202 -    "KeyeditTests",
   5.203 -    "LeastColorGroupTests",
   5.204 -    "DecryptAttachPrivateKeyTrustedTests",
   5.205 -    "CheckRenewedExpiredKeyTrustStatusTests",
   5.206 -    "TrustwordsTests",
   5.207      "SimpleBodyNotAltTests",
   5.208 -    "ReencryptPlusExtraKeysTests",
   5.209 -    "MapAsn1Tests",
   5.210 -    "DecorateTests",
   5.211 -    "MessageTwoPointOhTests",
   5.212 -    "CrashdumpTests",
   5.213 -    "StringpairListTests",
   5.214 -    "EncryptForIdentityTests",
   5.215 -    "KeyResetMessageTests",
   5.216 -    "DeleteKeyTests",
   5.217 -    "KeyAttachmentTests",
   5.218 -    "OwnKeysRetrieveTests",
   5.219 -    "TrustManipulationTests",
   5.220 -    "SyncTests",
   5.221 -    "AppleMailTests",
   5.222  };
   5.223  
   5.224  // This file is generated, so magic constants are ok.
   5.225 -int SuiteMaker::num_suites = 54;
   5.226 +int SuiteMaker::num_suites = 56;
   5.227  
   5.228  void SuiteMaker::suitemaker_build(const char* test_class_name, const char* test_home, Test::Suite** test_suite) {
   5.229 -    if (strcmp(test_class_name, "MimeTests") == 0)
   5.230 -        *test_suite = new MimeTests(test_class_name, test_home);
   5.231 +    if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
   5.232 +        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
   5.233 +    else if (strcmp(test_class_name, "SequenceTests") == 0)
   5.234 +        *test_suite = new SequenceTests(test_class_name, test_home);
   5.235 +    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
   5.236 +        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
   5.237 +    else if (strcmp(test_class_name, "UserIdCollisionTests") == 0)
   5.238 +        *test_suite = new UserIdCollisionTests(test_class_name, test_home);
   5.239 +    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
   5.240 +        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
   5.241 +    else if (strcmp(test_class_name, "EnterLeaveDeviceGroupTests") == 0)
   5.242 +        *test_suite = new EnterLeaveDeviceGroupTests(test_class_name, test_home);
   5.243 +    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
   5.244 +        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
   5.245 +    else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
   5.246 +        *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
   5.247 +    else if (strcmp(test_class_name, "ExpiredSubkeyTests") == 0)
   5.248 +        *test_suite = new ExpiredSubkeyTests(test_class_name, test_home);
   5.249 +    else if (strcmp(test_class_name, "KeyAttachmentTests") == 0)
   5.250 +        *test_suite = new KeyAttachmentTests(test_class_name, test_home);
   5.251 +    else if (strcmp(test_class_name, "AppleMailTests") == 0)
   5.252 +        *test_suite = new AppleMailTests(test_class_name, test_home);
   5.253 +    else if (strcmp(test_class_name, "DeleteKeyTests") == 0)
   5.254 +        *test_suite = new DeleteKeyTests(test_class_name, test_home);
   5.255 +    else if (strcmp(test_class_name, "IdentityListTests") == 0)
   5.256 +        *test_suite = new IdentityListTests(test_class_name, test_home);
   5.257 +    else if (strcmp(test_class_name, "SignOnlyTests") == 0)
   5.258 +        *test_suite = new SignOnlyTests(test_class_name, test_home);
   5.259 +    else if (strcmp(test_class_name, "CheckRenewedExpiredKeyTrustStatusTests") == 0)
   5.260 +        *test_suite = new CheckRenewedExpiredKeyTrustStatusTests(test_class_name, test_home);
   5.261 +    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
   5.262 +        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
   5.263 +    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
   5.264 +        *test_suite = new TrustwordsTests(test_class_name, test_home);
   5.265 +    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
   5.266 +        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
   5.267 +    else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
   5.268 +        *test_suite = new MapAsn1Tests(test_class_name, test_home);
   5.269 +    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
   5.270 +        *test_suite = new PgpListKeysTests(test_class_name, test_home);
   5.271 +    else if (strcmp(test_class_name, "HeaderKeyImportTests") == 0)
   5.272 +        *test_suite = new HeaderKeyImportTests(test_class_name, test_home);
   5.273 +    else if (strcmp(test_class_name, "DecorateTests") == 0)
   5.274 +        *test_suite = new DecorateTests(test_class_name, test_home);
   5.275      else if (strcmp(test_class_name, "OwnIdentitiesRetrieveTests") == 0)
   5.276          *test_suite = new OwnIdentitiesRetrieveTests(test_class_name, test_home);
   5.277 -    else if (strcmp(test_class_name, "ExpiredSubkeyTests") == 0)
   5.278 -        *test_suite = new ExpiredSubkeyTests(test_class_name, test_home);
   5.279 -    else if (strcmp(test_class_name, "UserIdCollisionTests") == 0)
   5.280 -        *test_suite = new UserIdCollisionTests(test_class_name, test_home);
   5.281 +    else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
   5.282 +        *test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
   5.283 +    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
   5.284 +        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
   5.285 +    else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
   5.286 +        *test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
   5.287 +    else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
   5.288 +        *test_suite = new UserIDAliasTests(test_class_name, test_home);
   5.289 +    else if (strcmp(test_class_name, "BlacklistTests") == 0)
   5.290 +        *test_suite = new BlacklistTests(test_class_name, test_home);
   5.291 +    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
   5.292 +        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
   5.293 +    else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
   5.294 +        *test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
   5.295 +    else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
   5.296 +        *test_suite = new TrustManipulationTests(test_class_name, test_home);
   5.297 +    else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
   5.298 +        *test_suite = new MessageNullFromTests(test_class_name, test_home);
   5.299 +    else if (strcmp(test_class_name, "KeyeditTests") == 0)
   5.300 +        *test_suite = new KeyeditTests(test_class_name, test_home);
   5.301 +    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
   5.302 +        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
   5.303 +    else if (strcmp(test_class_name, "StringlistTests") == 0)
   5.304 +        *test_suite = new StringlistTests(test_class_name, test_home);
   5.305 +    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
   5.306 +        *test_suite = new PgpBinaryTests(test_class_name, test_home);
   5.307 +    else if (strcmp(test_class_name, "Engine358Tests") == 0)
   5.308 +        *test_suite = new Engine358Tests(test_class_name, test_home);
   5.309 +    else if (strcmp(test_class_name, "NoOwnIdentWritesOnDecryptTests") == 0)
   5.310 +        *test_suite = new NoOwnIdentWritesOnDecryptTests(test_class_name, test_home);
   5.311 +    else if (strcmp(test_class_name, "SyncTests") == 0)
   5.312 +        *test_suite = new SyncTests(test_class_name, test_home);
   5.313 +    else if (strcmp(test_class_name, "StringpairListTests") == 0)
   5.314 +        *test_suite = new StringpairListTests(test_class_name, test_home);
   5.315 +    else if (strcmp(test_class_name, "OwnKeysRetrieveTests") == 0)
   5.316 +        *test_suite = new OwnKeysRetrieveTests(test_class_name, test_home);
   5.317 +    else if (strcmp(test_class_name, "ExportKeyTests") == 0)
   5.318 +        *test_suite = new ExportKeyTests(test_class_name, test_home);
   5.319 +    else if (strcmp(test_class_name, "KeyResetMessageTests") == 0)
   5.320 +        *test_suite = new KeyResetMessageTests(test_class_name, test_home);
   5.321 +    else if (strcmp(test_class_name, "SubkeyRatingEvalTests") == 0)
   5.322 +        *test_suite = new SubkeyRatingEvalTests(test_class_name, test_home);
   5.323 +    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
   5.324 +        *test_suite = new CrashdumpTests(test_class_name, test_home);
   5.325 +    else if (strcmp(test_class_name, "BloblistTests") == 0)
   5.326 +        *test_suite = new BloblistTests(test_class_name, test_home);
   5.327      else if (strcmp(test_class_name, "Engine463Tests") == 0)
   5.328          *test_suite = new Engine463Tests(test_class_name, test_home);
   5.329 -    else if (strcmp(test_class_name, "BloblistTests") == 0)
   5.330 -        *test_suite = new BloblistTests(test_class_name, test_home);
   5.331 -    else if (strcmp(test_class_name, "NewUpdateIdAndMyselfTests") == 0)
   5.332 -        *test_suite = new NewUpdateIdAndMyselfTests(test_class_name, test_home);
   5.333 -    else if (strcmp(test_class_name, "NoOwnIdentWritesOnDecryptTests") == 0)
   5.334 -        *test_suite = new NoOwnIdentWritesOnDecryptTests(test_class_name, test_home);
   5.335      else if (strcmp(test_class_name, "I18nTests") == 0)
   5.336          *test_suite = new I18nTests(test_class_name, test_home);
   5.337 -    else if (strcmp(test_class_name, "IdentityListTests") == 0)
   5.338 -        *test_suite = new IdentityListTests(test_class_name, test_home);
   5.339 -    else if (strcmp(test_class_name, "PgpBinaryTests") == 0)
   5.340 -        *test_suite = new PgpBinaryTests(test_class_name, test_home);
   5.341 -    else if (strcmp(test_class_name, "SubkeyRatingEvalTests") == 0)
   5.342 -        *test_suite = new SubkeyRatingEvalTests(test_class_name, test_home);
   5.343 -    else if (strcmp(test_class_name, "MessageNullFromTests") == 0)
   5.344 -        *test_suite = new MessageNullFromTests(test_class_name, test_home);
   5.345 -    else if (strcmp(test_class_name, "ExportKeyTests") == 0)
   5.346 -        *test_suite = new ExportKeyTests(test_class_name, test_home);
   5.347 -    else if (strcmp(test_class_name, "LeastCommonDenomColorTests") == 0)
   5.348 -        *test_suite = new LeastCommonDenomColorTests(test_class_name, test_home);
   5.349 -    else if (strcmp(test_class_name, "StringlistTests") == 0)
   5.350 -        *test_suite = new StringlistTests(test_class_name, test_home);
   5.351 -    else if (strcmp(test_class_name, "PgpListKeysTests") == 0)
   5.352 -        *test_suite = new PgpListKeysTests(test_class_name, test_home);
   5.353 +    else if (strcmp(test_class_name, "LookupTests") == 0)
   5.354 +        *test_suite = new LookupTests(test_class_name, test_home);
   5.355 +    else if (strcmp(test_class_name, "MimeTests") == 0)
   5.356 +        *test_suite = new MimeTests(test_class_name, test_home);
   5.357 +    else if (strcmp(test_class_name, "TestTopicTests") == 0)
   5.358 +        *test_suite = new TestTopicTests(test_class_name, test_home);
   5.359 +    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
   5.360 +        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
   5.361      else if (strcmp(test_class_name, "MessageApiTests") == 0)
   5.362          *test_suite = new MessageApiTests(test_class_name, test_home);
   5.363 -    else if (strcmp(test_class_name, "EncryptMissingPrivateKeyTests") == 0)
   5.364 -        *test_suite = new EncryptMissingPrivateKeyTests(test_class_name, test_home);
   5.365 -    else if (strcmp(test_class_name, "CaseAndDotAddressTests") == 0)
   5.366 -        *test_suite = new CaseAndDotAddressTests(test_class_name, test_home);
   5.367 -    else if (strcmp(test_class_name, "UserIDAliasTests") == 0)
   5.368 -        *test_suite = new UserIDAliasTests(test_class_name, test_home);
   5.369 -    else if (strcmp(test_class_name, "EnterLeaveDeviceGroupTests") == 0)
   5.370 -        *test_suite = new EnterLeaveDeviceGroupTests(test_class_name, test_home);
   5.371 -    else if (strcmp(test_class_name, "SignOnlyTests") == 0)
   5.372 -        *test_suite = new SignOnlyTests(test_class_name, test_home);
   5.373 +    else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
   5.374 +        *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
   5.375      else if (strcmp(test_class_name, "BCCTests") == 0)
   5.376          *test_suite = new BCCTests(test_class_name, test_home);
   5.377 -    else if (strcmp(test_class_name, "Engine358Tests") == 0)
   5.378 -        *test_suite = new Engine358Tests(test_class_name, test_home);
   5.379 -    else if (strcmp(test_class_name, "BlacklistAcceptNewKeyTests") == 0)
   5.380 -        *test_suite = new BlacklistAcceptNewKeyTests(test_class_name, test_home);
   5.381 -    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyUntrustedTests") == 0)
   5.382 -        *test_suite = new DecryptAttachPrivateKeyUntrustedTests(test_class_name, test_home);
   5.383 -    else if (strcmp(test_class_name, "BlacklistTests") == 0)
   5.384 -        *test_suite = new BlacklistTests(test_class_name, test_home);
   5.385 -    else if (strcmp(test_class_name, "RevokeRegenAttachTests") == 0)
   5.386 -        *test_suite = new RevokeRegenAttachTests(test_class_name, test_home);
   5.387 -    else if (strcmp(test_class_name, "PepSubjectReceivedTests") == 0)
   5.388 -        *test_suite = new PepSubjectReceivedTests(test_class_name, test_home);
   5.389 -    else if (strcmp(test_class_name, "SequenceTests") == 0)
   5.390 -        *test_suite = new SequenceTests(test_class_name, test_home);
   5.391 -    else if (strcmp(test_class_name, "HeaderKeyImportTests") == 0)
   5.392 -        *test_suite = new HeaderKeyImportTests(test_class_name, test_home);
   5.393 -    else if (strcmp(test_class_name, "EncryptAttachPrivateKeyTests") == 0)
   5.394 -        *test_suite = new EncryptAttachPrivateKeyTests(test_class_name, test_home);
   5.395 -    else if (strcmp(test_class_name, "ExternalRevokeTests") == 0)
   5.396 -        *test_suite = new ExternalRevokeTests(test_class_name, test_home);
   5.397 -    else if (strcmp(test_class_name, "KeyeditTests") == 0)
   5.398 -        *test_suite = new KeyeditTests(test_class_name, test_home);
   5.399 -    else if (strcmp(test_class_name, "LeastColorGroupTests") == 0)
   5.400 -        *test_suite = new LeastColorGroupTests(test_class_name, test_home);
   5.401 -    else if (strcmp(test_class_name, "DecryptAttachPrivateKeyTrustedTests") == 0)
   5.402 -        *test_suite = new DecryptAttachPrivateKeyTrustedTests(test_class_name, test_home);
   5.403 -    else if (strcmp(test_class_name, "CheckRenewedExpiredKeyTrustStatusTests") == 0)
   5.404 -        *test_suite = new CheckRenewedExpiredKeyTrustStatusTests(test_class_name, test_home);
   5.405 -    else if (strcmp(test_class_name, "TrustwordsTests") == 0)
   5.406 -        *test_suite = new TrustwordsTests(test_class_name, test_home);
   5.407      else if (strcmp(test_class_name, "SimpleBodyNotAltTests") == 0)
   5.408          *test_suite = new SimpleBodyNotAltTests(test_class_name, test_home);
   5.409 -    else if (strcmp(test_class_name, "ReencryptPlusExtraKeysTests") == 0)
   5.410 -        *test_suite = new ReencryptPlusExtraKeysTests(test_class_name, test_home);
   5.411 -    else if (strcmp(test_class_name, "MapAsn1Tests") == 0)
   5.412 -        *test_suite = new MapAsn1Tests(test_class_name, test_home);
   5.413 -    else if (strcmp(test_class_name, "DecorateTests") == 0)
   5.414 -        *test_suite = new DecorateTests(test_class_name, test_home);
   5.415 -    else if (strcmp(test_class_name, "MessageTwoPointOhTests") == 0)
   5.416 -        *test_suite = new MessageTwoPointOhTests(test_class_name, test_home);
   5.417 -    else if (strcmp(test_class_name, "CrashdumpTests") == 0)
   5.418 -        *test_suite = new CrashdumpTests(test_class_name, test_home);
   5.419 -    else if (strcmp(test_class_name, "StringpairListTests") == 0)
   5.420 -        *test_suite = new StringpairListTests(test_class_name, test_home);
   5.421 -    else if (strcmp(test_class_name, "EncryptForIdentityTests") == 0)
   5.422 -        *test_suite = new EncryptForIdentityTests(test_class_name, test_home);
   5.423 -    else if (strcmp(test_class_name, "KeyResetMessageTests") == 0)
   5.424 -        *test_suite = new KeyResetMessageTests(test_class_name, test_home);
   5.425 -    else if (strcmp(test_class_name, "DeleteKeyTests") == 0)
   5.426 -        *test_suite = new DeleteKeyTests(test_class_name, test_home);
   5.427 -    else if (strcmp(test_class_name, "KeyAttachmentTests") == 0)
   5.428 -        *test_suite = new KeyAttachmentTests(test_class_name, test_home);
   5.429 -    else if (strcmp(test_class_name, "OwnKeysRetrieveTests") == 0)
   5.430 -        *test_suite = new OwnKeysRetrieveTests(test_class_name, test_home);
   5.431 -    else if (strcmp(test_class_name, "TrustManipulationTests") == 0)
   5.432 -        *test_suite = new TrustManipulationTests(test_class_name, test_home);
   5.433 -    else if (strcmp(test_class_name, "SyncTests") == 0)
   5.434 -        *test_suite = new SyncTests(test_class_name, test_home);
   5.435 -    else if (strcmp(test_class_name, "AppleMailTests") == 0)
   5.436 -        *test_suite = new AppleMailTests(test_class_name, test_home);
   5.437  }
   5.438  
   5.439  void SuiteMaker::suitemaker_buildlist(const char** test_class_names, int num_to_run, const char* test_home, std::vector<Test::Suite*>& test_suites) {
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/test/src/engine_tests/LookupTests.cc	Wed May 08 11:57:13 2019 +0200
     6.3 @@ -0,0 +1,90 @@
     6.4 +// This file is under GNU General Public License 3.0
     6.5 +// see LICENSE.txt
     6.6 +
     6.7 +#include <stdlib.h>
     6.8 +#include <string>
     6.9 +#include <iostream>
    6.10 +#include <fstream>
    6.11 +#include <cstring> // for strcmp()
    6.12 +#include "TestConstants.h"
    6.13 +
    6.14 +#include "pEpEngine.h"
    6.15 +#include "message_api.h"
    6.16 +#include "keymanagement.h"
    6.17 +#include "test_util.h"
    6.18 +
    6.19 +#include <cpptest.h>
    6.20 +#include "EngineTestSessionSuite.h"
    6.21 +#include "LookupTests.h"
    6.22 +
    6.23 +using namespace std;
    6.24 +
    6.25 +LookupTests::LookupTests(string suitename, string test_home_dir) :
    6.26 +    EngineTestSessionSuite::EngineTestSessionSuite(suitename, test_home_dir) {
    6.27 +    add_test_to_suite(std::pair<std::string, void (Test::Suite::*)()>(string("LookupTests::lookup"),
    6.28 +                                                                      static_cast<Func>(&LookupTests::lookup)));
    6.29 +}
    6.30 +
    6.31 +void LookupTests::setup() {
    6.32 +    EngineTestSessionSuite::setup();
    6.33 +}
    6.34 +
    6.35 +void LookupTests::tear_down() {
    6.36 +    EngineTestSessionSuite::tear_down();
    6.37 +}
    6.38 +
    6.39 +void LookupTests::lookup() {
    6.40 +    // 1. create original identity
    6.41 +    const char* address = "hans@xn--bcher-kva.tld";
    6.42 +    const char* fpr = "00B5BB6769B1F451705445E208AD6E9400D38894";
    6.43 +    const char* userid = "Hans";
    6.44 +    const char* username = "SuperDuperHans";
    6.45 +    const string pub_key = slurp("test_keys/pub/hans@xn--bcher-kva.tld_-0x08AD6E9400D38894_pub.asc");
    6.46 +
    6.47 +    PEP_STATUS statuspub = import_key(session, pub_key.c_str(), pub_key.length(), NULL);
    6.48 +    TEST_ASSERT_MSG((statuspub == PEP_TEST_KEY_IMPORT_SUCCESS), "statuspub == PEP_STATUS_OK");
    6.49 +
    6.50 +    pEp_identity* hans = new_identity(address, NULL, userid, username);
    6.51 +
    6.52 +    PEP_STATUS status = set_identity(session, hans);
    6.53 +    TEST_ASSERT_MSG((status == PEP_STATUS_OK), tl_status_string(status));
    6.54 +    free_identity(hans);
    6.55 +
    6.56 +    // Lookup using different spellings of the email address.
    6.57 +    const char *addresses[] = {
    6.58 +        "hans@xn--bcher-kva.tld",
    6.59 +        "Hans@xn--bcher-kva.tld",
    6.60 +        "Hans@xn--Bcher-kva.tld",
    6.61 +        "hans@bücher.tld",
    6.62 +        "Hans@bücher.tld",
    6.63 +        "HANS@BÜCHER.TLD",
    6.64 +    };
    6.65 +
    6.66 +    for (int i = 0; i < sizeof(addresses) / sizeof(addresses[0]); i ++) {
    6.67 +        const char *address = addresses[i];
    6.68 +
    6.69 +        pEp_identity *hans = new_identity(address, NULL, NULL, NULL); 
    6.70 +        PEP_STATUS status = update_identity(session, hans);
    6.71 +        TEST_ASSERT_MSG((status == PEP_STATUS_OK), tl_status_string(status));
    6.72 +        TEST_ASSERT_MSG((hans->fpr), "hans->fpr");
    6.73 +        TEST_ASSERT_MSG((strcmp(hans->fpr, fpr) == 0), "strcmp(hans->fpr, fpr) == 0");
    6.74 +        TEST_ASSERT_MSG((hans->username), "hans->username");
    6.75 +        TEST_ASSERT_MSG((hans->user_id), "hans->user_id");
    6.76 +
    6.77 +        cout << "hans->username: " << hans->username << endl;
    6.78 +        cout << "username: " << username << endl;
    6.79 +
    6.80 +        cout << "hans->user_id: " << hans->user_id << endl;
    6.81 +        cout << "userid: " << userid << endl;
    6.82 +
    6.83 +        TEST_ASSERT_MSG((strcmp(hans->username, username) == 0), "strcmp(hans->username, username) == 0");
    6.84 +        TEST_ASSERT_MSG((strcmp(hans->user_id, userid) == 0), "strcmp(hans->user_id, userid) == 0");
    6.85 +
    6.86 +        TEST_ASSERT_MSG((!hans->me), "!hans->me"); 
    6.87 +        TEST_ASSERT_MSG((hans->comm_type == PEP_ct_OpenPGP_unconfirmed), "hans->comm_type == PEP_ct_OpenPGP_unconfirmed");
    6.88 +        TEST_ASSERT_MSG((strcmp(hans->address, address) == 0), "strcmp(hans->address, address) == 0");
    6.89 +
    6.90 +        cout << "PASS: update_identity() correctly retrieved extant record with matching address, id, and username" << endl << endl;
    6.91 +        free_identity(hans);
    6.92 +    }
    6.93 +}
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/test/test_keys/priv/hans@xn--bcher-kva.tld_-0x08AD6E9400D38894_priv.asc	Wed May 08 11:57:13 2019 +0200
     7.3 @@ -0,0 +1,138 @@
     7.4 +-----BEGIN PGP PRIVATE KEY BLOCK-----
     7.5 +
     7.6 +xcSYBFzR6V0BDACkJ2yRZAaR7tg6jAC87LLICjd39xnD/Ra9D3Elld5QTHZ2GXw+
     7.7 +8v1er/ZYcvS3JPZsjDvIeg5bRV24IpghWyfRvjBivLlAV9PCWSpfCqj0xnzM7HaU
     7.8 +UQbPg/Bwtf7m8A3YC16pBIbmGUHfIL6LUY7Fd4dLKu1UELuhKn/Tn6X9YuO4Isah
     7.9 +w2U4lbobzFvH7PKkBuG3+sYL7JhE/ArDTIWaSoszvPtxTg/hfSj1rZmfYrClzcB8
    7.10 +aqoilhmRdYX1DNk4c7bsg513XirqTm0lJMK23hOJithBsGoC6n6Tm3X9NC/a4hmE
    7.11 +Fly8U8Y3wW26WUUR0gPfp16c5GFhLlOuRwOdO0D+WnEOnw+Aq1IRd+LtLq4psNRv
    7.12 +D7dxI299tBuybn26fQAUXmMqF+MSOqyqKegi6IIiD1jFDAg3t0rSu77pphMm3ANS
    7.13 +uuTJ6xrhnS5YwRQ5/czJu6MFK33ycWw/6PLnaEgrNS7XjHXsgSPgjoEPB5+hAwDn
    7.14 +roW0DnRdmk2HhnsAEQEAAQAMAJdUZOkP3mKwXpRytsd0Kkjx6jrlCNK+QjUexD9T
    7.15 +DzTVmKu9SOY7WkrtStw1ddZU8/wTt5VUuGF57DExay/s+iOJAtAzjVB85xIW41Hk
    7.16 +4OdvCGReZd7LZ8zspD8z+H7rtMeDi8ujCb2ccTaC2EZVdJokXAx20X2bQ24LYPY2
    7.17 +Cm8yuB3rqVQ9btYgagbweXgwv2tpkLLsM6GQhrup4z4yEESyDewvf1nwDgHhQV5j
    7.18 +oOjnsVPY/2dzac8iswV+43SKV0hrh93JPKP1OPoIx8WvbAz1nkmUkaxKfJNrSOZT
    7.19 +57XNNJM6FXGJqJVUVnwe43sltWRoCJaAVQqbVf8bL9b+/FVInXGqYkrnbCvuzeIP
    7.20 +Dq8foWsZueu3jFO4OuxlizxWDuh4MHpcWKU2AYjs8H8kLlROcgFOXYme0GCx0GoH
    7.21 +fBcnA0U3emC5SUc9glnZT1UXuOVy0PBHZLQtosSl1VaS3zIXpWl7K5WEAt29EKHb
    7.22 +hSfrTXub2kIWZwC6lx//8PS/GQYAxxgOqSyvNTB8ZUxTsHmzkMGeL3QHiz5sObwk
    7.23 +xrYXkpUKIzgGUK8fAKNtVURgrNWCcj09WeILaUPeChpsnu+3TZZa8NNnzDMTgb/M
    7.24 +aBv8uR/SZxJBgbgNmyJjVPqjJLXi4CyYn4xIm7kiAusyVdWpeGxVnMAd7DNzNaoS
    7.25 +ESYYAlxZZ3QBSi8uGzTj7X4xi4luIlJgY8Fvp6V/FyEWvpDNfCqKszCn4JgB12pI
    7.26 +x++Hzwlxp7TNxXOhYYYBvKsqEfiVBgDTEsR28bf8xf0hr0Im+UeCvyMJ84OSCuvt
    7.27 +J9dQCef7tn0TB1iWO1Jl619YM3gaCgKN1GOMHlV9cjtJ4vIsYjY2fxhoIN9uwuKY
    7.28 +rRD5MDxct5Cx35Kg7kIZaEsGJqt5Bnm3K5DjxvoN50UYloRq+nbxT6THPTFUkBVR
    7.29 +OjzJVKThLoVWKLoQOZrTI9mk8Qv8cfc2mSni5t7bF4klRIVMoeeGqS9zDsOYqnHP
    7.30 +8leYLXRK7V1WfSt8XIFevf1oYkoR7s8F+wQnORG8JZWKYN1L4oRROg7RYUYaZMsh
    7.31 +tR0GTrQOap9Dv3nDqL306KZr12lf6IRF0CWhZtvqWe56wPQB5qvgU2hIwUk/3kG+
    7.32 +396HwoeyuzpuA/Za1CQ4Q1sHmNUiault1Jpmz5WwDQocby+EFwVaps48MaEMGCPS
    7.33 +Tjc5vV7kNdevYPNDh2ytDs61KVAxSJxzE8XIQmhTbJl1ifhbLkUzIgbBpKXPvA2C
    7.34 +aa4C97xEEb8rtbZ44usNbgXlS5pMMnThzc3hwsECBB8BCgA2Ah4DApsBBYJc0eld
    7.35 +BYkFn6YAFiEEALW7Z2mx9FFwVEXiCK1ulADTiJQJEAitbpQA04iUAhUKAACY6gwA
    7.36 +kN2XvosfWgZtQsAuHR5+amQvqvGj+yd45LVRRaNs3b/45vNfifjp84DWLl/TJiZh
    7.37 +LVxAWfaIO662ZeWFPgRQLFM0B3PXFGY8pF6Cfqt6NeXYa/yOU5KAwwcqpzPd0nA/
    7.38 +A4QH1glNC0tRQHKL/UVMYU7QILRC0GbbJNX9TqtG5zHFe3+JPxbBc465wxcJPZEO
    7.39 +6Fd5QM/nFJZrMCsWf2UpBg2dkf6M6Jv9pMSG/rVCDtYhNZt+GZu+/1sRi8ryZVAl
    7.40 +20GlOpji7B1PVyezusDs+NcDZ6u1cTpiNirXrpoH9AomukPVcPYyhV8Co5smX7pQ
    7.41 +IDR3LmwKXcE/JGN7ocH4C2FwwdcgNtJ4kz9EJ+d3v2iplocNa9Ev/0J2gtixzJ64
    7.42 +0J03zZ9XR1wgdr0Y06JDXqX7rJz8Vj9p853/2qdsCcBPylpm0RC+ymgHBHMOuRYx
    7.43 +nkFYN+1CzULKxLBHfhBuL2hRONieaeS6dYbNpM8haBgJlSINX0myWPh5fPqHRviU
    7.44 +zR1IYW5zIDxoYW5zQHhuLS1iY2hlci1rdmEudGxkPsLBAgQTAQoANgIeAwKbAQWJ
    7.45 +BZ+mAAIVCgWCXNHpXRYhBAC1u2dpsfRRcFRF4gitbpQA04iUCRAIrW6UANOIlAAA
    7.46 +FGQL/15QxKSU22xKtJfm0qPpehjRQVmykzsj6hbPYxpmFmRAN6UJi4u2w5/6VDxc
    7.47 +IuzSuIlV4JSuXiNYPPDKCvUnTEd9HE4PUjpswqXx86mcr2LNCoIcDl7FEFbMZxgg
    7.48 +5em9rZ9SgJAf6N0X421P32mNo6rAF1t8VEQcWUsuq1mq6DHBGj36Dr7y0S6wsgrb
    7.49 +mfoAPMnbCGo9zvwAaLR06yjUaRpIAu+GS4WvCrgoj4IFm2uufOypmGjRO0iL1pg0
    7.50 +MELqrWc0XgcNrbUoMLrb1KSqrKyV94jROv1Wv0lIyh5CJfnHMe2xGCvnDQS/DTAG
    7.51 +Fkcu60Qk+QqKb9WCauPAD8xqekCcWTZry0u/Wna2KoKAbqpDhTWNDzuL3dyTVce4
    7.52 +R/w+ZKnQUfVe/3ThSn7VID66HiiygNfrTPJBemjw5j8NvRGkgTJpprG8+zmZSbgr
    7.53 +krvRWLmo+YhNng+lhXZ1UH3y+8lkHrDOc0MsW71+r7naO552w/DkcJ0TQ6rHNOvh
    7.54 +jQ368MfEmARc0eleAQwA491l+GgZIIz8882KRUjhMWBguTA8EobBBpgiP/xiIE82
    7.55 +UGWlq8ORDdrmxiuoJ1nEf5pJ0JXCi3uujz8q6hZo6JS4ci447DIDaXVWSFQ3Goz5
    7.56 +7G6Gi7JfMMaH6dtShYru/np/+wNM2vxuxMhBrd5DWA0uTk33R8C/Jp2PhM9MVpiK
    7.57 +F+mt1/tJc9JCOAi+J2r9bk8nzT6gepPI+5u0eyp40ZzY6ydd5vGDD+X2dz07MLzz
    7.58 +VxKR8StdAmcoOGz8FZNMnkuy+J/M+KgvpnTNghH+4markQRCTkel+J8hBtdMDFxa
    7.59 +90wlr0PF+HaHKpCGHNTr1SSRTbxSWG2QG/Ym4srN07yHgJN5QiZc3dBG3OuIQx/S
    7.60 +zQz5d+lQs9KWKZpMj6C2mTksW5bYNGBFGqM6h9Wh3FI+Hw+naS+CN2aVhjJTHWGb
    7.61 +3DOMhkNpG7lkZeInjO6zo77ifqe+WvD9jkeGlM/QNEydo0BF1qonxEFDKgdAtL+1
    7.62 +cNs5K8B/7HeTGIN3Zq6pABEBA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Alb9du1Q7YKsj0/YzWLJGraeRBJG1Zg4ZNLTg20ZfJJzWEjUhq
   7.108 +AlwxfKmB+thRL+BYOAlHDGy1YPAof9sQ3azIRR8gkF+qflawRnw2aCvs1E+EGt52
   7.109 +BEV7CPd26ZPXY90lp38k3eQkz2e9ABEBAAEAC/0TdJ2bDvjsGEQqGbS7jni6q9+V
   7.110 +AxS0GMolC+iV1CkLaKpizz7EYQvJvKmOUfBa7A2ub8jXE97u9e5lnDZujZvx6nKl
   7.111 +IyhxCSyIbHTwSzumw+LL3LcgUO0nRL8Z7/xPumrcP6c2Lpo7F6iJrnWYEMtfK25C
   7.112 +Fpi7df1XpbMeGGhaPD1me7S8W41ab3NR0vyja0yYq4jftaajVxpPn2176SKqSCk0
   7.113 +rwCyogrWhm29FE7L5AtgHx96Ja2/Qb/IuNWYlJdu4TuHms5u9I2w27n2c8a8yFLh
   7.114 +lhNLzAd1GoKmD7VtA45rG1aT8baWWEJAFNsXRENbthCcLd2Azbkv/5xdXPKd4K+n
   7.115 +ReukZhtwUQAsNovhv0imCHSPGsZsxYa/BYyGfGl77GA9CiKaBcKCsrVtIC90Upmv
   7.116 +CgMeaGtVvtgOL6zdbG+2oqL6mvSYzNbw/9/s3z93veCNmvBhfoVtQGY2ckzV/y4y
   7.117 +2irLtgvRnbC9Qtf0GHmbkArBrDJaVOAfmxdRJsUGAPNIT8PA4/ls56RtkDDml5Gu
   7.118 +xi16akTHsa8vF4PxCDWhiZ07kVto7IupunoinD5iRF5DUYEtXlLdZwxSh3V2C6eF
   7.119 +XmG02guivt2v87X+20GNb2naH3h5/HpIks46oNu0984lQ6NKWLvh3G88VHoOWMxj
   7.120 +mCiWF6Tx9tcZrXe5mXFpw2B3WVOIaRXQTFHvKT7kVV4kWjk78gA342s0AF7iFdAL
   7.121 +j9k+mtmjTjkISrRs9t0aWImWcwdd3Q/LMZClgCJ+CwYA/QJ6x50qrpCiyrI1g3cZ
   7.122 +DnfxBLTkke7LWj9AnMLaYD4o2rUhaUV18xygq4TyuVwVCyLtpsAAMyOm8SBUV1he
   7.123 +VLsde//MhDQk7rjmLRERTAqLTJPFql+FVJCShr4IGD2/eV4zB3NFJ72HM7Vh7NxK
   7.124 +Ft8L+KBEiGrD0cl3UHovhlWnkpb1MaXW6WHhZGCicrRiErthwJv+wCcofqG4wexD
   7.125 +Kvxxvo5t76Adwt42wVwBfrsAu4kI8W0t62ZmRLzu6PZXBf9FQxf4+OyNnxkSBdOl
   7.126 +5gwfshm2ds3k9oHRRYQULD+XtmK/D4w4IgeSbI7w2Zp+N9PQ3siRvwODWn+RfP4v
   7.127 +hZs+Cki4OhDsjD7d7UoSCmKKXmfBYx2QE8BIWEyUs3KyNRSMDs19vV3tmLqJ+kyi
   7.128 +dYQv9p979UV7NyAF8PIakEiXUM7JWQNT6lmd39CltHtRG0I0J9VbNZXOKisqXDax
   7.129 +U+al6mBfcNLCkVBqlEtHG/cIJctQx7fvLV3G/MmWdDn6xHrgw8LBAgQYAQoANgIe
   7.130 +AwKbDAWJBZ+mAAILCQWCXNHpXhYhBAC1u2dpsfRRcFRF4gitbpQA04iUCRAIrW6U
   7.131 +ANOIlAAAAjsL/AwrdiMqx6pImsSYZi6+pWCwn25Lir/vdT2INly2kx3KNym32IBf
   7.132 +s6QIeCYpPhReHSJUu99gfB3UiMZelYzARcSn1b+9qR3nW02zmd5NfDI/RX9oiZsY
   7.133 +Yw62x/mAvoKdjTus4gq30EJVKB98bZBftCl8PPSm//485WDN5zqbd1/KH+9HDCHZ
   7.134 +W2Yu80SOhGUc6F2pkSRkQh0YoOFFjYJklMb057BPQx3uN7hZz/Bk2lBGQzg0YHBp
   7.135 +a+/UIKSW/Y87PvJrjK5wG2wP0rxNfZS+Ph6+dYT+E7NLxnlqPN8hsYxpg2wOQ372
   7.136 +DCQcYhcyh2bsyFFjtQQb7tYGuM0R1myBa+j5ZEiPgfbhzmgd18Z5iOhTWnk/iO+A
   7.137 +knt5dIVvqyRQrvnfmVN5xgmGAGT3NwMGBLTyehe2nATAsq1hscxNXSE/x+SbbNSt
   7.138 +MT67Qq/lEyVrXxb1Xq6kTfN09f91oDdVU/9AJxiSzE56a5vfMqJHXMK5By2UI4kO
   7.139 +X3Q7oXjkZBenzg==
   7.140 +=ox8H
   7.141 +-----END PGP PRIVATE KEY BLOCK-----
     8.1 Binary file test/test_keys/pub/hans@xn--bcher-kva.tld_-0x08AD6E9400D38894_pub.asc has changed