From 4dfdc66cab217db1c43f8f5db234a731900d85b0 Mon Sep 17 00:00:00 2001 From: markm Date: Thu, 24 Feb 2000 21:10:28 +0000 Subject: Use libcrypto instead of libdes. --- usr.sbin/keyserv/crypt_server.c | 12 ++++++------ usr.sbin/ppp/Makefile | 8 ++++++-- usr.sbin/ppp/chap_ms.c | 2 +- usr.sbin/pppd/Makefile | 8 ++++++-- usr.sbin/pppd/chap_ms.c | 2 +- 5 files changed, 20 insertions(+), 12 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/keyserv/crypt_server.c b/usr.sbin/keyserv/crypt_server.c index 79b7923..51024b6 100644 --- a/usr.sbin/keyserv/crypt_server.c +++ b/usr.sbin/keyserv/crypt_server.c @@ -170,11 +170,11 @@ static void *dlhandle; #define _PATH_USRLIB "/usr/lib" #endif -#ifndef LIBDES +#ifndef LIBCRYPTO #ifdef OBJFORMAT_ELF -#define LIBDES "libdes.so.3" +#define LIBCRYPTO "libcrypto.so.1" #else -#define LIBDES "libdes.so.3." +#define LIBCRYPTO "libcrypto.so.1." #endif /* OBJFORMAT_ELF */ #endif @@ -190,9 +190,9 @@ void load_des(warn, libpath) if (libpath == NULL) { #ifdef OBJFORMAT_ELF - snprintf(dlpath, sizeof(dlpath), "%s/%s", _PATH_USRLIB, LIBDES); + snprintf(dlpath, sizeof(dlpath), "%s/%s", _PATH_USRLIB, LIBCRYPTO); #else - len = strlen(LIBDES); + len = strlen(LIBCRYPTO); if ((dird = opendir(_PATH_USRLIB)) == NULL) err(1, "opendir(/usr/lib) failed"); @@ -200,7 +200,7 @@ void load_des(warn, libpath) /* must have a minor number */ if (strlen(dirp->d_name) <= len) continue; - if (!strncmp(dirp->d_name, LIBDES, len)) { + if (!strncmp(dirp->d_name, LIBCRYPTO, len)) { if (atoi((dirp->d_name + len + 1)) > minor) { minor = atoi((dirp->d_name + len + 1)); snprintf(dlpath,sizeof(dlpath),"%s/%s", diff --git a/usr.sbin/ppp/Makefile b/usr.sbin/ppp/Makefile index 480fb2e..6581761 100644 --- a/usr.sbin/ppp/Makefile +++ b/usr.sbin/ppp/Makefile @@ -37,8 +37,12 @@ DPADD+= ${LIBALIAS} DISTRIBUTION=des CFLAGS+=-DHAVE_DES SRCS+= chap_ms.c -LDADD+= -ldes -DPADD+= ${LIBDES} +LDADD+= -lcrypto +DPADD+= ${LIBCRYPTO} +.if defined(RSAREF) && ${RSAREF} == YES +LDADD+= -lRSAglue +DPADD+= ${LIBRSAGLUE} +.endif .endif .if defined(NORADIUS) diff --git a/usr.sbin/ppp/chap_ms.c b/usr.sbin/ppp/chap_ms.c index e1d495f..6530ef6 100644 --- a/usr.sbin/ppp/chap_ms.c +++ b/usr.sbin/ppp/chap_ms.c @@ -26,7 +26,7 @@ #include #include -#include +#include #include #include "chap_ms.h" diff --git a/usr.sbin/pppd/Makefile b/usr.sbin/pppd/Makefile index e994985..aef5bfc 100644 --- a/usr.sbin/pppd/Makefile +++ b/usr.sbin/pppd/Makefile @@ -32,8 +32,12 @@ DPADD+= ${LIBPCAP} DISTRIBUTION=des CFLAGS+=-DCHAPMS SRCS+= chap_ms.c -LDADD+= -ldes -DPADD+= ${LIBDES} +LDADD+= -lcrypto +DPADD+= ${LIBCRYPTO} +.if defined(RSAREF) && ${RSAREF} == YES +LDADD+= -lRSAglue +DPADD+= ${LIBRSAGLUE} +.endif .endif .if defined(RELEASE_CRUNCH) diff --git a/usr.sbin/pppd/chap_ms.c b/usr.sbin/pppd/chap_ms.c index 72fa676..c3e1f6e 100644 --- a/usr.sbin/pppd/chap_ms.c +++ b/usr.sbin/pppd/chap_ms.c @@ -54,7 +54,7 @@ static char rcsid[] = "$FreeBSD$"; #include "md4.h" #ifndef USE_CRYPT -#include +#include #endif typedef struct { -- cgit v1.1