summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-08-08 14:40:11 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2007-08-08 14:40:11 +0000
commite85f9ccfd64b52419d47bd8f76c4b08eb2e0c422 (patch)
tree89fa75c665af0d1866d5f001677c95215622ff7c /m4
parent45f949c713d38e6e2141703cd9cb069c321a991f (diff)
2007-08-08 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
MessageDigestHelper is introduced in order to simplify the use of message digest. Removed repeated code. The message digest algorithm is now specified by string, like "sha1", "md5". * src/messageDigest.{h, cc} * src/MessageDigestHelper.{h, cc}: New class. * src/DefaultPieceStorage.cc * src/DefaultBtContext.{h, cc} (computeFastSet): New function. (setInfoHash): Added for unit testing. (setNumPieces): Added for unit testing. * src/DefaultBtInteractive.cc * src/BtPieceMessage.cc * src/Peer.cc * src/Checksum.h * src/message.h * src/IteratableChecksumValidator.h * src/ChunkChecksumValidator.{h, cc}: Use IteratableChecksumValidator inside it. * src/SegmentMan.{h, cc} (checkIntegrity): Removed. * src/IteratableChunkChecksumValidator.{h, cc} * src/Util.h (sha1Sum): Removed. (simpleMessageDigest): Removed. (fileChecksum): Removed. (computeFastSet): Removed. * src/ShaVisitor.cc * src/ChunkChecksum.h * src/DownloadCommand.cc Removed messageDigest virtual functions. * src/MultiDiskAdaptor.{h, cc} * src/DiskAdaptor.h * src/ByteArrayDiskWriter.h * src/DiskWriter.h * src/DiskAdaptorWriter.h * src/AbstractSingleDiskAdaptor.{h, cc} * src/AbstractDiskWriter.{h, cc} Fixed comilation error when message digest is disabled. * src/MetalinkEntry.{h, cc} * src/MetalinkRequestInfo.cc Removed srandom and random. * src/SimpleRandomizer.h Added size() virtual function to DiskAdaptor * src/MultiDiskAdaptor.h Fixed the bug that causes that files are not opened correctly in multi-file torrent. * src/TorrentRequestInfo.cc * src/MultiDiskAdaptor.cc Added SHA256 support * src/messageDigest.cc * src/Xml2MetalinkProcessor.cc Show supported message digest algorithms * src/main.cc Updated contact info. * src/main.cc
Diffstat (limited to 'm4')
-rw-r--r--m4/openssl.m411
1 files changed, 9 insertions, 2 deletions
diff --git a/m4/openssl.m4 b/m4/openssl.m4
index e9d16069..072d915d 100644
--- a/m4/openssl.m4
+++ b/m4/openssl.m4
@@ -18,17 +18,24 @@ CPPFLAGS_save=$CPPFLAGS
LIBS="-L$openssl_prefix_lib $LIBS"
CPPFLAGS="-I$openssl_prefix_include $CPPFLAGS"
-AC_CHECK_LIB([ssl], [SSL_library_init], [have_openssl=yes])
+AC_CHECK_LIB([ssl], [SSL_library_init], [have_openssl=yes; LIBS="-lssl $LIBS"])
if test "x$have_openssl" = "xyes"; then
have_openssl=no
- AC_CHECK_LIB([crypto], [main], [have_openssl=yes])
+ AC_CHECK_LIB([crypto], [main], [have_openssl=yes; LIBS="-lcrypto $LIBS"])
if test "x$have_openssl" = "xyes"; then
AC_DEFINE([HAVE_LIBSSL], [1], [Define to 1 if you have openssl.])
+ dnl check whether EVP_DigestInit_ex exists. Old openssl doesn't have it.
+ AC_CHECK_FUNCS([EVP_DigestInit_ex], [have_digestinit_ex=yes])
+ if test "x$have_digestinit_ex" = "x"; then
+ AC_DEFINE([HAVE_OLD_LIBSSL], [1], [Define to 1 if you have old openssl.])
+ fi
OPENSSL_LIBS="-L$openssl_prefix_lib -lssl -lcrypto"
OPENSSL_CFLAGS="-I$openssl_prefix_include"
AC_SUBST(OPENSSL_LIBS)
AC_SUBST(OPENSSL_CFLAGS)
+ dnl search for sha256 support
+ AC_CHECK_FUNCS([EVP_sha256])
fi
fi