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

Collapse All | Expand All

(-)sshconnect.c (+10 lines)
Lines 65-70 Link Here
65
65
66
char *client_version_string = NULL;
66
char *client_version_string = NULL;
67
char *server_version_string = NULL;
67
char *server_version_string = NULL;
68
Key *previous_host_key = NULL;
68
69
69
static int matching_host_key_dns = 0;
70
static int matching_host_key_dns = 0;
70
71
Lines 1227-1232 Link Here
1227
	fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX);
1228
	fp = key_fingerprint(host_key, SSH_FP_MD5, SSH_FP_HEX);
1228
	debug("Server host key: %s %s", key_type(host_key), fp);
1229
	debug("Server host key: %s %s", key_type(host_key), fp);
1229
	free(fp);
1230
	free(fp);
1231
1232
	if (key_equal(previous_host_key, host_key)) {
1233
		debug("Server host key matches cached key");
1234
		return 1;
1235
	}
1236
1237
	/* The key is either accepted, or we discconnect. */
1238
	if (previous_host_key == NULL)
1239
		previous_host_key = key_from_private(host_key);
1230
1240
1231
	/* XXX certs are not yet supported for DNS */
1241
	/* XXX certs are not yet supported for DNS */
1232
	if (!key_is_cert(host_key) && options.verify_host_key_dns &&
1242
	if (!key_is_cert(host_key) && options.verify_host_key_dns &&

Return to bug 2154