ppp: Update to version 2.4.9
[openwrt/openwrt.git] / package / network / services / ppp / patches / 600-Revert-pppd-Use-openssl-for-the-DES-instead-of-the-l.patch
index 5802d6158c4154678d518766e21bcf7afc91b8b7..dc18156a0429fb864b9559da99834f4c4c64912c 100644 (file)
@@ -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);