add flags to test WrapExt

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24780 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2009-02-22 23:25:47 +00:00
parent 4e31a0c423
commit 3e82b4199c

View File

@@ -513,7 +513,7 @@ test_wrap_ext(struct client *c1, int32_t hc1, struct client *c2, int32_t hc2,
static int32_t
test_token(struct client *c1, int32_t hc1, struct client *c2, int32_t hc2)
test_token(struct client *c1, int32_t hc1, struct client *c2, int32_t hc2, int wrap_ext)
{
int32_t val;
int i;
@@ -534,6 +534,7 @@ test_token(struct client *c1, int32_t hc1, struct client *c2, int32_t hc2)
val = test_wrap(c2, hc2, c1, hc1, 1);
if (val) return val;
if (wrap_ext) {
/* wrap ext */
val = test_wrap_ext(c1, hc1, c2, hc2, 1, 0);
if (val) return val;
@@ -554,7 +555,7 @@ test_token(struct client *c1, int32_t hc1, struct client *c2, int32_t hc2)
if (val) return val;
val = test_wrap_ext(c2, hc2, c1, hc1, 0, 1);
if (val) return val;
}
}
return GSMERR_OK;
}
@@ -715,6 +716,7 @@ get_client(const char *slave)
static int version_flag;
static int help_flag;
static int wrap_ext = 0;
static char *logfile_str;
static getarg_strings principals;
static getarg_strings slaves;
@@ -726,6 +728,8 @@ struct getargs args[] = {
NULL },
{ "log-file", 0, arg_string, &logfile_str, "Logfile",
NULL },
{ "wrap-ext", 0, arg_flag, &wrap_ext, "test wrap extended",
NULL },
{ "version", 0, arg_flag, &version_flag, "Print version",
NULL },
{ "help", 0, arg_flag, &help_flag, NULL,
@@ -847,7 +851,7 @@ main(int argc, char **argv)
GSS_C_DELEG_FLAG|GSS_C_MUTUAL_FLAG,
hCred, &clientC, &serverC, &delegCred);
if (val == GSMERR_OK) {
test_token(c, clientC, c, serverC);
test_token(c, clientC, c, serverC, wrap_ext);
toast_resource(c, clientC);
toast_resource(c, serverC);
if (delegCred)
@@ -863,7 +867,7 @@ main(int argc, char **argv)
GSS_C_INTEG_FLAG|GSS_C_CONF_FLAG,
hCred, &clientC, &serverC, &delegCred);
if (val == GSMERR_OK) {
test_token(c, clientC, c, serverC);
test_token(c, clientC, c, serverC, wrap_ext);
toast_resource(c, clientC);
toast_resource(c, serverC);
if (delegCred)
@@ -918,7 +922,7 @@ main(int argc, char **argv)
break;
}
val = test_token(client, clientC, server, serverC);
val = test_token(client, clientC, server, serverC, wrap_ext);
if (val)
break;