diff options
Diffstat (limited to 'auth-skey.c')
-rw-r--r-- | auth-skey.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/auth-skey.c b/auth-skey.c index f403a1962..056efeb9b 100644 --- a/auth-skey.c +++ b/auth-skey.c | |||
@@ -1,7 +1,7 @@ | |||
1 | #include "includes.h" | 1 | #include "includes.h" |
2 | 2 | ||
3 | #ifdef SKEY | 3 | #ifdef SKEY |
4 | RCSID("$Id: auth-skey.c,v 1.5 1999/12/06 19:04:57 deraadt Exp $"); | 4 | RCSID("$Id: auth-skey.c,v 1.6 2000/04/14 10:30:29 markus Exp $"); |
5 | 5 | ||
6 | #include "ssh.h" | 6 | #include "ssh.h" |
7 | #include "packet.h" | 7 | #include "packet.h" |
@@ -15,12 +15,12 @@ RCSID("$Id: auth-skey.c,v 1.5 1999/12/06 19:04:57 deraadt Exp $"); | |||
15 | 15 | ||
16 | /* from %OpenBSD: skeylogin.c,v 1.32 1999/08/16 14:46:56 millert Exp % */ | 16 | /* from %OpenBSD: skeylogin.c,v 1.32 1999/08/16 14:46:56 millert Exp % */ |
17 | 17 | ||
18 | /* | 18 | /* |
19 | * try skey authentication, | 19 | * try skey authentication, |
20 | * return 1 on success, 0 on failure, -1 if skey is not available | 20 | * return 1 on success, 0 on failure, -1 if skey is not available |
21 | */ | 21 | */ |
22 | 22 | ||
23 | int | 23 | int |
24 | auth_skey_password(struct passwd * pw, const char *password) | 24 | auth_skey_password(struct passwd * pw, const char *password) |
25 | { | 25 | { |
26 | if (strncasecmp(password, "s/key", 5) == 0) { | 26 | if (strncasecmp(password, "s/key", 5) == 0) { |
@@ -53,18 +53,18 @@ auth_skey_password(struct passwd * pw, const char *password) | |||
53 | */ | 53 | */ |
54 | static u_int32_t | 54 | static u_int32_t |
55 | hash_collapse(s) | 55 | hash_collapse(s) |
56 | u_char *s; | 56 | u_char *s; |
57 | { | 57 | { |
58 | int len, target; | 58 | int len, target; |
59 | u_int32_t i; | 59 | u_int32_t i; |
60 | 60 | ||
61 | if ((strlen(s) % sizeof(u_int32_t)) == 0) | 61 | if ((strlen(s) % sizeof(u_int32_t)) == 0) |
62 | target = strlen(s); /* Multiple of 4 */ | 62 | target = strlen(s); /* Multiple of 4 */ |
63 | else | 63 | else |
64 | target = strlen(s) - (strlen(s) % sizeof(u_int32_t)); | 64 | target = strlen(s) - (strlen(s) % sizeof(u_int32_t)); |
65 | 65 | ||
66 | for (i = 0, len = 0; len < target; len += 4) | 66 | for (i = 0, len = 0; len < target; len += 4) |
67 | i ^= ROUND(s + len); | 67 | i ^= ROUND(s + len); |
68 | 68 | ||
69 | return i; | 69 | return i; |
70 | } | 70 | } |