diff options
Diffstat (limited to 'sshconnect1.c')
-rw-r--r-- | sshconnect1.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sshconnect1.c b/sshconnect1.c index ce560791c..227e10b4b 100644 --- a/sshconnect1.c +++ b/sshconnect1.c | |||
@@ -13,7 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include "includes.h" | 15 | #include "includes.h" |
16 | RCSID("$OpenBSD: sshconnect1.c,v 1.8 2000/10/12 09:59:19 markus Exp $"); | 16 | RCSID("$OpenBSD: sshconnect1.c,v 1.9 2000/11/12 19:50:38 markus Exp $"); |
17 | 17 | ||
18 | #include <openssl/bn.h> | 18 | #include <openssl/bn.h> |
19 | #include <openssl/dsa.h> | 19 | #include <openssl/dsa.h> |
@@ -62,7 +62,7 @@ try_agent_authentication() | |||
62 | return 0; | 62 | return 0; |
63 | 63 | ||
64 | challenge = BN_new(); | 64 | challenge = BN_new(); |
65 | key = key_new(KEY_RSA); | 65 | key = key_new(KEY_RSA1); |
66 | 66 | ||
67 | /* Loop through identities served by the agent. */ | 67 | /* Loop through identities served by the agent. */ |
68 | for (key = ssh_get_first_identity(auth, &comment, 1); | 68 | for (key = ssh_get_first_identity(auth, &comment, 1); |
@@ -196,7 +196,7 @@ try_rsa_authentication(const char *authfile) | |||
196 | int plen, clen; | 196 | int plen, clen; |
197 | 197 | ||
198 | /* Try to load identification for the authentication key. */ | 198 | /* Try to load identification for the authentication key. */ |
199 | public = key_new(KEY_RSA); | 199 | public = key_new(KEY_RSA1); |
200 | if (!load_public_key(authfile, public, &comment)) { | 200 | if (!load_public_key(authfile, public, &comment)) { |
201 | key_free(public); | 201 | key_free(public); |
202 | /* Could not load it. Fail. */ | 202 | /* Could not load it. Fail. */ |
@@ -237,7 +237,7 @@ try_rsa_authentication(const char *authfile) | |||
237 | 237 | ||
238 | debug("Received RSA challenge from server."); | 238 | debug("Received RSA challenge from server."); |
239 | 239 | ||
240 | private = key_new(KEY_RSA); | 240 | private = key_new(KEY_RSA1); |
241 | /* | 241 | /* |
242 | * Load the private key. Try first with empty passphrase; if it | 242 | * Load the private key. Try first with empty passphrase; if it |
243 | * fails, ask for a passphrase. | 243 | * fails, ask for a passphrase. |
@@ -760,7 +760,7 @@ ssh_kex(char *host, struct sockaddr *hostaddr) | |||
760 | packet_integrity_check(payload_len, | 760 | packet_integrity_check(payload_len, |
761 | 8 + 4 + sum_len + 0 + 4 + 0 + 0 + 4 + 4 + 4, | 761 | 8 + 4 + sum_len + 0 + 4 + 0 + 0 + 4 + 4 + 4, |
762 | SSH_SMSG_PUBLIC_KEY); | 762 | SSH_SMSG_PUBLIC_KEY); |
763 | k.type = KEY_RSA; | 763 | k.type = KEY_RSA1; |
764 | k.rsa = host_key; | 764 | k.rsa = host_key; |
765 | check_host_key(host, hostaddr, &k, | 765 | check_host_key(host, hostaddr, &k, |
766 | options.user_hostfile, options.system_hostfile); | 766 | options.user_hostfile, options.system_hostfile); |
@@ -994,7 +994,8 @@ ssh_userauth( | |||
994 | 994 | ||
995 | /* Try RSA authentication for each identity. */ | 995 | /* Try RSA authentication for each identity. */ |
996 | for (i = 0; i < options.num_identity_files; i++) | 996 | for (i = 0; i < options.num_identity_files; i++) |
997 | if (try_rsa_authentication(options.identity_files[i])) | 997 | if (options.identity_files_type[i] == KEY_RSA1 && |
998 | try_rsa_authentication(options.identity_files[i])) | ||
998 | return; | 999 | return; |
999 | } | 1000 | } |
1000 | /* Try skey authentication if the server supports it. */ | 1001 | /* Try skey authentication if the server supports it. */ |