Commit 65b1f7eb authored by Pontus Freyhult's avatar Pontus Freyhult
Browse files

Output the fingerprint of the remote host according to

draft-ietf-secsh-fingerprint-00.txt (and keep the old way of
outputing).

Rev: src/lsh.c:1.159
parent e1097fdd
......@@ -530,17 +530,31 @@ do_lsh_lookup(struct lookup_verifier *c,
if (!quiet_flag)
{
/* Display fingerprint */
struct lsh_string *fingerprint
= hash_string(self->hash,
sexp_format(subject->key, SEXP_CANONICAL, 0),
1);
struct lsh_string *spki_fingerprint =
hash_string(self->hash,
sexp_format(subject->key, SEXP_CANONICAL, 0),
1);
struct lsh_string *fingerprint =
lsh_string_colonize(
ssh_format( "%lfxS",
hash_string(&crypto_md5_algorithm,
key,
0)
),
2,
1
);
if (!INTERACT_YES_OR_NO
(self->tty,
ssh_format("Received unauthenticated key for host %lS\n"
"Fingerprint: %lfxS\n"
"Fingerprint: %lfS\n"
"(lsh-spki fingerprint: %lfxS)\n"
"Do you trust this key? (y/n) ",
self->host->ip, fingerprint), 0, 1))
self->host->ip, fingerprint, spki_fingerprint), 0, 1))
return NULL;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment