diff options
author | marius <marius@FreeBSD.org> | 2011-12-24 12:16:38 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2011-12-24 12:16:38 +0000 |
commit | ce155038ce14cb96cb781b87d2d6dc0d94312a4a (patch) | |
tree | de57cae74fdf334ad26cc7d8113c58c114a2fc6d /usr.bin | |
parent | 1c0bb02c84b89eb2f680e27b37e58dd05abc23c1 (diff) | |
download | FreeBSD-src-ce155038ce14cb96cb781b87d2d6dc0d94312a4a.zip FreeBSD-src-ce155038ce14cb96cb781b87d2d6dc0d94312a4a.tar.gz |
On FreeBSD just use the MD5 implementation of libmd rather than that of
libcrypto so we don't need to relinquish csup when world is built without
OpenSSL.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/Makefile | 3 | ||||
-rw-r--r-- | usr.bin/csup/Makefile | 4 | ||||
-rw-r--r-- | usr.bin/csup/auth.c | 1 | ||||
-rw-r--r-- | usr.bin/csup/misc.c | 1 | ||||
-rw-r--r-- | usr.bin/csup/misc.h | 12 |
5 files changed, 14 insertions, 7 deletions
diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 87e8cad..d978eba 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -250,10 +250,11 @@ SUBDIR+= bc SUBDIR+= chkey SUBDIR+= dc SUBDIR+= newkey +.endif + .if ${MK_LIBTHR} != "no" SUBDIR+= csup .endif -.endif .if ${MK_LOCATE} != "no" SUBDIR+= locate diff --git a/usr.bin/csup/Makefile b/usr.bin/csup/Makefile index 7fda5b0..0cea821 100644 --- a/usr.bin/csup/Makefile +++ b/usr.bin/csup/Makefile @@ -33,8 +33,8 @@ CFLAGS+= -I. -I${.CURDIR} CFLAGS+= -DHAVE_FFLAGS -DNDEBUG WARNS?= 1 -DPADD= ${LIBCRYPTO} ${LIBZ} ${LIBPTHREAD} -LDADD= -lcrypto -lz -lpthread +DPADD= ${LIBMD} ${LIBZ} ${LIBPTHREAD} +LDADD= -lmd -lz -lpthread SCRIPTS= cpasswd.sh MAN= csup.1 cpasswd.1 diff --git a/usr.bin/csup/auth.c b/usr.bin/csup/auth.c index 7ae2500..c90d719 100644 --- a/usr.bin/csup/auth.c +++ b/usr.bin/csup/auth.c @@ -35,7 +35,6 @@ #include <netinet/in.h> #include <ctype.h> -#include <openssl/md5.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/usr.bin/csup/misc.c b/usr.bin/csup/misc.c index ae16b59..f4170df 100644 --- a/usr.bin/csup/misc.c +++ b/usr.bin/csup/misc.c @@ -28,7 +28,6 @@ #include <sys/types.h> #include <sys/stat.h> -#include <openssl/md5.h> #include <assert.h> #include <err.h> diff --git a/usr.bin/csup/misc.h b/usr.bin/csup/misc.h index a7ca3a6..b01b77a 100644 --- a/usr.bin/csup/misc.h +++ b/usr.bin/csup/misc.h @@ -28,10 +28,18 @@ #ifndef _MISC_H_ #define _MISC_H_ -#include <openssl/md5.h> - #include <sys/types.h> +#ifdef __FreeBSD__ +#include <md5.h> +#define MD5_DIGEST_LENGTH 16 +#define MD5_Init MD5Init +#define MD5_Final MD5Final +#define MD5_Update MD5Update +#else +#include <openssl/md5.h> +#endif + /* If we're not compiling in a C99 environment, define the C99 types. */ #if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 |