diff options
author | Damien Miller <djm@mindrot.org> | 2000-05-02 09:23:45 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-05-02 09:23:45 +1000 |
commit | 6f83b8e34d3dc8227d7cf39989c5966abde2305e (patch) | |
tree | d5f01eb7883f7b87ab4d6479ae1c3714f3d0dca0 /sshconnect2.c | |
parent | 63560f9bfc460329b966b17561313d5fa7328726 (diff) |
- OpenBSD CVS update
[channels.c]
- init all fds, close all fds.
[sshconnect2.c]
- check whether file exists before asking for passphrase
[servconf.c servconf.h sshd.8 sshd.c]
- PidFile, pr 1210
[channels.c]
- EINTR
[channels.c]
- unbreak, ok niels@
[sshd.c]
- unlink pid file, ok niels@
[auth2.c]
- Add missing #ifdefs; ok - markus
Diffstat (limited to 'sshconnect2.c')
-rw-r--r-- | sshconnect2.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sshconnect2.c b/sshconnect2.c index 31ef3084c..a4342e2df 100644 --- a/sshconnect2.c +++ b/sshconnect2.c | |||
@@ -28,7 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include "includes.h" | 30 | #include "includes.h" |
31 | RCSID("$OpenBSD: sshconnect2.c,v 1.4 2000/04/27 17:54:01 markus Exp $"); | 31 | RCSID("$OpenBSD: sshconnect2.c,v 1.5 2000/05/01 18:41:06 markus Exp $"); |
32 | 32 | ||
33 | #include <openssl/bn.h> | 33 | #include <openssl/bn.h> |
34 | #include <openssl/rsa.h> | 34 | #include <openssl/rsa.h> |
@@ -310,7 +310,12 @@ ssh2_try_pubkey(char *filename, | |||
310 | Key *k; | 310 | Key *k; |
311 | unsigned char *blob, *signature; | 311 | unsigned char *blob, *signature; |
312 | int bloblen, slen; | 312 | int bloblen, slen; |
313 | struct stat st; | ||
313 | 314 | ||
315 | if (stat(filename, &st) != 0) { | ||
316 | debug("key does not exist: %s", filename); | ||
317 | return 0; | ||
318 | } | ||
314 | debug("try pubkey: %s", filename); | 319 | debug("try pubkey: %s", filename); |
315 | 320 | ||
316 | k = key_new(KEY_DSA); | 321 | k = key_new(KEY_DSA); |
@@ -318,9 +323,9 @@ ssh2_try_pubkey(char *filename, | |||
318 | int success = 0; | 323 | int success = 0; |
319 | char *passphrase; | 324 | char *passphrase; |
320 | char prompt[300]; | 325 | char prompt[300]; |
321 | snprintf(prompt, sizeof prompt, | 326 | snprintf(prompt, sizeof prompt, |
322 | "Enter passphrase for DSA key '%.100s': ", | 327 | "Enter passphrase for DSA key '%.100s': ", |
323 | filename); | 328 | filename); |
324 | passphrase = read_passphrase(prompt, 0); | 329 | passphrase = read_passphrase(prompt, 0); |
325 | success = load_private_key(filename, passphrase, k, NULL); | 330 | success = load_private_key(filename, passphrase, k, NULL); |
326 | memset(passphrase, 0, strlen(passphrase)); | 331 | memset(passphrase, 0, strlen(passphrase)); |