View | Details | Raw Unified | Return to bug 3157 | Differences between
and this patch

Collapse All | Expand All

(-)a/hostfile.c (-2 / +4 lines)
Lines 339-345 check_hostkeys_by_key_or_type(struct hostkeys *hostkeys, Link Here
339
{
339
{
340
	u_int i;
340
	u_int i;
341
	HostStatus end_return = HOST_NEW;
341
	HostStatus end_return = HOST_NEW;
342
	int want_cert = sshkey_is_cert(k);
342
	int want_cert = (k == NULL) ?
343
		sshkey_type_is_cert(keytype) : sshkey_is_cert(k);
343
	HostkeyMarker want_marker = want_cert ? MRK_CA : MRK_NONE;
344
	HostkeyMarker want_marker = want_cert ? MRK_CA : MRK_NONE;
344
345
345
	if (found != NULL)
346
	if (found != NULL)
Lines 349-355 check_hostkeys_by_key_or_type(struct hostkeys *hostkeys, Link Here
349
		if (hostkeys->entries[i].marker != want_marker)
350
		if (hostkeys->entries[i].marker != want_marker)
350
			continue;
351
			continue;
351
		if (k == NULL) {
352
		if (k == NULL) {
352
			if (hostkeys->entries[i].key->type != keytype)
353
			if (hostkeys->entries[i].key->type !=
354
			    sshkey_type_plain(keytype))
353
				continue;
355
				continue;
354
			end_return = HOST_FOUND;
356
			end_return = HOST_FOUND;
355
			if (found != NULL)
357
			if (found != NULL)
(-)a/sshconnect2.c (-2 / +1 lines)
Lines 130-137 order_hostkeyalgs(char *host, struct sockaddr *hostaddr, u_short port) Link Here
130
	while ((alg = strsep(&avail, ",")) && *alg != '\0') {
130
	while ((alg = strsep(&avail, ",")) && *alg != '\0') {
131
		if ((ktype = sshkey_type_from_name(alg)) == KEY_UNSPEC)
131
		if ((ktype = sshkey_type_from_name(alg)) == KEY_UNSPEC)
132
			fatal("%s: unknown alg %s", __func__, alg);
132
			fatal("%s: unknown alg %s", __func__, alg);
133
		if (lookup_key_in_hostkeys_by_type(hostkeys,
133
		if (lookup_key_in_hostkeys_by_type(hostkeys, ktype, NULL))
134
		    sshkey_type_plain(ktype), NULL))
135
			ALG_APPEND(first, alg);
134
			ALG_APPEND(first, alg);
136
		else
135
		else
137
			ALG_APPEND(last, alg);
136
			ALG_APPEND(last, alg);

Return to bug 3157