summaryrefslogtreecommitdiff
path: root/sshconnect2.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-03-10 17:08:59 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-03-10 17:08:59 +0000
commit329782e3db938e8cc062a600133a98010d95a662 (patch)
tree224f4adeac768455762b29e2382789d6fbb44504 /sshconnect2.c
parent5f5419a6a2791b392525da31cd84433cbc8af2c4 (diff)
- markus@cvs.openbsd.org 2001/03/10 12:48:27
[sshconnect2.c] ignore nonexisting private keys; report rjmooney@mediaone.net
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index 81e1aef9..646bb18f 100644
--- a/sshconnect2.c
+++ b/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) {