summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/auth-skey.c
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2000-05-15 04:37:24 +0000
committerkris <kris@FreeBSD.org>2000-05-15 04:37:24 +0000
commit4dc8aa85ced77e9e02dea6939edd4d3564b5086e (patch)
tree772b9de8852fb4c32957c00639a4fd5460f8a62b /crypto/openssh/auth-skey.c
parentb201b15ee1575ab28ed4f9b5a7d430e835a7c7ae (diff)
downloadFreeBSD-src-4dc8aa85ced77e9e02dea6939edd4d3564b5086e.zip
FreeBSD-src-4dc8aa85ced77e9e02dea6939edd4d3564b5086e.tar.gz
Initial import of OpenSSH v2.1.
Diffstat (limited to 'crypto/openssh/auth-skey.c')
-rw-r--r--crypto/openssh/auth-skey.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/crypto/openssh/auth-skey.c b/crypto/openssh/auth-skey.c
index 3610a67..5f3fe9e 100644
--- a/crypto/openssh/auth-skey.c
+++ b/crypto/openssh/auth-skey.c
@@ -1,16 +1,16 @@
#include "includes.h"
-RCSID("$Id: auth-skey.c,v 1.5 1999/12/06 19:04:57 deraadt Exp $");
+RCSID("$Id: auth-skey.c,v 1.6 2000/04/14 10:30:29 markus Exp $");
#include "ssh.h"
#include "packet.h"
#include <sha1.h>
-/*
+/*
* try skey authentication,
- * return 1 on success, 0 on failure, -1 if skey is not available
+ * return 1 on success, 0 on failure, -1 if skey is not available
*/
-int
+int
auth_skey_password(struct passwd * pw, const char *password)
{
if (strncasecmp(password, "s/key", 5) == 0) {
@@ -43,18 +43,18 @@ auth_skey_password(struct passwd * pw, const char *password)
*/
static u_int32_t
hash_collapse(s)
- u_char *s;
+ u_char *s;
{
- int len, target;
+ int len, target;
u_int32_t i;
if ((strlen(s) % sizeof(u_int32_t)) == 0)
- target = strlen(s); /* Multiple of 4 */
+ target = strlen(s); /* Multiple of 4 */
else
target = strlen(s) - (strlen(s) % sizeof(u_int32_t));
-
+
for (i = 0, len = 0; len < target; len += 4)
- i ^= ROUND(s + len);
+ i ^= ROUND(s + len);
return i;
}
OpenPOWER on IntegriCloud