summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/auth2.c
diff options
context:
space:
mode:
authorJakob Schlyter <jakob@cvs.openbsd.org>2001-12-18 10:05:16 +0000
committerJakob Schlyter <jakob@cvs.openbsd.org>2001-12-18 10:05:16 +0000
commit6299a8c10c5feae2c2f0dce38475a8815cd83a2a (patch)
treec667a030d27d51b6a79372e1f2938563416e5dbe /usr.bin/ssh/auth2.c
parent20c039451736a8d870655664b41fd7b6a6fe8ba9 (diff)
log fingerprint on successful public key authentication; ok markus@
Diffstat (limited to 'usr.bin/ssh/auth2.c')
-rw-r--r--usr.bin/ssh/auth2.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/ssh/auth2.c b/usr.bin/ssh/auth2.c
index 59acf87c445..2b43af60f53 100644
--- a/usr.bin/ssh/auth2.c
+++ b/usr.bin/ssh/auth2.c
@@ -23,7 +23,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth2.c,v 1.75 2001/12/09 18:45:56 markus Exp $");
+RCSID("$OpenBSD: auth2.c,v 1.76 2001/12/18 10:05:15 jakob Exp $");
#include <openssl/evp.h>
@@ -596,6 +596,7 @@ user_key_allowed2(struct passwd *pw, Key *key, char *file)
u_long linenum = 0;
struct stat st;
Key *found;
+ char *fp;
if (pw == NULL)
return 0;
@@ -663,6 +664,10 @@ user_key_allowed2(struct passwd *pw, Key *key, char *file)
found_key = 1;
debug("matching key found: file %s, line %lu",
file, linenum);
+ fp = key_fingerprint(found, SSH_FP_MD5, SSH_FP_HEX);
+ verbose("Found matching %s key: %s",
+ key_type(found), fp);
+ xfree(fp);
break;
}
}