summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuslan N. Marchenko <me@ruff.mobi>2020-05-01 08:37:43 +0200
committerRuslan N. Marchenko <me@ruff.mobi>2020-05-09 15:51:26 +0200
commitfa256a3ab3e777aab3bb1c866aacf31541416e9a (patch)
tree666e5f0bd6331993b5d584c518d17a524cea5ce6
parented43447fbbf16d089dd49a857b7997d52fe034a6 (diff)
Uplift sasl tests
-rw-r--r--tests/wocky-connector-test.c68
-rw-r--r--tests/wocky-test-sasl-auth-server.c1
2 files changed, 35 insertions, 34 deletions
diff --git a/tests/wocky-connector-test.c b/tests/wocky-connector-test.c
index a1b2b12..fae3922 100644
--- a/tests/wocky-connector-test.c
+++ b/tests/wocky-connector-test.c
@@ -584,7 +584,7 @@ test_t tests[] =
{ "/connector/auth/secure/no-tlsplain/notls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { NOTLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK },
{ "moose", "something" },
@@ -608,7 +608,7 @@ test_t tests[] =
{ "/connector/auth/insecure/no-tlsplain/notls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { NOTLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK },
{ "moose", "something" },
@@ -770,7 +770,7 @@ test_t tests[] =
* these should all be digest auth successes */
{ "/connector/auth/secure/no-tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK },
{ "moose", "something" },
@@ -782,7 +782,7 @@ test_t tests[] =
{ "/connector/auth/secure/tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK },
{ "moose", "something" },
@@ -794,7 +794,7 @@ test_t tests[] =
{ "/connector/auth/insecure/no-tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK },
{ "moose", "something" },
@@ -806,7 +806,7 @@ test_t tests[] =
{ "/connector/auth/insecure/tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK },
{ "moose", "something" },
@@ -818,7 +818,7 @@ test_t tests[] =
{ "/connector/tls+auth/secure/no-tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK },
{ "moose", "something" },
@@ -830,7 +830,7 @@ test_t tests[] =
{ "/connector/tls+auth/secure/tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK },
{ "moose", "something" },
@@ -842,7 +842,7 @@ test_t tests[] =
{ "/connector/tls+auth/insecure/no-tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK },
{ "moose", "something" },
@@ -854,7 +854,7 @@ test_t tests[] =
{ "/connector/tls+auth/insecure/tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK },
{ "moose", "something" },
@@ -985,7 +985,7 @@ test_t tests[] =
/* we actually tolerate > 1.0 versions */
{ "/connector/problem/xmpp/version/1.x",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL, "1.1" },
{ SERVER_PROBLEM_NO_PROBLEM, CONNECTOR_OK },
{ "moose", "something" },
@@ -1162,7 +1162,7 @@ test_t tests[] =
{ "/connector/problem/xmpp/bind/no-jid",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM,
{ OK, BIND_PROBLEM_NO_JID, OK, OK, OK } },
@@ -1175,7 +1175,7 @@ test_t tests[] =
{ "/connector/problem/xmpp/session/none",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM,
{ XMPP_PROBLEM_NO_SESSION, OK, OK, OK, OK } },
@@ -1323,7 +1323,7 @@ test_t tests[] =
/* quirks */
{ "/connector/google/domain-discovery/require",
QUIET,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_REQUIRE_GOOGLE_JDD, CONNECTOR_OK },
{ "moose", "something" },
@@ -1422,7 +1422,7 @@ test_t tests[] =
{ "/connector/xep77/register/email-arg-ok",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM,
{ OK, OK, OK, OK, OK, XEP77_PROBLEM_EMAIL_ARG } },
@@ -1499,7 +1499,7 @@ test_t tests[] =
{ "/connector/xep77/register/already/get",
NOISY,
- { S_NO_ERROR, 0 , 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0 , 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM,
{ OK, OK, OK, OK, OK, XEP77_PROBLEM_QUERY_ALREADY } },
@@ -1513,7 +1513,7 @@ test_t tests[] =
{ "/connector/xep77/register/already/set",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM,
{ OK, OK, OK, OK, OK, XEP77_PROBLEM_ALREADY } },
@@ -1772,7 +1772,7 @@ test_t tests[] =
{ "/connector/jabber/no-ssl/auth/old+sasl",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM,
{ XMPP_PROBLEM_OLD_AUTH_FEATURE, OK, OK, OK, OK } },
@@ -1964,7 +1964,7 @@ test_t tests[] =
{ "/connector/jabber/ssl/auth/old+sasl",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM,
{ XMPP_PROBLEM_OLD_AUTH_FEATURE|XMPP_PROBLEM_OLD_SSL,
@@ -2006,7 +2006,7 @@ test_t tests[] =
{ "/connector+ssl/auth/secure/no-tlsplain/notls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { NOTLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } },
{ "moose", "something" },
@@ -2030,7 +2030,7 @@ test_t tests[] =
{ "/connector+ssl/auth/insecure/no-tlsplain/notls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { NOTLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } },
{ "moose", "something" },
@@ -2150,7 +2150,7 @@ test_t tests[] =
* these should all be digest auth successes */
{ "/connector+ssl/auth/secure/no-tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } },
{ "moose", "something" },
@@ -2162,7 +2162,7 @@ test_t tests[] =
{ "/connector+ssl/auth/secure/tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } },
{ "moose", "something" },
@@ -2174,7 +2174,7 @@ test_t tests[] =
{ "/connector+ssl/auth/insecure/no-tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } },
{ "moose", "something" },
@@ -2186,7 +2186,7 @@ test_t tests[] =
{ "/connector+ssl/auth/insecure/tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } },
{ "moose", "something" },
@@ -2198,7 +2198,7 @@ test_t tests[] =
{ "/connector+ssl/tls+auth/secure/no-tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } },
{ "moose", "something" },
@@ -2210,7 +2210,7 @@ test_t tests[] =
{ "/connector+ssl/tls+auth/secure/tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } },
{ "moose", "something" },
@@ -2222,7 +2222,7 @@ test_t tests[] =
{ "/connector+ssl/tls+auth/insecure/no-tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } },
{ "moose", "something" },
@@ -2234,7 +2234,7 @@ test_t tests[] =
{ "/connector+ssl/tls+auth/insecure/tlsplain/tls/digest",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } },
{ "moose", "something" },
@@ -2325,7 +2325,7 @@ test_t tests[] =
/* we actually tolerate > 1.0 versions */
{ "/connector+ssl/problem/xmpp/version/1.x",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL, "1.1" },
{ SERVER_PROBLEM_NO_PROBLEM, { XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } },
{ "moose", "something" },
@@ -2487,7 +2487,7 @@ test_t tests[] =
{ "/connector+ssl/problem/xmpp/bind/no-jid",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM,
{ XMPP_PROBLEM_OLD_SSL, BIND_PROBLEM_NO_JID, OK, OK, OK } },
@@ -2500,7 +2500,7 @@ test_t tests[] =
{ "/connector+ssl/problem/xmpp/session/none",
NOISY,
- { S_NO_ERROR, 0, 0, "DIGEST-MD5" },
+ { S_NO_ERROR, 0, 0, "SCRAM-SHA-1" },
{ { TLS, NULL },
{ SERVER_PROBLEM_NO_PROBLEM,
{ XMPP_PROBLEM_NO_SESSION|XMPP_PROBLEM_OLD_SSL, OK, OK, OK, OK } },
@@ -3740,10 +3740,10 @@ main (int argc,
#else
- g_message ("libsasl2 not found: skipping MD5 SASL tests");
+ g_message ("libsasl2 not found: skipping SCRAM SASL tests");
for (i = 0; tests[i].desc != NULL; i++)
{
- if (!wocky_strdiff (tests[i].result.mech, "DIGEST-MD5"))
+ if (!wocky_strdiff (tests[i].result.mech, "SCRAM-SHA-1"))
continue;
g_test_add_data_func (tests[i].desc, &tests[i], (test_func)run_test);
}
diff --git a/tests/wocky-test-sasl-auth-server.c b/tests/wocky-test-sasl-auth-server.c
index 6be3e38..375cc94 100644
--- a/tests/wocky-test-sasl-auth-server.c
+++ b/tests/wocky-test-sasl-auth-server.c
@@ -947,6 +947,7 @@ test_sasl_server_auth_getopt (void *context, const char *plugin_name,
} options[] = {
{ "auxprop_plugin", "sasldb"},
{ "sasldb_path", "./sasl-test.db"},
+ { "scram_secret_generate", "1"},
{ NULL, NULL },
};