j = makekey(pktin.body+8+i, &hostkey, &keystr2, 0);
/*
- * Hash the host key and print the hash in the log box. Just as
- * a last resort in case the registry's host key checking is
- * compromised, we'll allow the user some ability to verify
- * host keys by eye.
+ * Log the host key fingerprint.
*/
- MD5Init(&md5c);
- MD5Update(&md5c, keystr2, hostkey.bytes);
- MD5Final(session_id, &md5c);
{
char logmsg[80];
- int i;
- logevent("Host key MD5 is:");
+ logevent("Host key fingerprint is:");
strcpy(logmsg, " ");
- for (i = 0; i < 16; i++)
- sprintf(logmsg+strlen(logmsg), "%02x", session_id[i]);
+ hostkey.comment = NULL;
+ rsa_fingerprint(logmsg+strlen(logmsg), sizeof(logmsg)-strlen(logmsg),
+ &hostkey);
logevent(logmsg);
}
crWaitUntil(ispkt);
if (pktin.type == SSH1_SMSG_SUCCESS) {
logevent("Pageant's response accepted");
- c_write("Authenticated using RSA key \"",
- 29);
- c_write(commentp, commentlen);
- c_write("\" from agent\r\n", 14);
+ if (flags & FLAG_VERBOSE) {
+ c_write("Authenticated using RSA key \"",
+ 29);
+ c_write(commentp, commentlen);
+ c_write("\" from agent\r\n", 14);
+ }
authed = TRUE;
} else
logevent("Pageant's response not accepted");
c->localid = i;
c->closes = 0;
c->type = SSH1_SMSG_AGENT_OPEN; /* identify channel type */
+ c->u.a.lensofar = 0;
add234(ssh_channels, c);
send_packet(SSH1_MSG_CHANNEL_OPEN_CONFIRMATION,
PKT_INT, c->remoteid, PKT_INT, c->localid,