allow user to select mech; krb5, spnego, and no-oid

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12798 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2003-09-09 03:41:37 +00:00
parent 85ebaac05f
commit 2d9a9adcf4

View File

@@ -109,6 +109,16 @@ proto (int sock, const char *hostname, const char *service)
struct gss_channel_bindings_struct input_chan_bindings;
u_char init_buf[4];
u_char acct_buf[4];
gss_OID mech_oid;
if (strcasecmp(mech, "krb5") == 0)
mech_oid = GSS_KRB5_MECHANISM;
else if (strcasecmp(mech, "spnego") == 0)
mech_oid = GSS_SPNEGO_MECHANISM;
else if (strcasecmp(mech, "no-oid") == 0)
mech_oid = GSS_C_NO_OID;
else
errx (1, "Unknown mechanism '%s'", mech);
name_token.length = asprintf ((char **)&name_token.value,
"%s@%s", service, hostname);
@@ -166,7 +176,7 @@ proto (int sock, const char *hostname, const char *service)
GSS_C_NO_CREDENTIAL,
&context_hdl,
server,
GSS_C_NO_OID,
mech_oid,
GSS_C_MUTUAL_FLAG | GSS_C_SEQUENCE_FLAG
| GSS_C_DELEG_FLAG,
0,