summaryrefslogtreecommitdiffstats
path: root/lib/libarchive
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2011-05-05 01:16:06 +0000
committerobrien <obrien@FreeBSD.org>2011-05-05 01:16:06 +0000
commit205c21e4af42644628c759967231c9df7e732e4e (patch)
tree3423e311222c95d27a0076cdfd104dd769fd2e9f /lib/libarchive
parent1eae0f51b91f796f51d1866d1cddcd8b0260c325 (diff)
downloadFreeBSD-src-205c21e4af42644628c759967231c9df7e732e4e.zip
FreeBSD-src-205c21e4af42644628c759967231c9df7e732e4e.tar.gz
libarchive is mixing libmd and libcrypto -- correct to use one or the other.
[mixing the two can be quite bad -- they define the same context structures, but with differing structure members (and sizes)] Update the hash function support comments, and update config_freebsd.h to match. Approved by: kientzle
Diffstat (limited to 'lib/libarchive')
-rw-r--r--lib/libarchive/Makefile7
-rw-r--r--lib/libarchive/archive_hash.h6
-rw-r--r--lib/libarchive/config_freebsd.h21
3 files changed, 24 insertions, 10 deletions
diff --git a/lib/libarchive/Makefile b/lib/libarchive/Makefile
index 38d7757..edb0915 100644
--- a/lib/libarchive/Makefile
+++ b/lib/libarchive/Makefile
@@ -2,8 +2,8 @@
.include <bsd.own.mk>
LIB= archive
-DPADD= ${LIBZ} ${LIBMD}
-LDADD= -lz -lmd
+DPADD= ${LIBZ}
+LDADD= -lz
DPADD+= ${LIBBZ2}
LDADD+= -lbz2
@@ -24,6 +24,9 @@ CFLAGS+= -I${.OBJDIR}
CFLAGS+= -DWITH_OPENSSL
DPADD+= ${LIBCRYPTO}
LDADD+= -lcrypto
+.else
+DPADD+= ${LIBMD}
+LDADD+= -lmd
.endif
# Headers to be installed in /usr/include
diff --git a/lib/libarchive/archive_hash.h b/lib/libarchive/archive_hash.h
index 9dc4d5e..3e10e8d 100644
--- a/lib/libarchive/archive_hash.h
+++ b/lib/libarchive/archive_hash.h
@@ -41,11 +41,11 @@
* - OpenBSD 4.4 and earlier have SHA2 in libc with _ after algorithm name
*
* DragonFly and FreeBSD (XXX not used yet):
- * - MD5 and SHA1 in libmd: without _ after algorithm name
- * - SHA256: with _ after algorithm name
+ * - MD5 in libmd: without _ after algorithm name
+ * - SHA{1,256,512} in libmd: with _ after algorithm name (conflicts w/OpenSSL!)
*
* OpenSSL:
- * - MD5, SHA1 and SHA2 in libcrypto: with _ after algorithm name
+ * - MD5, SHA1, SHA2, SHA{256,384,512} in libcrypto: with _ after algorithm name
*/
#if defined(HAVE_MD5_H) && defined(HAVE_MD5INIT)
diff --git a/lib/libarchive/config_freebsd.h b/lib/libarchive/config_freebsd.h
index ea5f2dc..20d5b93 100644
--- a/lib/libarchive/config_freebsd.h
+++ b/lib/libarchive/config_freebsd.h
@@ -47,8 +47,24 @@
#define HAVE_OPENSSL_MD5_H 1
#define HAVE_OPENSSL_RIPEMD_H 1
#define HAVE_OPENSSL_SHA_H 1
+#define HAVE_OPENSSL_SHA256_INIT 1
+#define HAVE_OPENSSL_SHA384_INIT 1
+#define HAVE_OPENSSL_SHA512_INIT 1
+#define HAVE_SHA256 1
#define HAVE_SHA384 1
#define HAVE_SHA512 1
+#else
+#define HAVE_MD5_H 1
+#define HAVE_MD5INIT 1
+#define HAVE_SHA_H 1
+#define HAVE_SHA1 1
+#define HAVE_SHA1_INIT 1
+#define HAVE_SHA256 1
+#define HAVE_SHA256_H 1
+#define HAVE_SHA256_INIT 1
+#define HAVE_SHA512 1
+#define HAVE_SHA512_H 1
+#define HAVE_SHA512_INIT 1
#endif
#define HAVE_BSDXML_H 1
@@ -88,7 +104,6 @@
#define HAVE_LUTIMES 1
#define HAVE_MALLOC 1
#define HAVE_MD5 1
-#define HAVE_MD5_H 1
#define HAVE_MEMMOVE 1
#define HAVE_MKDIR 1
#define HAVE_MKFIFO 1
@@ -101,10 +116,6 @@
#define HAVE_RMD160 1
#define HAVE_SELECT 1
#define HAVE_SETENV 1
-#define HAVE_SHA_H 1
-#define HAVE_SHA1 1
-#define HAVE_SHA256 1
-#define HAVE_SHA256_H 1
#define HAVE_SIGNAL_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDLIB_H 1
OpenPOWER on IntegriCloud