diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-03-10 12:48:28 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-03-10 12:48:28 +0000 |
commit | 4f8373e636681e75a606e525d6d9553946c5955e (patch) | |
tree | 964e289eeecf5c9be38e9fe396b3746a0728b055 /usr.bin/ssh | |
parent | 997ebf608e67ddd69a9cc1612270d9e09eef00bc (diff) |
ignore nonexisting private keys; report rjmooney@mediaone.net
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/sshconnect2.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c index 81e1aef9307..646bb18f326 100644 --- a/usr.bin/ssh/sshconnect2.c +++ b/usr.bin/ssh/sshconnect2.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshconnect2.c,v 1.51 2001/03/08 21:42:33 markus Exp $"); +RCSID("$OpenBSD: sshconnect2.c,v 1.52 2001/03/10 12:48:27 markus Exp $"); #include <openssl/bn.h> #include <openssl/md5.h> @@ -895,7 +895,12 @@ load_identity_file(char *filename) Key *private; char prompt[300], *passphrase; int success = 0, quit, i; + struct stat st; + if (stat(filename, &st) < 0) { + debug3("no such identity: %s", filename); + return NULL; + } private = key_new(KEY_UNSPEC); if (!load_private_key(filename, "", private, NULL)) { if (options.batch_mode) { |