Commit 4905c892 authored by Pekka Pessi's avatar Pekka Pessi

test_register.c, test_proxy.c: use realm "test-proxy" during normal tests

darcs-hash:20071116172955-65a35-f3ec90056e6aa79e6b26de05453105add4d13262.gz
parent 69ca354e
......@@ -1126,6 +1126,8 @@ int process_register(struct proxy_tr *t)
if (t->domain->auth) {
t->am = t->domain->auth, t->use_auth = 401;
if (t->domain->prefs.authorize)
t->realm = t->domain->prefs.authorize;
if (challenge_transaction(t))
return t->status;
}
......
......@@ -426,7 +426,7 @@ int test_register_c(struct context *ctx)
printf("TEST NUA-2.3.3: REGISTER c\n");
test_proxy_domain_set_expiration(ctx->c.domain, 600, 3600, 36000);
test_proxy_domain_set_authorize(ctx->c.domain, "test-proxy");
test_proxy_domain_set_authorize(ctx->c.domain, "test-proxy-0");
TEST_1(c_reg->nh = nua_handle(c->nua, c_reg, TAG_END()));
......@@ -453,7 +453,7 @@ int test_register_c(struct context *ctx)
free_events_in_list(ctx, c->events);
AUTHENTICATE(c, c_reg, c_reg->nh,
NUTAG_AUTH("Digest:\"test-proxy\":charlie:secret"), TAG_END());
NUTAG_AUTH("Digest:\"test-proxy-0\":charlie:secret"), TAG_END());
run_abc_until(ctx, -1, save_events, -1, save_events,
-1, save_until_final_response);
......@@ -780,10 +780,10 @@ int test_connectivity(struct context *ctx)
/* Sneakily change the realm */
TEST(test_proxy_domain_set_authorize(ctx->c.domain, "test-proxy-2"), 0);
TEST(test_proxy_domain_set_authorize(ctx->c.domain, "test-proxy"), 0);
AUTHENTICATE(c, c_call, c_call->nh,
NUTAG_AUTH("Digest:\"test-proxy\":charlie:secret"),
NUTAG_AUTH("Digest:\"test-proxy-0\":charlie:secret"),
TAG_END());
run_abc_until(ctx, -1, NULL, -1, NULL, -1, save_until_final_response);
......@@ -796,7 +796,7 @@ int test_connectivity(struct context *ctx)
free_events_in_list(ctx, c->events);
AUTHENTICATE(c, c_call, c_call->nh,
NUTAG_AUTH("Digest:\"test-proxy-2\":charlie:secret"),
NUTAG_AUTH("Digest:\"test-proxy\":charlie:secret"),
TAG_END());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment