summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-04-28 03:24:53 +0000
committerDamien Miller <djm@mindrot.org>2017-04-28 13:26:37 +1000
commit6830be90e71f46bcd182a9202b151eaf2b299434 (patch)
tree4f32a34e1e7709dd27898589e188969ae707eef0
parent066437187e16dcafcbc19f9402ef0e6575899b1d (diff)
upstream commit
include key fingerprint in "Offering public key" debug message Upstream-ID: 964749f820c2ed4cf6a866268b1a05e907315c52
-rw-r--r--sshconnect2.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index f8a54beea..7e4cde151 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.255 2017/03/11 23:40:26 djm Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.256 2017/04/28 03:24:53 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -1479,6 +1479,7 @@ userauth_pubkey(Authctxt *authctxt)
1479{ 1479{
1480 Identity *id; 1480 Identity *id;
1481 int sent = 0; 1481 int sent = 0;
1482 char *fp;
1482 1483
1483 while ((id = TAILQ_FIRST(&authctxt->keys))) { 1484 while ((id = TAILQ_FIRST(&authctxt->keys))) {
1484 if (id->tried++) 1485 if (id->tried++)
@@ -1493,8 +1494,16 @@ userauth_pubkey(Authctxt *authctxt)
1493 */ 1494 */
1494 if (id->key != NULL) { 1495 if (id->key != NULL) {
1495 if (try_identity(id)) { 1496 if (try_identity(id)) {
1496 debug("Offering %s public key: %s", 1497 if ((fp = sshkey_fingerprint(id->key,
1497 key_type(id->key), id->filename); 1498 options.fingerprint_hash,
1499 SSH_FP_DEFAULT)) == NULL) {
1500 error("%s: sshkey_fingerprint failed",
1501 __func__);
1502 return 0;
1503 }
1504 debug("Offering public key: %s %s %s",
1505 sshkey_type(id->key), fp, id->filename);
1506 free(fp);
1498 sent = send_pubkey_test(authctxt, id); 1507 sent = send_pubkey_test(authctxt, id);
1499 } 1508 }
1500 } else { 1509 } else {