summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2005-10-06 18:03:03 +0000
committerColin Watson <cjwatson@debian.org>2005-10-06 18:03:03 +0000
commit990e1d9376032a2e27fdc8a3beaf70b7abebce89 (patch)
tree2e05a6908812109bb661af50adb6fb40312799dd
parentb8d1d4961bf421e8abbb0a7d0f693cb0af6562fb (diff)
back out accidental commit
-rw-r--r--sshconnect2.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index 579e60c1c..601a49429 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -85,7 +85,7 @@ ssh_kex2(char *host, struct sockaddr *hostaddr)
85 Kex *kex; 85 Kex *kex;
86 86
87#ifdef GSSAPI 87#ifdef GSSAPI
88 char *orig, *gss = NULL; 88 char *orig, *gss;
89 int len; 89 int len;
90#endif 90#endif
91 91
@@ -93,16 +93,14 @@ ssh_kex2(char *host, struct sockaddr *hostaddr)
93 xxx_hostaddr = hostaddr; 93 xxx_hostaddr = hostaddr;
94 94
95#ifdef GSSAPI 95#ifdef GSSAPI
96 if (options.gss_authentication) { 96 orig = myproposal[PROPOSAL_KEX_ALGS];
97 orig = myproposal[PROPOSAL_KEX_ALGS]; 97 gss = ssh_gssapi_client_mechanisms(get_canonical_hostname(1));
98 gss = ssh_gssapi_client_mechanisms(get_canonical_hostname(1)); 98 debug("Offering GSSAPI proposal: %s",gss);
99 debug("Offering GSSAPI proposal: %s",gss); 99 if (gss) {
100 if (gss) { 100 len = strlen(orig) + strlen(gss) + 2;
101 len = strlen(orig) + strlen(gss) + 2; 101 myproposal[PROPOSAL_KEX_ALGS] = xmalloc(len);
102 myproposal[PROPOSAL_KEX_ALGS] = xmalloc(len); 102 snprintf(myproposal[PROPOSAL_KEX_ALGS], len, "%s,%s", gss,
103 snprintf(myproposal[PROPOSAL_KEX_ALGS], len, "%s,%s", 103 orig);
104 gss, orig);
105 }
106 } 104 }
107#endif 105#endif
108 106
@@ -152,8 +150,7 @@ ssh_kex2(char *host, struct sockaddr *hostaddr)
152 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client; 150 kex->kex[KEX_DH_GRP14_SHA1] = kexdh_client;
153 kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; 151 kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
154#ifdef GSSAPI 152#ifdef GSSAPI
155 if (options.gss_authentication) 153 kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_client;
156 kex->kex[KEX_GSS_GRP1_SHA1] = kexgss_client;
157#endif 154#endif
158 kex->client_version_string=client_version_string; 155 kex->client_version_string=client_version_string;
159 kex->server_version_string=server_version_string; 156 kex->server_version_string=server_version_string;