diff options
Diffstat (limited to 'package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch')
-rw-r--r-- | package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch b/package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch index 5802d6158c..dc18156a04 100644 --- a/package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch +++ b/package/network/services/ppp/patches/600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch @@ -15,8 +15,8 @@ This reverts commit 3c7b86229f7bd2600d74db14b1fe5b3896be3875. --- a/pppd/Makefile.linux +++ b/pppd/Makefile.linux -@@ -35,10 +35,10 @@ endif - COPTS = -O2 -pipe -Wall -g +@@ -36,10 +36,10 @@ endif + LIBS = -lrt -# Uncomment the next line to include support for Microsoft's @@ -28,19 +28,19 @@ This reverts commit 3c7b86229f7bd2600d74db14b1fe5b3896be3875. # Don't use MSLANMAN unless you really know what you're doing. #MSLANMAN=y # Uncomment the next line to include support for MPPE. CHAPMS (above) must -@@ -141,8 +141,7 @@ endif +@@ -158,8 +158,7 @@ endif ifdef NEEDDES ifndef USE_CRYPT -CFLAGS += -I$(shell $(CC) --print-sysroot)/usr/include/openssl --LIBS += -lcrypto +-NEEDCRYPTOLIB = y +LIBS += -ldes $(LIBS) else CFLAGS += -DUSE_CRYPT=1 endif --- a/pppd/pppcrypt.c +++ b/pppd/pppcrypt.c -@@ -64,7 +64,7 @@ u_char *des_key; /* OUT 64 bit DES key w +@@ -62,7 +62,7 @@ MakeKey(u_char *key, u_char *des_key) des_key[7] = Get7Bits(key, 49); #ifndef USE_CRYPT @@ -49,7 +49,7 @@ This reverts commit 3c7b86229f7bd2600d74db14b1fe5b3896be3875. #endif } -@@ -158,25 +158,25 @@ u_char *clear; /* OUT 8 octets */ +@@ -147,30 +147,30 @@ DesDecrypt(u_char *cipher, u_char *clear } #else /* USE_CRYPT */ @@ -57,8 +57,7 @@ This reverts commit 3c7b86229f7bd2600d74db14b1fe5b3896be3875. +static des_key_schedule key_schedule; bool - DesSetkey(key) - u_char *key; + DesSetkey(u_char *key) { - DES_cblock des_key; + des_cblock des_key; @@ -69,10 +68,7 @@ This reverts commit 3c7b86229f7bd2600d74db14b1fe5b3896be3875. } bool --DesEncrypt(clear, cipher) -+DesEncrypt(clear, key, cipher) - u_char *clear; /* IN 8 octets */ - u_char *cipher; /* OUT 8 octets */ + DesEncrypt(u_char *clear, u_char *cipher) { - DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher, - &key_schedule, 1); @@ -81,9 +77,8 @@ This reverts commit 3c7b86229f7bd2600d74db14b1fe5b3896be3875. return (1); } -@@ -185,8 +185,8 @@ DesDecrypt(cipher, clear) - u_char *cipher; /* IN 8 octets */ - u_char *clear; /* OUT 8 octets */ + bool + DesDecrypt(u_char *cipher, u_char *clear) { - DES_ecb_encrypt((DES_cblock *)cipher, (DES_cblock *)clear, - &key_schedule, 0); |