use DES functions from openssl if possible
This commit is contained in:
parent
0cadc2a5f3
commit
2d58270a51
|
@ -1,8 +1,9 @@
|
|||
#
|
||||
# ipppd makefile for Linux
|
||||
# $Id: Makefile.in,v 1.18 2004/02/12 10:50:20 keil Exp $
|
||||
# $Id: Makefile.in,v 1.19 2004/08/30 14:56:36 keil Exp $
|
||||
#
|
||||
|
||||
HAVE_LIBSSL := @HAVE_LIBSSL@
|
||||
HAVE_LIBDES := @HAVE_LIBDES@
|
||||
HAVE_LIBCRYPT := @HAVE_LIBCRYPT@
|
||||
HAVE_SHADOW_H := @HAVE_SHADOW_H@
|
||||
|
@ -89,14 +90,22 @@ SOURCE = RELNOTES configure *.in $(PPPDSRCS) $(HEADERS) $(MANPAGES)
|
|||
|
||||
MSG = ''
|
||||
ifdef USE_MSCHAP
|
||||
ifeq ($(HAVE_LIBDES),1)
|
||||
ifeq ($(HAVE_LIBSSL),1)
|
||||
PPPDSRCS += md4.c chap_ms.c
|
||||
PPPDOBJS += md4.o chap_ms.o
|
||||
HEADERS += md4.h chap_ms.h
|
||||
COPTS += -DUSE_MSCHAP
|
||||
LIBS += -ldes
|
||||
COPTS += -DUSE_MSCHAP -DUSE_SSLDES
|
||||
LIBS += -lssl
|
||||
else
|
||||
MSG = '\n\nLibrary libdes not found, USE_MSCHAP disabled\n\n'
|
||||
ifeq ($(HAVE_LIBDES),1)
|
||||
PPPDSRCS += md4.c chap_ms.c
|
||||
PPPDOBJS += md4.o chap_ms.o
|
||||
HEADERS += md4.h chap_ms.h
|
||||
COPTS += -DUSE_MSCHAP
|
||||
LIBS += -ldes
|
||||
else
|
||||
MSG = '\n\nLibrary libdes not found, USE_MSCHAP disabled\n\n'
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
|
||||
#ifdef USE_MSCHAP
|
||||
char chap_ms_rcsid[] = "$Id: chap_ms.c,v 1.3 1997/05/19 10:15:41 hipp Exp $";
|
||||
char chap_ms_rcsid[] = "$Id: chap_ms.c,v 1.4 2004/08/30 14:56:36 keil Exp $";
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -34,7 +34,11 @@ char chap_ms_rcsid[] = "$Id: chap_ms.c,v 1.3 1997/05/19 10:15:41 hipp Exp $";
|
|||
#include "chap_ms.h"
|
||||
#include "md4.h"
|
||||
|
||||
#ifdef USE_SSLDES
|
||||
#include <ssl/des.h>
|
||||
#else
|
||||
#include <des.h>
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
u_char LANManResp[24];
|
||||
|
|
|
@ -95,4 +95,7 @@
|
|||
/* Define if you have the des library (-ldes). */
|
||||
#undef HAVE_LIBDES
|
||||
|
||||
/* Define if you have the ssl library (-lssl). */
|
||||
#undef HAVE_LIBSSL
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,6 +22,7 @@ AC_CHECK_LIB(bsd, daemon,HAVE_LIBBSD=1; AC_DEFINE(HAVE_LIBBSD),
|
|||
dnl Replace `main' with a function in -lcrypt:
|
||||
AC_CHECK_LIB(crypt, main,HAVE_LIBCRYPT=1; AC_DEFINE(HAVE_LIBCRYPT))
|
||||
AC_CHECK_LIB(des, des_ecb_encrypt, HAVE_LIBDES=1; AC_DEFINE(HAVE_LIBDES))
|
||||
AC_CHECK_LIB(ssl, DES_ecb_encrypt, HAVE_LIBSSL=1; AC_DEFINE(HAVE_LIBSSL))
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
|
@ -111,6 +112,7 @@ AC_ARG_ENABLE(ippp-filter,
|
|||
AC_SUBST(I4LVERSION)
|
||||
AC_SUBST(MANDATE)
|
||||
AC_SUBST(HAVE_LIBDES)
|
||||
AC_SUBST(HAVE_LIBSSL)
|
||||
AC_SUBST(HAVE_LIBCRYPT)
|
||||
AC_SUBST(HAVE_LIBBSD)
|
||||
AC_SUBST(HAVE_SHADOW_H)
|
||||
|
|
Loading…
Reference in New Issue