OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line -... Line 1...
-   1 --- a/src/crypt/crypt_r.c
-   2 +++ b/src/crypt/crypt_r.c
-   3 @@ -19,12 +19,6 @@ char *__crypt_r(const char *key, const c
-   4 if (salt[0] == '$' && salt[1] && salt[2]) {
-   5 if (salt[1] == '1' && salt[2] == '$')
-   6 return __crypt_md5(key, salt, output);
-   7 - if (salt[1] == '2' && salt[3] == '$')
-   8 - return __crypt_blowfish(key, salt, output);
-   9 - if (salt[1] == '5' && salt[2] == '$')
-   10 - return __crypt_sha256(key, salt, output);
-   11 - if (salt[1] == '6' && salt[2] == '$')
-   12 - return __crypt_sha512(key, salt, output);
-   13 }
-   14 return __crypt_des(key, salt, output);
-   15 }
1 --- a/src/crypt/crypt_sha512.c 16 --- a/src/crypt/crypt_sha512.c
2 +++ b/src/crypt/crypt_sha512.c 17 +++ b/src/crypt/crypt_sha512.c
3 @@ -13,6 +13,17 @@ 18 @@ -12,6 +12,7 @@
-   19 #include <stdio.h>
4 #include <string.h> 20 #include <string.h>
5 #include <stdint.h> 21 #include <stdint.h>
-   22 +#if 0
Line 6... Line -...
6 -  
7 +#ifdef CRYPT_SIZE_HACK -  
8 +#include <errno.h> -  
9 + -  
10 +char *__crypt_sha512(const char *key, const char *setting, char *output) -  
11 +{ -  
12 + errno = ENOSYS; -  
13 + return NULL; -  
14 +} -  
15 + -  
16 +#else -  
17 + 23
18 /* public domain sha512 implementation based on fips180-3 */ 24 /* public domain sha512 implementation based on fips180-3 */
19 /* >=2^64 bits messages are not supported (about 2000 peta bytes) */ -  
20 25 /* >=2^64 bits messages are not supported (about 2000 peta bytes) */
21 @@ -369,3 +380,4 @@ char *__crypt_sha512(const char *key, co 26 @@ -369,3 +370,4 @@ char *__crypt_sha512(const char *key, co
22 return "*"; 27 return "*";
23 return p; 28 return p;
24 } 29 }
25 +#endif 30 +#endif
26 --- a/src/crypt/crypt_blowfish.c 31 --- a/src/crypt/crypt_blowfish.c
27 +++ b/src/crypt/crypt_blowfish.c 32 +++ b/src/crypt/crypt_blowfish.c
28 @@ -50,6 +50,17 @@ 33 @@ -50,6 +50,7 @@
29 #include <string.h> 34 #include <string.h>
Line 30... Line -...
30 #include <stdint.h> -  
31 -  
32 +#ifdef CRYPT_SIZE_HACK -  
33 +#include <errno.h> -  
34 + -  
35 +char *__crypt_blowfish(const char *key, const char *setting, char *output) -  
36 +{ -  
37 + errno = ENOSYS; -  
38 + return NULL; -  
39 +} 35 #include <stdint.h>
40 + -  
41 +#else 36
42 + 37 +#if 0
Line 43... Line 38...
43 typedef uint32_t BF_word; 38 typedef uint32_t BF_word;
Line 44... Line 39...
44 typedef int32_t BF_word_signed; 39 typedef int32_t BF_word_signed;
45 40
46 @@ -796,3 +807,4 @@ char *__crypt_blowfish(const char *key, 41 @@ -796,3 +797,4 @@ char *__crypt_blowfish(const char *key,
47 42
48 return "*"; 43 return "*";
49 } 44 }
50 +#endif 45 +#endif
51 --- a/src/crypt/crypt_sha256.c 46 --- a/src/crypt/crypt_sha256.c
Line 52... Line -...
52 +++ b/src/crypt/crypt_sha256.c -  
53 @@ -13,6 +13,17 @@ -  
54 #include <string.h> -  
55 #include <stdint.h> -  
56 -  
57 +#ifdef CRYPT_SIZE_HACK -  
58 +#include <errno.h> -  
59 + -  
60 +char *__crypt_sha256(const char *key, const char *setting, char *output) -  
61 +{ 47 +++ b/src/crypt/crypt_sha256.c
62 + errno = ENOSYS; -  
63 + return NULL; 48 @@ -13,6 +13,7 @@
Line 64... Line 49...
64 +} 49 #include <string.h>
65 + 50 #include <stdint.h>
66 +#else 51
67 + 52 +#if 0
68 /* public domain sha256 implementation based on fips180-3 */ 53 /* public domain sha256 implementation based on fips180-3 */
69 54