Author: marius
Date: Sat Dec 24 12:16:38 2011
New Revision: 228857
URL: http://svn.freebsd.org/changeset/base/228857

Log:
  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.

Modified:
  head/usr.bin/Makefile
  head/usr.bin/csup/Makefile
  head/usr.bin/csup/auth.c
  head/usr.bin/csup/misc.c
  head/usr.bin/csup/misc.h

Modified: head/usr.bin/Makefile
==============================================================================
--- head/usr.bin/Makefile       Sat Dec 24 01:32:01 2011        (r228856)
+++ head/usr.bin/Makefile       Sat Dec 24 12:16:38 2011        (r228857)
@@ -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

Modified: head/usr.bin/csup/Makefile
==============================================================================
--- head/usr.bin/csup/Makefile  Sat Dec 24 01:32:01 2011        (r228856)
+++ head/usr.bin/csup/Makefile  Sat Dec 24 12:16:38 2011        (r228857)
@@ -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

Modified: head/usr.bin/csup/auth.c
==============================================================================
--- head/usr.bin/csup/auth.c    Sat Dec 24 01:32:01 2011        (r228856)
+++ head/usr.bin/csup/auth.c    Sat Dec 24 12:16:38 2011        (r228857)
@@ -35,7 +35,6 @@
 #include <netinet/in.h>
 
 #include <ctype.h>
-#include <openssl/md5.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>

Modified: head/usr.bin/csup/misc.c
==============================================================================
--- head/usr.bin/csup/misc.c    Sat Dec 24 01:32:01 2011        (r228856)
+++ head/usr.bin/csup/misc.c    Sat Dec 24 12:16:38 2011        (r228857)
@@ -28,7 +28,6 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <openssl/md5.h>
 
 #include <assert.h>
 #include <err.h>

Modified: head/usr.bin/csup/misc.h
==============================================================================
--- head/usr.bin/csup/misc.h    Sat Dec 24 01:32:01 2011        (r228856)
+++ head/usr.bin/csup/misc.h    Sat Dec 24 12:16:38 2011        (r228857)
@@ -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
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to