summaryrefslogtreecommitdiffstats
path: root/usr.bin/csup
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2011-12-24 12:16:38 +0000
committermarius <marius@FreeBSD.org>2011-12-24 12:16:38 +0000
commitce155038ce14cb96cb781b87d2d6dc0d94312a4a (patch)
treede57cae74fdf334ad26cc7d8113c58c114a2fc6d /usr.bin/csup
parent1c0bb02c84b89eb2f680e27b37e58dd05abc23c1 (diff)
downloadFreeBSD-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/csup')
-rw-r--r--usr.bin/csup/Makefile4
-rw-r--r--usr.bin/csup/auth.c1
-rw-r--r--usr.bin/csup/misc.c1
-rw-r--r--usr.bin/csup/misc.h12
4 files changed, 12 insertions, 6 deletions
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
OpenPOWER on IntegriCloud