rcolebaugh / rpms / openssh

Forked from rpms/openssh 2 years ago
Clone

Blame SOURCES/openssh-7.4p1-gssKexAlgorithms.patch

1d31ef
diff -up openssh-7.4p1/gss-genr.c.gsskexalg openssh-7.4p1/gss-genr.c
1d31ef
--- openssh-7.4p1/gss-genr.c.gsskexalg	2017-02-09 10:46:50.417893132 +0100
1d31ef
+++ openssh-7.4p1/gss-genr.c	2017-02-09 10:46:50.448893107 +0100
1d31ef
@@ -77,7 +77,8 @@ ssh_gssapi_oid_table_ok() {
674526
  */
674526
 
674526
 char *
674526
-ssh_gssapi_client_mechanisms(const char *host, const char *client) {
674526
+ssh_gssapi_client_mechanisms(const char *host, const char *client,
674526
+    const char *kex) {
674526
 	gss_OID_set gss_supported;
674526
 	OM_uint32 min_status;
674526
 
1d31ef
@@ -85,12 +86,12 @@ ssh_gssapi_client_mechanisms(const char
674526
 		return NULL;
674526
 
674526
 	return(ssh_gssapi_kex_mechs(gss_supported, ssh_gssapi_check_mechanism,
674526
-	    host, client));
674526
+	    host, client, kex));
674526
 }
674526
 
674526
 char *
674526
 ssh_gssapi_kex_mechs(gss_OID_set gss_supported, ssh_gssapi_check_fn *check,
674526
-    const char *host, const char *client) {
674526
+    const char *host, const char *client, const char *kex) {
674526
 	Buffer buf;
674526
 	size_t i;
674526
 	int oidpos, enclen;
1d31ef
@@ -99,6 +100,7 @@ ssh_gssapi_kex_mechs(gss_OID_set gss_sup
674526
 	char deroid[2];
674526
 	const EVP_MD *evp_md = EVP_md5();
674526
 	EVP_MD_CTX md;
674526
+	char *s, *cp, *p;
674526
 
674526
 	if (gss_enc2oid != NULL) {
674526
 		for (i = 0; gss_enc2oid[i].encoded != NULL; i++)
1d31ef
@@ -112,6 +114,7 @@ ssh_gssapi_kex_mechs(gss_OID_set gss_sup
674526
 	buffer_init(&buf;;
674526
 
674526
 	oidpos = 0;
1d31ef
+	s = cp = strdup(kex);
674526
 	for (i = 0; i < gss_supported->count; i++) {
674526
 		if (gss_supported->elements[i].length < 128 &&
674526
 		    (*check)(NULL, &(gss_supported->elements[i]), host, client)) {
1d31ef
@@ -130,26 +133,22 @@ ssh_gssapi_kex_mechs(gss_OID_set gss_sup
674526
 			enclen = __b64_ntop(digest, EVP_MD_size(evp_md),
674526
 			    encoded, EVP_MD_size(evp_md) * 2);
674526
 
674526
-			if (oidpos != 0)
674526
-				buffer_put_char(&buf, ',');
674526
-
674526
-			buffer_append(&buf, KEX_GSS_GEX_SHA1_ID,
674526
-			    sizeof(KEX_GSS_GEX_SHA1_ID) - 1);
674526
-			buffer_append(&buf, encoded, enclen);
674526
-			buffer_put_char(&buf, ',');
674526
-			buffer_append(&buf, KEX_GSS_GRP1_SHA1_ID, 
674526
-			    sizeof(KEX_GSS_GRP1_SHA1_ID) - 1);
674526
-			buffer_append(&buf, encoded, enclen);
674526
-			buffer_put_char(&buf, ',');
674526
-			buffer_append(&buf, KEX_GSS_GRP14_SHA1_ID,
674526
-			    sizeof(KEX_GSS_GRP14_SHA1_ID) - 1);
674526
-			buffer_append(&buf, encoded, enclen);
674526
+			cp = strncpy(s, kex, strlen(kex));
674526
+			for ((p = strsep(&cp, ",")); p && *p != '\0';
674526
+				(p = strsep(&cp, ","))) {
674526
+				if (buffer_len(&buf) != 0)
674526
+					buffer_put_char(&buf, ',');
674526
+				buffer_append(&buf, p,
674526
+				    strlen(p));
674526
+				buffer_append(&buf, encoded, enclen);
674526
+			}
674526
 
674526
 			gss_enc2oid[oidpos].oid = &(gss_supported->elements[i]);
674526
 			gss_enc2oid[oidpos].encoded = encoded;
674526
 			oidpos++;
674526
 		}
674526
 	}
674526
+	free(s);
674526
 	gss_enc2oid[oidpos].oid = NULL;
674526
 	gss_enc2oid[oidpos].encoded = NULL;
674526
 
1d31ef
diff -up openssh-7.4p1/gss-serv.c.gsskexalg openssh-7.4p1/gss-serv.c
1d31ef
--- openssh-7.4p1/gss-serv.c.gsskexalg	2017-02-09 10:46:50.449893106 +0100
1d31ef
+++ openssh-7.4p1/gss-serv.c	2017-02-09 10:55:12.189422901 +0100
1d31ef
@@ -149,7 +149,7 @@ ssh_gssapi_server_mechanisms() {
1d31ef
 	if (supported_oids == NULL)
1d31ef
 		ssh_gssapi_prepare_supported_oids();
1d31ef
 	return (ssh_gssapi_kex_mechs(supported_oids,
1d31ef
-	    &ssh_gssapi_server_check_mech, NULL, NULL));
1d31ef
+	    &ssh_gssapi_server_check_mech, NULL, NULL, options.gss_kex_algorithms));
674526
 }
674526
 
674526
 /* Unprivileged */
1d31ef
diff -up openssh-7.4p1/kex.c.gsskexalg openssh-7.4p1/kex.c
1d31ef
--- openssh-7.4p1/kex.c.gsskexalg	2017-02-09 10:46:50.449893106 +0100
1d31ef
+++ openssh-7.4p1/kex.c	2017-02-09 10:55:44.008393539 +0100
1d31ef
@@ -248,6 +248,29 @@ kex_assemble_names(const char *def, char
1d31ef
 	return 0;
674526
 }
674526
 
674526
+/* Validate GSS KEX method name list */
674526
+int
674526
+gss_kex_names_valid(const char *names)
674526
+{
674526
+	char *s, *cp, *p;
674526
+
674526
+	if (names == NULL || *names == '\0')
674526
+		return 0;
1d31ef
+	s = cp = strdup(names);
674526
+	for ((p = strsep(&cp, ",")); p && *p != '\0';
674526
+	    (p = strsep(&cp, ","))) {
674526
+		if (strncmp(p, "gss-", 4) != 0
674526
+		  || kex_alg_by_name(p) == NULL) {
674526
+			error("Unsupported KEX algorithm \"%.100s\"", p);
674526
+			free(s);
674526
+			return 0;
674526
+		}
674526
+	}
674526
+	debug3("gss kex names ok: [%s]", names);
674526
+	free(s);
674526
+	return 1;
674526
+}
674526
+
674526
 /* put algorithm proposal into buffer */
1d31ef
 int
1d31ef
 kex_prop2buf(struct sshbuf *b, char *proposal[PROPOSAL_MAX])
1d31ef
diff -up openssh-7.4p1/kex.h.gsskexalg openssh-7.4p1/kex.h
1d31ef
--- openssh-7.4p1/kex.h.gsskexalg	2017-02-09 10:46:50.452893104 +0100
1d31ef
+++ openssh-7.4p1/kex.h	2017-02-09 11:02:35.313012903 +0100
1d31ef
@@ -179,6 +179,7 @@ struct kex {
1d31ef
 char	*kex_alg_list(char);
1d31ef
 char	*kex_names_cat(const char *, const char *);
1d31ef
 int	 kex_assemble_names(const char *, char **);
1d31ef
+int	 gss_kex_names_valid(const char *);
1d31ef
 
1d31ef
 int	 kex_new(struct ssh *, char *[PROPOSAL_MAX], struct kex **);
1d31ef
 int	 kex_setup(struct ssh *, char *[PROPOSAL_MAX]);
1d31ef
diff -up openssh-7.4p1/readconf.c.gsskexalg openssh-7.4p1/readconf.c
1d31ef
--- openssh-7.4p1/readconf.c.gsskexalg	2017-02-09 10:46:50.420893129 +0100
1d31ef
+++ openssh-7.4p1/readconf.c	2017-02-09 10:56:06.759372540 +0100
1d31ef
@@ -64,6 +64,7 @@
674526
 #include "uidswap.h"
1d31ef
 #include "myproposal.h"
1d31ef
 #include "digest.h"
674526
+#include "ssh-gss.h"
674526
 
674526
 /* Format of the configuration file:
674526
 
1d31ef
@@ -161,7 +162,7 @@ typedef enum {
674526
 	oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
674526
 	oAddressFamily, oGssAuthentication, oGssDelegateCreds,
674526
 	oGssTrustDns, oGssKeyEx, oGssClientIdentity, oGssRenewalRekey,
674526
-	oGssServerIdentity, 
674526
+	oGssServerIdentity, oGssKexAlgorithms,
674526
 	oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
674526
 	oSendEnv, oControlPath, oControlMaster, oControlPersist,
674526
 	oHashKnownHosts,
1d31ef
@@ -213,6 +214,7 @@ static struct {
674526
 	{ "gssapiclientidentity", oGssClientIdentity },
674526
 	{ "gssapiserveridentity", oGssServerIdentity },
674526
 	{ "gssapirenewalforcesrekey", oGssRenewalRekey },
674526
+	{ "gssapikexalgorithms", oGssKexAlgorithms },
674526
 #else
674526
 	{ "gssapiauthentication", oUnsupported },
674526
 	{ "gssapikeyexchange", oUnsupported },
1d31ef
@@ -220,6 +222,7 @@ static struct {
674526
 	{ "gssapitrustdns", oUnsupported },
674526
 	{ "gssapiclientidentity", oUnsupported },
674526
 	{ "gssapirenewalforcesrekey", oUnsupported },
674526
+	{ "gssapikexalgorithms", oUnsupported },
674526
 #endif
674526
 	{ "fallbacktorsh", oDeprecated },
674526
 	{ "usersh", oDeprecated },
1d31ef
@@ -996,6 +999,18 @@ parse_time:
674526
 		intptr = &options->gss_renewal_rekey;
674526
 		goto parse_flag;
674526
 
674526
+	case oGssKexAlgorithms:
674526
+		arg = strdelim(&s);
674526
+		if (!arg || *arg == '\0')
674526
+			fatal("%.200s line %d: Missing argument.",
674526
+			    filename, linenum);
674526
+		if (!gss_kex_names_valid(arg))
674526
+			fatal("%.200s line %d: Bad GSSAPI KexAlgorithms '%s'.",
674526
+			    filename, linenum, arg ? arg : "<NONE>");
674526
+		if (*activep && options->gss_kex_algorithms == NULL)
1d31ef
+			options->gss_kex_algorithms = strdup(arg);
674526
+		break;
674526
+
674526
 	case oBatchMode:
674526
 		intptr = &options->batch_mode;
674526
 		goto parse_flag;
1d31ef
@@ -1813,6 +1828,7 @@ initialize_options(Options * options)
674526
 	options->gss_renewal_rekey = -1;
674526
 	options->gss_client_identity = NULL;
674526
 	options->gss_server_identity = NULL;
674526
+	options->gss_kex_algorithms = NULL;
674526
 	options->password_authentication = -1;
674526
 	options->kbd_interactive_authentication = -1;
674526
 	options->kbd_interactive_devices = NULL;
1d31ef
@@ -1964,6 +1980,10 @@ fill_default_options(Options * options)
674526
 		options->gss_trust_dns = 0;
674526
 	if (options->gss_renewal_rekey == -1)
674526
 		options->gss_renewal_rekey = 0;
1d31ef
+#ifdef GSSAPI
674526
+	if (options->gss_kex_algorithms == NULL)
674526
+		options->gss_kex_algorithms = strdup(GSS_KEX_DEFAULT_KEX);
1d31ef
+#endif
674526
 	if (options->password_authentication == -1)
674526
 		options->password_authentication = 1;
674526
 	if (options->kbd_interactive_authentication == -1)
1d31ef
diff -up openssh-7.4p1/readconf.h.gsskexalg openssh-7.4p1/readconf.h
1d31ef
--- openssh-7.4p1/readconf.h.gsskexalg	2017-02-09 10:46:50.420893129 +0100
1d31ef
+++ openssh-7.4p1/readconf.h	2017-02-09 10:46:50.450893106 +0100
1d31ef
@@ -51,6 +51,7 @@ typedef struct {
674526
 	int	gss_renewal_rekey;	/* Credential renewal forces rekey */
674526
 	char    *gss_client_identity;   /* Principal to initiate GSSAPI with */
674526
 	char    *gss_server_identity;   /* GSSAPI target principal */
674526
+	char   *gss_kex_algorithms;	/* GSSAPI kex methods to be offered by client. */
674526
 	int     password_authentication;	/* Try password
674526
 						 * authentication. */
674526
 	int     kbd_interactive_authentication; /* Try keyboard-interactive auth. */
1d31ef
diff -up openssh-7.4p1/servconf.c.gsskexalg openssh-7.4p1/servconf.c
1d31ef
--- openssh-7.4p1/servconf.c.gsskexalg	2017-02-09 10:46:50.446893109 +0100
1d31ef
+++ openssh-7.4p1/servconf.c	2017-02-09 10:57:15.784309297 +0100
1d31ef
@@ -57,6 +57,7 @@
674526
 #include "auth.h"
1d31ef
 #include "myproposal.h"
1d31ef
 #include "digest.h"
674526
+#include "ssh-gss.h"
674526
 
674526
 static void add_listen_addr(ServerOptions *, char *, int);
674526
 static void add_one_listen_addr(ServerOptions *, char *, int);
1d31ef
@@ -117,6 +117,7 @@ initialize_server_options(ServerOptions
674526
 	options->gss_cleanup_creds = -1;
674526
 	options->gss_strict_acceptor = -1;
674526
 	options->gss_store_rekey = -1;
674526
+	options->gss_kex_algorithms = NULL;
674526
 	options->password_authentication = -1;
674526
 	options->kbd_interactive_authentication = -1;
674526
 	options->challenge_response_authentication = -1;
1d31ef
@@ -280,6 +281,10 @@ fill_default_server_options(ServerOption
fc6407
 		options->gss_strict_acceptor = 1;
674526
 	if (options->gss_store_rekey == -1)
674526
 		options->gss_store_rekey = 0;
1d31ef
+#ifdef GSSAPI
674526
+	if (options->gss_kex_algorithms == NULL)
674526
+		options->gss_kex_algorithms = strdup(GSS_KEX_DEFAULT_KEX);
1d31ef
+#endif
674526
 	if (options->password_authentication == -1)
674526
 		options->password_authentication = 1;
674526
 	if (options->kbd_interactive_authentication == -1)
1d31ef
@@ -422,7 +425,7 @@ typedef enum {
1d31ef
 	sHostKeyAlgorithms,
1d31ef
 	sClientAliveInterval, sClientAliveCountMax, sAuthorizedKeysFile,
674526
 	sGssAuthentication, sGssCleanupCreds, sGssEnablek5users, sGssStrictAcceptor,
674526
-	sGssKeyEx, sGssStoreRekey, sAcceptEnv, sPermitTunnel,
674526
+	sGssKeyEx, sGssStoreRekey, sGssKexAlgorithms, sAcceptEnv, sPermitTunnel,
674526
 	sMatch, sPermitOpen, sForceCommand, sChrootDirectory,
674526
 	sUsePrivilegeSeparation, sAllowAgentForwarding,
674526
 	sHostCertificate,
1d31ef
@@ -501,6 +504,7 @@ static struct {
674526
 	{ "gssapikeyexchange", sGssKeyEx, SSHCFG_GLOBAL },
674526
 	{ "gssapistorecredentialsonrekey", sGssStoreRekey, SSHCFG_GLOBAL },
674526
 	{ "gssapienablek5users", sGssEnablek5users, SSHCFG_ALL },
674526
+	{ "gssapikexalgorithms", sGssKexAlgorithms, SSHCFG_GLOBAL },
674526
 #else
674526
 	{ "gssapiauthentication", sUnsupported, SSHCFG_ALL },
674526
 	{ "gssapicleanupcredentials", sUnsupported, SSHCFG_GLOBAL },
1d31ef
@@ -508,6 +512,7 @@ static struct {
674526
 	{ "gssapikeyexchange", sUnsupported, SSHCFG_GLOBAL },
674526
 	{ "gssapistorecredentialsonrekey", sUnsupported, SSHCFG_GLOBAL },
674526
 	{ "gssapienablek5users", sUnsupported, SSHCFG_ALL },
674526
+	{ "gssapikexalgorithms", sUnsupported, SSHCFG_GLOBAL },
674526
 #endif
674526
 	{ "gssusesessionccache", sUnsupported, SSHCFG_GLOBAL },
674526
 	{ "gssapiusesessioncredcache", sUnsupported, SSHCFG_GLOBAL },
1d31ef
@@ -1249,6 +1254,18 @@ process_server_config_line(ServerOptions
674526
 		intptr = &options->gss_store_rekey;
674526
 		goto parse_flag;
674526
 
674526
+	case sGssKexAlgorithms:
674526
+		arg = strdelim(&cp;;
674526
+		if (!arg || *arg == '\0')
674526
+			fatal("%.200s line %d: Missing argument.",
674526
+			    filename, linenum);
674526
+		if (!gss_kex_names_valid(arg))
674526
+			fatal("%.200s line %d: Bad GSSAPI KexAlgorithms '%s'.",
674526
+			    filename, linenum, arg ? arg : "<NONE>");
674526
+		if (*activep && options->gss_kex_algorithms == NULL)
1d31ef
+			options->gss_kex_algorithms = strdup(arg);
674526
+		break;
674526
+
674526
 	case sPasswordAuthentication:
674526
 		intptr = &options->password_authentication;
674526
 		goto parse_flag;
1d31ef
@@ -2304,6 +2321,7 @@ dump_config(ServerOptions *o)
674526
 	dump_cfg_fmtint(sGssKeyEx, o->gss_keyex);
674526
 	dump_cfg_fmtint(sGssStrictAcceptor, o->gss_strict_acceptor);
674526
 	dump_cfg_fmtint(sGssStoreRekey, o->gss_store_rekey);
674526
+	dump_cfg_string(sGssKexAlgorithms, o->gss_kex_algorithms);
674526
 #endif
674526
 	dump_cfg_fmtint(sPasswordAuthentication, o->password_authentication);
674526
 	dump_cfg_fmtint(sKbdInteractiveAuthentication,
1d31ef
diff -up openssh-7.4p1/servconf.h.gsskexalg openssh-7.4p1/servconf.h
1d31ef
--- openssh-7.4p1/servconf.h.gsskexalg	2017-02-09 10:46:50.450893106 +0100
1d31ef
+++ openssh-7.4p1/servconf.h	2017-02-09 10:57:33.717292870 +0100
674526
@@ -116,6 +116,7 @@ typedef struct {
674526
 	int     gss_cleanup_creds;	/* If true, destroy cred cache on logout */
1d31ef
 	int     gss_strict_acceptor;	/* If true, restrict the GSSAPI acceptor name */
674526
 	int 	gss_store_rekey;
674526
+	char   *gss_kex_algorithms;	/* GSSAPI kex methods to be offered by client. */
674526
 	int     password_authentication;	/* If true, permit password
674526
 						 * authentication. */
674526
 	int     kbd_interactive_authentication;	/* If true, permit */
1d31ef
diff -up openssh-7.4p1/ssh.1.gsskexalg openssh-7.4p1/ssh.1
1d31ef
--- openssh-7.4p1/ssh.1.gsskexalg	2017-02-09 10:46:50.443893111 +0100
1d31ef
+++ openssh-7.4p1/ssh.1	2017-02-09 10:46:50.451893105 +0100
1d31ef
@@ -517,6 +517,7 @@ For full details of the options listed b
674526
 .It GSSAPIDelegateCredentials
674526
 .It GSSAPIRenewalForcesRekey
674526
 .It GSSAPITrustDns
674526
+.It GSSAPIKexAlgorithms
674526
 .It HashKnownHosts
674526
 .It Host
674526
 .It HostbasedAuthentication
1d31ef
diff -up openssh-7.4p1/ssh_config.5.gsskexalg openssh-7.4p1/ssh_config.5
1d31ef
--- openssh-7.4p1/ssh_config.5.gsskexalg	2017-02-09 10:46:50.452893104 +0100
1d31ef
+++ openssh-7.4p1/ssh_config.5	2017-02-09 11:00:39.053122745 +0100
1d31ef
@@ -782,6 +782,18 @@ the name of the host being connected to.
1d31ef
 command line will be passed untouched to the GSSAPI library.
674526
 The default is
674526
 .Dq no .
674526
+.It Cm GSSAPIKexAlgorithms
674526
+The list of key exchange algorithms that are offered for GSSAPI
674526
+key exchange. Possible values are
674526
+.Bd -literal -offset 3n
674526
+gss-gex-sha1-,
674526
+gss-group1-sha1-,
674526
+gss-group14-sha1-
674526
+.Ed
674526
+.Pp
674526
+The default is
674526
+.Dq gss-gex-sha1-,gss-group1-sha1-,gss-group14-sha1- .
674526
+This option only applies to protocol version 2 connections using GSSAPI.
674526
 .It Cm HashKnownHosts
674526
 Indicates that
674526
 .Xr ssh 1
1d31ef
diff -up openssh-7.4p1/sshconnect2.c.gsskexalg openssh-7.4p1/sshconnect2.c
1d31ef
--- openssh-7.4p1/sshconnect2.c.gsskexalg	2017-02-09 10:46:50.451893105 +0100
1d31ef
+++ openssh-7.4p1/sshconnect2.c	2017-02-09 10:58:08.533260973 +0100
1d31ef
@@ -181,7 +181,8 @@ ssh_kex2(char *host, struct sockaddr *ho
1d31ef
 		else
1d31ef
 			gss_host = host;
1d31ef
 
1d31ef
-		gss = ssh_gssapi_client_mechanisms(gss_host, options.gss_client_identity);
1d31ef
+		gss = ssh_gssapi_client_mechanisms(gss_host,
1d31ef
+		    options.gss_client_identity, options.gss_kex_algorithms);
1d31ef
 		if (gss) {
1d31ef
 			debug("Offering GSSAPI proposal: %s", gss);
1d31ef
 			xasprintf(&options.kex_algorithms,
1d31ef
diff -up openssh-7.4p1/sshd_config.5.gsskexalg openssh-7.4p1/sshd_config.5
1d31ef
--- openssh-7.4p1/sshd_config.5.gsskexalg	2017-02-09 10:46:50.452893104 +0100
1d31ef
+++ openssh-7.4p1/sshd_config.5	2017-02-09 11:01:55.141050861 +0100
1d31ef
@@ -666,6 +666,18 @@ Controls whether the user's GSSAPI crede
674526
 successful connection rekeying. This option can be used to accepted renewed 
674526
 or updated credentials from a compatible client. The default is
674526
 .Dq no .
674526
+.It Cm GSSAPIKexAlgorithms
674526
+The list of key exchange algorithms that are accepted by GSSAPI
674526
+key exchange. Possible values are
674526
+.Bd -literal -offset 3n
674526
+gss-gex-sha1-,
674526
+gss-group1-sha1-,
674526
+gss-group14-sha1-
674526
+.Ed
674526
+.Pp
674526
+The default is
674526
+.Dq gss-gex-sha1-,gss-group1-sha1-,gss-group14-sha1- .
674526
+This option only applies to protocol version 2 connections using GSSAPI.
1d31ef
 .It Cm HostbasedAcceptedKeyTypes
1d31ef
 Specifies the key types that will be accepted for hostbased authentication
1d31ef
 as a comma-separated pattern list.
1d31ef
diff -up openssh-7.4p1/ssh-gss.h.gsskexalg openssh-7.4p1/ssh-gss.h
1d31ef
--- openssh-7.4p1/ssh-gss.h.gsskexalg	2017-02-09 10:46:50.425893125 +0100
1d31ef
+++ openssh-7.4p1/ssh-gss.h	2017-02-09 10:46:50.451893105 +0100
1d31ef
@@ -76,6 +76,11 @@ extern char **k5users_allowed_cmds;
1d31ef
 #define KEX_GSS_GRP14_SHA1_ID				"gss-group14-sha1-"
1d31ef
 #define KEX_GSS_GEX_SHA1_ID				"gss-gex-sha1-"
f8987c
 
1d31ef
+#define        GSS_KEX_DEFAULT_KEX \
1d31ef
+	KEX_GSS_GEX_SHA1_ID "," \
1d31ef
+	KEX_GSS_GRP1_SHA1_ID "," \
1d31ef
+	KEX_GSS_GRP14_SHA1_ID
1d31ef
+
1d31ef
 typedef struct {
1d31ef
 	char *filename;
1d31ef
 	char *envvar;
1d31ef
@@ -147,9 +152,9 @@ int ssh_gssapi_credentials_updated(Gssct
1d31ef
 /* In the server */
1d31ef
 typedef int ssh_gssapi_check_fn(Gssctxt **, gss_OID, const char *, 
1d31ef
     const char *);
1d31ef
-char *ssh_gssapi_client_mechanisms(const char *, const char *);
1d31ef
+char *ssh_gssapi_client_mechanisms(const char *, const char *, const char *);
1d31ef
 char *ssh_gssapi_kex_mechs(gss_OID_set, ssh_gssapi_check_fn *, const char *,
1d31ef
-    const char *);
1d31ef
+    const char *, const char *);
1d31ef
 gss_OID ssh_gssapi_id_kex(Gssctxt *, char *, int);
1d31ef
 int ssh_gssapi_server_check_mech(Gssctxt **,gss_OID, const char *, 
1d31ef
     const char *);