(proto): use select_mech

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12815 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2003-09-10 09:32:42 +00:00
parent 192371fcb2
commit 2d4baf01e7

View File

@@ -111,14 +111,7 @@ proto (int sock, const char *hostname, const char *service)
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);
mech_oid = select_mech(mech);
name_token.length = asprintf ((char **)&name_token.value,
"%s@%s", service, hostname);