- /* Add the GSSAPI mechanisms currently supported on this client to
- * the key exchange algorithm proposal */
- orig = myproposal[PROPOSAL_KEX_ALGS];
- if (options.gss_trust_dns)
- gss_host = (char *)get_canonical_hostname(1);
- else
- gss_host = host;
-
- gss = ssh_gssapi_client_mechanisms(gss_host);
- if (gss) {
- debug("Offering GSSAPI proposal: %s", gss);
- len = strlen(orig) + strlen(gss) + 2;
- myproposal[PROPOSAL_KEX_ALGS] = xmalloc(len);
- snprintf(myproposal[PROPOSAL_KEX_ALGS], len, "%s,%s", gss,
- orig);
- }
+ /* Add the GSSAPI mechanisms currently supported on this
+ * client to the key exchange algorithm proposal */
+ orig = myproposal[PROPOSAL_KEX_ALGS];
+
+ if (options.gss_trust_dns)
+ gss_host = (char *)get_canonical_hostname(1);
+ else
+ gss_host = host;
+
+ gss = ssh_gssapi_client_mechanisms(gss_host);
+ if (gss) {
+ debug("Offering GSSAPI proposal: %s", gss);
+ xasprintf(&myproposal[PROPOSAL_KEX_ALGS],
+ "%s,%s", gss, orig);
+ }