From owner-svn-src-head@FreeBSD.ORG Thu May 5 01:16:07 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D9201065700; Thu, 5 May 2011 01:16:07 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F314B8FC15; Thu, 5 May 2011 01:16:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p451G69d075209; Thu, 5 May 2011 01:16:06 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p451G6LV075205; Thu, 5 May 2011 01:16:06 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201105050116.p451G6LV075205@svn.freebsd.org> From: "David E. O'Brien" Date: Thu, 5 May 2011 01:16:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r221472 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 May 2011 01:16:07 -0000 Author: obrien Date: Thu May 5 01:16:06 2011 New Revision: 221472 URL: http://svn.freebsd.org/changeset/base/221472 Log: 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 Modified: head/lib/libarchive/Makefile head/lib/libarchive/archive_hash.h head/lib/libarchive/config_freebsd.h Modified: head/lib/libarchive/Makefile ============================================================================== --- head/lib/libarchive/Makefile Thu May 5 01:09:42 2011 (r221471) +++ head/lib/libarchive/Makefile Thu May 5 01:16:06 2011 (r221472) @@ -2,8 +2,8 @@ .include 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 Modified: head/lib/libarchive/archive_hash.h ============================================================================== --- head/lib/libarchive/archive_hash.h Thu May 5 01:09:42 2011 (r221471) +++ head/lib/libarchive/archive_hash.h Thu May 5 01:16:06 2011 (r221472) @@ -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) Modified: head/lib/libarchive/config_freebsd.h ============================================================================== --- head/lib/libarchive/config_freebsd.h Thu May 5 01:09:42 2011 (r221471) +++ head/lib/libarchive/config_freebsd.h Thu May 5 01:16:06 2011 (r221472) @@ -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