use DES functions from openssl if possible
This commit is contained in:
parent
3c88368111
commit
101ff42c8a
|
@ -3,6 +3,7 @@
|
|||
# $Id$
|
||||
#
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -34,7 +34,11 @@ char chap_ms_rcsid[] = "$Id$";
|
|||
#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