Use libcrypto instead of libdes.

This commit is contained in:
Mark Murray 2000-02-24 21:10:28 +00:00
parent 0ed9356caf
commit 512182f3ff
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=57451
5 changed files with 20 additions and 12 deletions

View File

@ -170,11 +170,11 @@ static void *dlhandle;
#define _PATH_USRLIB "/usr/lib" #define _PATH_USRLIB "/usr/lib"
#endif #endif
#ifndef LIBDES #ifndef LIBCRYPTO
#ifdef OBJFORMAT_ELF #ifdef OBJFORMAT_ELF
#define LIBDES "libdes.so.3" #define LIBCRYPTO "libcrypto.so.1"
#else #else
#define LIBDES "libdes.so.3." #define LIBCRYPTO "libcrypto.so.1."
#endif /* OBJFORMAT_ELF */ #endif /* OBJFORMAT_ELF */
#endif #endif
@ -190,9 +190,9 @@ void load_des(warn, libpath)
if (libpath == NULL) { if (libpath == NULL) {
#ifdef OBJFORMAT_ELF #ifdef OBJFORMAT_ELF
snprintf(dlpath, sizeof(dlpath), "%s/%s", _PATH_USRLIB, LIBDES); snprintf(dlpath, sizeof(dlpath), "%s/%s", _PATH_USRLIB, LIBCRYPTO);
#else #else
len = strlen(LIBDES); len = strlen(LIBCRYPTO);
if ((dird = opendir(_PATH_USRLIB)) == NULL) if ((dird = opendir(_PATH_USRLIB)) == NULL)
err(1, "opendir(/usr/lib) failed"); err(1, "opendir(/usr/lib) failed");
@ -200,7 +200,7 @@ void load_des(warn, libpath)
/* must have a minor number */ /* must have a minor number */
if (strlen(dirp->d_name) <= len) if (strlen(dirp->d_name) <= len)
continue; continue;
if (!strncmp(dirp->d_name, LIBDES, len)) { if (!strncmp(dirp->d_name, LIBCRYPTO, len)) {
if (atoi((dirp->d_name + len + 1)) > minor) { if (atoi((dirp->d_name + len + 1)) > minor) {
minor = atoi((dirp->d_name + len + 1)); minor = atoi((dirp->d_name + len + 1));
snprintf(dlpath,sizeof(dlpath),"%s/%s", snprintf(dlpath,sizeof(dlpath),"%s/%s",

View File

@ -37,8 +37,12 @@ DPADD+= ${LIBALIAS}
DISTRIBUTION=des DISTRIBUTION=des
CFLAGS+=-DHAVE_DES CFLAGS+=-DHAVE_DES
SRCS+= chap_ms.c SRCS+= chap_ms.c
LDADD+= -ldes LDADD+= -lcrypto
DPADD+= ${LIBDES} DPADD+= ${LIBCRYPTO}
.if defined(RSAREF) && ${RSAREF} == YES
LDADD+= -lRSAglue
DPADD+= ${LIBRSAGLUE}
.endif
.endif .endif
.if defined(NORADIUS) .if defined(NORADIUS)

View File

@ -26,7 +26,7 @@
#include <sys/types.h> #include <sys/types.h>
#include <ctype.h> #include <ctype.h>
#include <des.h> #include <openssl/des.h>
#include <string.h> #include <string.h>
#include "chap_ms.h" #include "chap_ms.h"

View File

@ -32,8 +32,12 @@ DPADD+= ${LIBPCAP}
DISTRIBUTION=des DISTRIBUTION=des
CFLAGS+=-DCHAPMS CFLAGS+=-DCHAPMS
SRCS+= chap_ms.c SRCS+= chap_ms.c
LDADD+= -ldes LDADD+= -lcrypto
DPADD+= ${LIBDES} DPADD+= ${LIBCRYPTO}
.if defined(RSAREF) && ${RSAREF} == YES
LDADD+= -lRSAglue
DPADD+= ${LIBRSAGLUE}
.endif
.endif .endif
.if defined(RELEASE_CRUNCH) .if defined(RELEASE_CRUNCH)

View File

@ -54,7 +54,7 @@ static char rcsid[] = "$FreeBSD$";
#include "md4.h" #include "md4.h"
#ifndef USE_CRYPT #ifndef USE_CRYPT
#include <des.h> #include <openssl/des.h>
#endif #endif
typedef struct { typedef struct {