diff options
author | Ruslan N. Marchenko <me@ruff.mobi> | 2020-09-26 16:58:19 +0200 |
---|---|---|
committer | Ruslan N. Marchenko <me@ruff.mobi> | 2020-11-15 09:10:37 +0100 |
commit | 6661926cc3a7a897360998034c78985915543885 (patch) | |
tree | c19610bec60abcfe1c22ccb04db27c82fb787fd4 | |
parent | 00079ed4be25dbeed03801e174df3e078bdd706a (diff) | |
download | wocky-6661926cc3a7a897360998034c78985915543885.tar.gz |
Mitigate aggressive GnuTLS backend resumption in glib-networking
Before glib-networking 2.64 (commit ab80ee34) GnuTLS backend uses quite
aggressive resumption thus causing many tests to fail due to resuming
previous successful TLS connection. Since session_id used for resumption
includes target port, this patch disperses ports for TLS tests to ensure
each test starts from scratch and does not reuses previous connection.
-rw-r--r-- | tests/wocky-connector-test.c | 207 |
1 files changed, 105 insertions, 102 deletions
diff --git a/tests/wocky-connector-test.c b/tests/wocky-connector-test.c index 5e77438..ab5e0f6 100644 --- a/tests/wocky-connector-test.c +++ b/tests/wocky-connector-test.c @@ -1325,8 +1325,8 @@ test_t tests[] = { SERVER_PROBLEM_NO_PROBLEM, { OK, OK, OK, SERVER_DEATH_SERVER_START, OK } }, { "moose", "something" }, - PORT_XMPP }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 10 }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, NOTLS }, { NULL, 0 } } }, @@ -1338,8 +1338,8 @@ test_t tests[] = { SERVER_PROBLEM_NO_PROBLEM, { OK, OK, OK, SERVER_DEATH_CLIENT_OPEN, OK } }, { "moose", "something" }, - PORT_XMPP }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 10 }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, NOTLS }, { NULL, 0 } } }, @@ -1351,8 +1351,8 @@ test_t tests[] = { SERVER_PROBLEM_NO_PROBLEM, { OK, OK, OK, SERVER_DEATH_SERVER_OPEN, OK } }, { "moose", "something" }, - PORT_XMPP }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 10 }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, NOTLS }, { NULL, 0 } } }, @@ -1364,8 +1364,8 @@ test_t tests[] = { SERVER_PROBLEM_NO_PROBLEM, { OK, OK, OK, SERVER_DEATH_FEATURES, OK } }, { "moose", "something" }, - PORT_XMPP }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 10 }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, NOTLS }, { NULL, 0 } } }, @@ -1377,8 +1377,8 @@ test_t tests[] = { SERVER_PROBLEM_NO_PROBLEM, { OK, OK, OK, SERVER_DEATH_TLS_NEG, OK } }, { "moose", "something" }, - PORT_XMPP }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 10 }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, NOTLS }, { NULL, 0 } } }, @@ -2702,11 +2702,11 @@ test_t tests[] = { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, SERVER_DEATH_TLS_NEG, OK } }, { "moose", "something" }, - PORT_XMPP }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 9}, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, NOTLS }, - { NULL, 0, XMPP_V1, OLD_SSL } } }, + { NULL, PORT_XMPP + 9, XMPP_V1, OLD_SSL } } }, /* ********************************************************************* */ /* certificate verification tests */ @@ -2716,8 +2716,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 10 }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1 } } }, @@ -2728,8 +2728,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 11 }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, STARTTLS, CERT_CHECK_STRICT, TLS_CA_DIR } } }, @@ -2740,7 +2740,7 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP }, + PORT_XMPP + 12 }, { NULL, 0, "thud.org", REACHABLE, NULL }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, @@ -2752,8 +2752,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP }, - { "tomato-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 13 }, + { "tomato-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@tomato-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1 } } }, @@ -2764,7 +2764,7 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP }, + PORT_XMPP + 14 }, { NULL, 0, "tomato-juice.org", REACHABLE, NULL }, { PLAINTEXT_OK, { "moose@tomato-juice.org", "something", PLAIN, TLS }, @@ -2776,8 +2776,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP, CERT_EXPIRED }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 15, CERT_EXPIRED }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1 } } }, @@ -2788,8 +2788,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP, CERT_NOT_YET }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 16, CERT_NOT_YET }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1 } } }, @@ -2800,8 +2800,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP, CERT_SELFSIGN }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 17, CERT_SELFSIGN }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1 } } }, @@ -2812,8 +2812,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP, CERT_UNKNOWN }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 18, CERT_UNKNOWN }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1 } } }, @@ -2830,8 +2830,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP, CERT_UNKNOWN }, - { "tomato-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 19, CERT_UNKNOWN }, + { "tomato-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@tomato-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1 } } }, @@ -2842,8 +2842,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP, CERT_WILDCARD }, - { "foo.weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 20, CERT_WILDCARD }, + { "foo.weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { TLS_REQUIRED, { "moose@foo.weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, STARTTLS, CERT_CHECK_STRICT, TLS_CA_DIR } } }, @@ -2854,8 +2854,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP, CERT_WILDCARD }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 21, CERT_WILDCARD }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, STARTTLS, CERT_CHECK_STRICT, TLS_CA_DIR } } }, @@ -2866,8 +2866,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP, CERT_WILDCARD }, - { "foo.diesel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 22, CERT_WILDCARD }, + { "foo.diesel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { TLS_REQUIRED, { "moose@foo.diesel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, STARTTLS, CERT_CHECK_STRICT, TLS_CA_DIR } } }, @@ -2878,8 +2878,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP, CERT_BADWILD }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 23, CERT_BADWILD }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { TLS_REQUIRED, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, STARTTLS, CERT_CHECK_STRICT, TLS_CA_DIR } } }, @@ -2891,8 +2891,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP, CERT_REVOKED }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 24, CERT_REVOKED }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { TLS_REQUIRED, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, STARTTLS, CERT_CHECK_STRICT, TLS_CA_DIR } } }, @@ -2903,8 +2903,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP, CERT_REVOKED }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 25, CERT_REVOKED }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { TLS_REQUIRED, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, STARTTLS, CERT_CHECK_LENIENT, TLS_CA_DIR } } }, @@ -2918,8 +2918,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 26 }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL } } }, @@ -2930,11 +2930,11 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP }, + PORT_XMPP + 27 }, { NULL, 0, "weasel-juice.org", REACHABLE, NULL }, { PLAINTEXT_OK, { "moose@thud.org", "something", PLAIN, TLS }, - { "weasel-juice.org", PORT_XMPP, XMPP_V1, OLD_SSL } } }, + { "weasel-juice.org", 0, XMPP_V1, OLD_SSL } } }, { "/connector/cert-verification/ssl/nohost/fail/name-mismatch", QUIET, @@ -2942,8 +2942,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP }, - { "tomato-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 28 }, + { "tomato-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@tomato-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL } } }, @@ -2954,7 +2954,7 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP }, + PORT_XMPP + 29 }, { NULL, 0, "tomato-juice.org", REACHABLE, NULL }, { PLAINTEXT_OK, { "moose@tomato-juice.org", "something", PLAIN, TLS }, @@ -2966,8 +2966,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP, CERT_EXPIRED }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 30, CERT_EXPIRED }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL } } }, @@ -2978,8 +2978,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP, CERT_INSECURE }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 31, CERT_INSECURE }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL } } }, @@ -2990,8 +2990,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP, CERT_NOT_YET }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 32, CERT_NOT_YET }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL } } }, @@ -3002,8 +3002,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP, CERT_SELFSIGN }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 33, CERT_SELFSIGN }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL } } }, @@ -3014,8 +3014,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP, CERT_UNKNOWN }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 34, CERT_UNKNOWN }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL } } }, @@ -3026,8 +3026,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP, CERT_WILDCARD }, - { "foo.weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 35, CERT_WILDCARD }, + { "foo.weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { TLS_REQUIRED, { "moose@foo.weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL, CERT_CHECK_STRICT, TLS_CA_DIR } } }, @@ -3038,8 +3038,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP, CERT_WILDCARD }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 36, CERT_WILDCARD }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL, CERT_CHECK_STRICT, TLS_CA_DIR } } }, @@ -3050,8 +3050,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP, CERT_WILDCARD }, - { "foo.diesel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 37, CERT_WILDCARD }, + { "foo.diesel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { TLS_REQUIRED, { "moose@foo.diesel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL, CERT_CHECK_STRICT, TLS_CA_DIR } } }, @@ -3062,8 +3062,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP, CERT_BADWILD }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 38, CERT_BADWILD }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { TLS_REQUIRED, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL, CERT_CHECK_STRICT, TLS_CA_DIR } } }, @@ -3075,8 +3075,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP, CERT_REVOKED }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 39, CERT_REVOKED }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { TLS_REQUIRED, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL, CERT_CHECK_STRICT, TLS_CA_DIR } } }, @@ -3087,8 +3087,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP, CERT_REVOKED }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 40, CERT_REVOKED }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { TLS_REQUIRED, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL, CERT_CHECK_LENIENT, TLS_CA_DIR } } }, @@ -3102,8 +3102,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 41 }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1 } } }, @@ -3114,7 +3114,7 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP }, + PORT_XMPP + 42 }, { NULL, 0, "thud.org", REACHABLE, NULL }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, @@ -3126,8 +3126,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP }, - { "tomato-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 43 }, + { "tomato-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@tomato-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, STARTTLS, CERT_CHECK_LENIENT } } }, @@ -3138,7 +3138,7 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP }, + PORT_XMPP + 44 }, { NULL, 0, "tomato-juice.org", REACHABLE, NULL }, { PLAINTEXT_OK, { "moose@tomato-juice.org", "something", PLAIN, TLS }, @@ -3150,8 +3150,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP, CERT_EXPIRED }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 45, CERT_EXPIRED }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, STARTTLS, CERT_CHECK_LENIENT } } }, @@ -3162,8 +3162,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP, CERT_NOT_YET }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 46, CERT_NOT_YET }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, STARTTLS, CERT_CHECK_LENIENT } } }, @@ -3174,8 +3174,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP, CERT_SELFSIGN }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 47, CERT_SELFSIGN }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, STARTTLS, CERT_CHECK_LENIENT } } }, @@ -3186,8 +3186,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK }, { "moose", "something" }, - PORT_XMPP, CERT_UNKNOWN }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 48, CERT_UNKNOWN }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, STARTTLS, CERT_CHECK_LENIENT } } }, @@ -3200,8 +3200,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 49 }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL, CERT_CHECK_LENIENT } } }, @@ -3212,11 +3212,11 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP }, + PORT_XMPP + 50 }, { NULL, 0, "weasel-juice.org", REACHABLE, NULL }, { PLAINTEXT_OK, { "moose@thud.org", "something", PLAIN, TLS }, - { "weasel-juice.org", PORT_XMPP, XMPP_V1, OLD_SSL, CERT_CHECK_LENIENT } } }, + { "weasel-juice.org", 0, XMPP_V1, OLD_SSL, CERT_CHECK_LENIENT } } }, { "/connector/cert-nonverification/ssl/nohost/ok/name-mismatch", QUIET, @@ -3224,8 +3224,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP }, - { "tomato-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 51 }, + { "tomato-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@tomato-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL, CERT_CHECK_LENIENT } } }, @@ -3236,7 +3236,7 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP }, + PORT_XMPP + 52 }, { NULL, 0, "tomato-juice.org", REACHABLE, NULL }, { PLAINTEXT_OK, { "moose@tomato-juice.org", "something", PLAIN, TLS }, @@ -3248,8 +3248,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP, CERT_EXPIRED }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 53, CERT_EXPIRED }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL, CERT_CHECK_LENIENT } } }, @@ -3260,8 +3260,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP, CERT_NOT_YET }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 54, CERT_NOT_YET }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL, CERT_CHECK_LENIENT } } }, @@ -3272,8 +3272,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP, CERT_SELFSIGN }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 55, CERT_SELFSIGN }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL, CERT_CHECK_LENIENT } } }, @@ -3284,8 +3284,8 @@ test_t tests[] = { { TLS, NULL }, { SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } }, { "moose", "something" }, - PORT_XMPP, CERT_UNKNOWN }, - { "weasel-juice.org", PORT_XMPP, "thud.org", REACHABLE, UNREACHABLE }, + PORT_XMPP + 56, CERT_UNKNOWN }, + { "weasel-juice.org", 0, "thud.org", REACHABLE, UNREACHABLE }, { PLAINTEXT_OK, { "moose@weasel-juice.org", "something", PLAIN, TLS }, { NULL, 0, XMPP_V1, OLD_SSL, CERT_CHECK_LENIENT } } }, @@ -3301,7 +3301,7 @@ static void setup_dummy_dns_entries (const test_t *test) { TestResolver *tr = TEST_RESOLVER (kludged); - guint port = test->dns.port ? test->dns.port : PORT_XMPP; + guint port = test->dns.port ? test->dns.port : test->server_parameters.port; const char *domain = test->dns.srv; const char *host = test->dns.host; const char *addr = test->dns.addr; @@ -3609,6 +3609,9 @@ run_test (gpointer data) ca = test->client.options.ca ? test->client.options.ca : TLS_CA_CRT_FILE; + if (test->client.options.host && test->client.options.port == 0) + test->client.options.port = test->server_parameters.port; + /* insecure tls cert/etc not yet implemented */ handler = wocky_tls_handler_new (test->client.options.lax_ssl); |