From 22d6047702f23d2a188c4ab9dc42549f48e48049 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Fri, 14 Oct 2011 14:40:17 +0000 Subject: [PATCH] Add "-dce" commandline option to gss-client.c to set GSS_C_DCE_STYLE flag Signed-off-by: Kevin Wasserman git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25333 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/gss-sample/README | 4 +++- src/appl/gss-sample/gss-client.c | 2 ++ src/appl/gss-sample/t_gss_sample.py | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/appl/gss-sample/README b/src/appl/gss-sample/README index dc51fca1b..c207aba89 100644 --- a/src/appl/gss-sample/README +++ b/src/appl/gss-sample/README @@ -84,7 +84,7 @@ is used). The command-line options have the following meanings: The client's command line usage is gss-client [-port port] [-mech mechanism] [-d] [-f] [-q] - [-seq] [-noreplay] [-nomutual] + [-seq] [-noreplay] [-nomutual] [-dce] [-ccount count] [-mcount count] [-na] [-nw] [-nx] [-nm] host service_name msg @@ -112,6 +112,8 @@ the following meanings: -noreplay Tells the client to disable the use of replay detection. +-dce Tells the client to request DCE-style authentication. + -nomutual Tells the client to disable the use of mutual authentication. -f Tells the client that the "msg" argument is actually the name diff --git a/src/appl/gss-sample/gss-client.c b/src/appl/gss-sample/gss-client.c index 1cb797dac..6070d428c 100644 --- a/src/appl/gss-sample/gss-client.c +++ b/src/appl/gss-sample/gss-client.c @@ -825,6 +825,8 @@ main(argc, argv) usage(); max_threads = atoi(*argv); #endif + } else if (strcmp(*argv, "-dce") == 0) { + gss_flags |= GSS_C_DCE_STYLE; } else if (strcmp(*argv, "-d") == 0) { gss_flags |= GSS_C_DELEG_FLAG; } else if (strcmp(*argv, "-seq") == 0) { diff --git a/src/appl/gss-sample/t_gss_sample.py b/src/appl/gss-sample/t_gss_sample.py index 09d0803ce..cfac43d85 100644 --- a/src/appl/gss-sample/t_gss_sample.py +++ b/src/appl/gss-sample/t_gss_sample.py @@ -72,9 +72,13 @@ for realm in multipass_realms(): tgs_test(realm, ['-krb5']) tgs_test(realm, ['-spnego']) tgs_test(realm, ['-iakerb']) + # test default (i.e., krb5) mechanism with GSS_C_DCE_STYLE + tgs_test(realm, ['-dce']) as_test(realm, ['-krb5']) as_test(realm, ['-spnego']) as_test(realm, ['-iakerb']) + # test default (i.e., krb5) mechanism with GSS_C_DCE_STYLE + as_test(realm, ['-dce']) success('GSS sample application') -- 2.26.2