diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-10-01 19:50:06 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-10-01 19:50:06 +0000 |
commit | 7ac91a91b39e776a2fc7ff9b8f1663445f2855f5 (patch) | |
tree | 0996ee44fa531a6cc75edbfcc5dfb39710e0c7bc /toolchain | |
parent | 57a70e8a644d10029d6e0d519d4b22139f64777d (diff) | |
download | upstream-7ac91a91b39e776a2fc7ff9b8f1663445f2855f5.tar.gz upstream-7ac91a91b39e776a2fc7ff9b8f1663445f2855f5.tar.bz2 upstream-7ac91a91b39e776a2fc7ff9b8f1663445f2855f5.zip |
musl: re-enable des crypto support, fixes pppd MPPE issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 47078
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/musl/patches/901-crypt_size_hack.patch | 62 |
1 files changed, 6 insertions, 56 deletions
diff --git a/toolchain/musl/patches/901-crypt_size_hack.patch b/toolchain/musl/patches/901-crypt_size_hack.patch index 635437f819..8cd7b1989c 100644 --- a/toolchain/musl/patches/901-crypt_size_hack.patch +++ b/toolchain/musl/patches/901-crypt_size_hack.patch @@ -1,24 +1,18 @@ --- a/src/crypt/crypt_r.c +++ b/src/crypt/crypt_r.c -@@ -16,17 +16,7 @@ char *__crypt_r(const char *key, const c - * use the structure to store any internal state, and treats - * it purely as a char buffer for storing the result. */ - char *output = (char *)data; -- if (salt[0] == '$' && salt[1] && salt[2]) { -- if (salt[1] == '1' && salt[2] == '$') -- return __crypt_md5(key, salt, output); +@@ -19,12 +19,6 @@ char *__crypt_r(const char *key, const c + if (salt[0] == '$' && salt[1] && salt[2]) { + if (salt[1] == '1' && salt[2] == '$') + return __crypt_md5(key, salt, output); - if (salt[1] == '2' && salt[3] == '$') - return __crypt_blowfish(key, salt, output); - if (salt[1] == '5' && salt[2] == '$') - return __crypt_sha256(key, salt, output); - if (salt[1] == '6' && salt[2] == '$') - return __crypt_sha512(key, salt, output); -- } -- return __crypt_des(key, salt, output); -+ return __crypt_md5(key, salt, output); + } + return __crypt_des(key, salt, output); } - - weak_alias(__crypt_r, crypt_r); --- a/src/crypt/crypt_sha512.c +++ b/src/crypt/crypt_sha512.c @@ -12,6 +12,7 @@ @@ -49,50 +43,6 @@ return "*"; } +#endif ---- a/src/crypt/crypt_des.c -+++ b/src/crypt/crypt_des.c -@@ -56,6 +56,7 @@ - #include <stdint.h> - #include <string.h> - -+#if 0 - struct expanded_key { - uint32_t l[16], r[16]; - }; -@@ -1016,3 +1017,4 @@ char *__crypt_des(const char *key, const - - return (setting[0]=='*') ? "x" : "*"; - } -+#endif ---- a/src/crypt/encrypt.c -+++ b/src/crypt/encrypt.c -@@ -16,6 +16,7 @@ static struct expanded_key __encrypt_key - - void setkey(const char *key) - { -+#if 0 - unsigned char bkey[8]; - int i, j; - -@@ -26,10 +27,12 @@ void setkey(const char *key) - } - - __des_setkey(bkey, &__encrypt_key); -+#endif - } - - void encrypt(char *block, int edflag) - { -+#if 0 - struct expanded_key decrypt_key, *key; - uint32_t b[2]; - int i, j; -@@ -57,4 +60,5 @@ void encrypt(char *block, int edflag) - for (i = 0; i < 2; i++) - for (j = 31; j >= 0; j--) - *p++ = b[i]>>j & 1; -+#endif - } --- a/src/crypt/crypt_sha256.c +++ b/src/crypt/crypt_sha256.c @@ -13,6 +13,7 @@ |