]> git.ozlabs.org Git - ppp.git/blobdiff - linux/mppe/sha1.c
Run ntlm_auth as the user that invoked pppd.
[ppp.git] / linux / mppe / sha1.c
index 79ef20d70b6a6e52930459b740879aaf17327521..a895c87363c3466baaed32ad0a1b08060201edc4 100644 (file)
@@ -19,7 +19,7 @@
 #if defined(__linux__)
 #include <asm/byteorder.h>
 #include <linux/string.h>
-#else if defined(__solaris__)
+#elif defined(__solaris__)
 #include <sys/isa_defs.h>
 #include <sys/ddi.h>
 #include <sys/sunddi.h>
@@ -29,7 +29,7 @@
 
 #include "sha1.h"
 
-static void SHA1_Transform(unsigned long[5], const unsigned char[64]);
+static void SHA1_Transform(unsigned int[5], const unsigned char[64]);
 
 #define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
 
@@ -57,12 +57,12 @@ static void SHA1_Transform(unsigned long[5], const unsigned char[64]);
 /* Hash a single 512-bit block. This is the core of the algorithm. */
 
 static void
-SHA1_Transform(unsigned long state[5], const unsigned char buffer[64])
+SHA1_Transform(unsigned int state[5], const unsigned char buffer[64])
 {
-    unsigned long a, b, c, d, e;
+    unsigned int a, b, c, d, e;
     typedef union {
        unsigned char c[64];
-       unsigned long l[16];
+       unsigned int l[16];
     } CHAR64LONG16;
     CHAR64LONG16 *block;
 
@@ -156,7 +156,7 @@ SHA1_Update(SHA1_CTX *context, const unsigned char *data, unsigned int len)
 void
 SHA1_Final(unsigned char digest[20], SHA1_CTX *context)
 {
-    unsigned long i, j;
+    unsigned int i, j;
     unsigned char finalcount[8];
 
     for (i = 0; i < 8; i++) {