diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-04-12 23:34:34 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-04-12 23:34:34 +0000 |
commit | 5eabda303aa26c77e4c383230db9ce9d9175e580 (patch) | |
tree | a084d793ff9789b41920bb259c7ff309d21eba24 /sshconnect1.c | |
parent | 0998872972ec9a059204344cf0bec64123b3e28c (diff) |
- markus@cvs.openbsd.org 2001/04/12 19:15:26
[auth-rhosts.c auth.h auth2.c buffer.c canohost.c canohost.h
compat.c compat.h hostfile.c pathnames.h readconf.c readconf.h
servconf.c servconf.h ssh.c sshconnect.c sshconnect.h sshconnect1.c
sshconnect2.c sshd_config]
implement HostbasedAuthentication (= RhostRSAAuthentication for ssh v2)
similar to RhostRSAAuthentication unless you enable (the experimental)
HostbasedUsesNameFromPacketOnly option. please test. :)
Diffstat (limited to 'sshconnect1.c')
-rw-r--r-- | sshconnect1.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sshconnect1.c b/sshconnect1.c index 3ec5ecc51..865d04e85 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.29 2001/03/26 08:07:09 markus Exp $"); | 16 | RCSID("$OpenBSD: sshconnect1.c,v 1.30 2001/04/12 19:15:25 markus Exp $"); |
17 | 17 | ||
18 | #include <openssl/bn.h> | 18 | #include <openssl/bn.h> |
19 | #include <openssl/evp.h> | 19 | #include <openssl/evp.h> |
@@ -911,17 +911,14 @@ ssh_kex(char *host, struct sockaddr *hostaddr) | |||
911 | * Authenticate user | 911 | * Authenticate user |
912 | */ | 912 | */ |
913 | void | 913 | void |
914 | ssh_userauth( | 914 | ssh_userauth1(const char *local_user, const char *server_user, char *host, |
915 | const char *local_user, | 915 | Key **keys, int nkeys) |
916 | const char *server_user, | ||
917 | char *host, | ||
918 | Key *own_host_key) | ||
919 | { | 916 | { |
920 | int i, type; | 917 | int i, type; |
921 | int payload_len; | 918 | int payload_len; |
922 | 919 | ||
923 | if (supported_authentications == 0) | 920 | if (supported_authentications == 0) |
924 | fatal("ssh_userauth: server supports no auth methods"); | 921 | fatal("ssh_userauth1: server supports no auth methods"); |
925 | 922 | ||
926 | /* Send the name of the user to log in as on the server. */ | 923 | /* Send the name of the user to log in as on the server. */ |
927 | packet_start(SSH_CMSG_USER); | 924 | packet_start(SSH_CMSG_USER); |
@@ -1000,9 +997,12 @@ ssh_userauth( | |||
1000 | * authentication. | 997 | * authentication. |
1001 | */ | 998 | */ |
1002 | if ((supported_authentications & (1 << SSH_AUTH_RHOSTS_RSA)) && | 999 | if ((supported_authentications & (1 << SSH_AUTH_RHOSTS_RSA)) && |
1003 | options.rhosts_rsa_authentication && own_host_key != NULL) { | 1000 | options.rhosts_rsa_authentication) { |
1004 | if (try_rhosts_rsa_authentication(local_user, own_host_key)) | 1001 | for (i = 0; i < nkeys; i++) { |
1005 | return; | 1002 | if (keys[i]->type == KEY_RSA1 && |
1003 | try_rhosts_rsa_authentication(local_user, keys[i])) | ||
1004 | return; | ||
1005 | } | ||
1006 | } | 1006 | } |
1007 | /* Try RSA authentication if the server supports it. */ | 1007 | /* Try RSA authentication if the server supports it. */ |
1008 | if ((supported_authentications & (1 << SSH_AUTH_RSA)) && | 1008 | if ((supported_authentications & (1 << SSH_AUTH_RSA)) && |