diff options
Diffstat (limited to 'authfile.c')
-rw-r--r-- | authfile.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/authfile.c b/authfile.c index 1f46093e3..90618efde 100644 --- a/authfile.c +++ b/authfile.c | |||
@@ -36,7 +36,7 @@ | |||
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include "includes.h" | 38 | #include "includes.h" |
39 | RCSID("$OpenBSD: authfile.c,v 1.54 2003/05/24 09:30:39 djm Exp $"); | 39 | RCSID("$OpenBSD: authfile.c,v 1.52 2003/03/13 11:42:18 markus Exp $"); |
40 | 40 | ||
41 | #include <openssl/err.h> | 41 | #include <openssl/err.h> |
42 | #include <openssl/evp.h> | 42 | #include <openssl/evp.h> |
@@ -514,7 +514,7 @@ key_perm_ok(int fd, const char *filename) | |||
514 | error("@ WARNING: UNPROTECTED PRIVATE KEY FILE! @"); | 514 | error("@ WARNING: UNPROTECTED PRIVATE KEY FILE! @"); |
515 | error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); | 515 | error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); |
516 | error("Permissions 0%3.3o for '%s' are too open.", | 516 | error("Permissions 0%3.3o for '%s' are too open.", |
517 | (u_int)st.st_mode & 0777, filename); | 517 | st.st_mode & 0777, filename); |
518 | error("It is recommended that your private key files are NOT accessible by others."); | 518 | error("It is recommended that your private key files are NOT accessible by others."); |
519 | error("This private key will be ignored."); | 519 | error("This private key will be ignored."); |
520 | return 0; | 520 | return 0; |
@@ -629,18 +629,9 @@ key_load_public(const char *filename, char **commentp) | |||
629 | Key *pub; | 629 | Key *pub; |
630 | char file[MAXPATHLEN]; | 630 | char file[MAXPATHLEN]; |
631 | 631 | ||
632 | /* try rsa1 private key */ | ||
633 | pub = key_load_public_type(KEY_RSA1, filename, commentp); | 632 | pub = key_load_public_type(KEY_RSA1, filename, commentp); |
634 | if (pub != NULL) | 633 | if (pub != NULL) |
635 | return pub; | 634 | return pub; |
636 | |||
637 | /* try rsa1 public key */ | ||
638 | pub = key_new(KEY_RSA1); | ||
639 | if (key_try_load_public(pub, filename, commentp) == 1) | ||
640 | return pub; | ||
641 | key_free(pub); | ||
642 | |||
643 | /* try ssh2 public key */ | ||
644 | pub = key_new(KEY_UNSPEC); | 635 | pub = key_new(KEY_UNSPEC); |
645 | if (key_try_load_public(pub, filename, commentp) == 1) | 636 | if (key_try_load_public(pub, filename, commentp) == 1) |
646 | return pub; | 637 | return pub; |