aboutsummaryrefslogtreecommitdiff
path: root/src/liblzma/check
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2016-03-13 20:21:49 +0200
committerLasse Collin <lasse.collin@tukaani.org>2016-03-13 20:21:49 +0200
commitac398c3bafa6e4c80e20571373a96947db863b3d (patch)
tree4455bf3c9497d344386d662a67954ffe6d5adc6d /src/liblzma/check
parentUpdate THANKS. (diff)
downloadxz-ac398c3bafa6e4c80e20571373a96947db863b3d.tar.xz
liblzma: Disable external SHA-256 by default.
This is the sane thing to do. The conflict with OpenSSL on some OSes and especially that the OS-provided versions can be significantly slower makes it clear that it was a mistake to have the external SHA-256 support enabled by default. Those who want it can now pass --enable-external-sha256 to configure. INSTALL was updated with notes about OSes where this can be a bad idea. The SHA-256 detection code in configure.ac had some bugs that could lead to a build failure in some situations. These were fixed, although it doesn't matter that much now that the external SHA-256 is disabled by default. MINIX >= 3.2.0 uses NetBSD's libc and thus has SHA256_Init in libc instead of libutil. Support for the libutil version was removed.
Diffstat (limited to 'src/liblzma/check')
-rw-r--r--src/liblzma/check/check.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/liblzma/check/check.h b/src/liblzma/check/check.h
index b8902f05..3007d889 100644
--- a/src/liblzma/check/check.h
+++ b/src/liblzma/check/check.h
@@ -15,13 +15,12 @@
#include "common.h"
-// If either the data type or the function for external SHA-256 is missing,
-// use the internal SHA-256 code.
-#if !(defined(HAVE_CC_SHA256_CTX) || defined(HAVE_SHA256_CTX) \
- || defined(HAVE_SHA2_CTX)) \
- || !(defined(HAVE_CC_SHA256_INIT) \
- || defined(HAVE_SHA256_INIT) \
- || defined(HAVE_SHA256INIT))
+// If the function for external SHA-256 is missing, use the internal SHA-256
+// code. Due to how configure works, these defines can only get defined when
+// both a usable header and a type have already been found.
+#if !(defined(HAVE_CC_SHA256_INIT) \
+ || defined(HAVE_SHA256_INIT) \
+ || defined(HAVE_SHA256INIT))
# define HAVE_INTERNAL_SHA256 1
#endif
@@ -35,9 +34,6 @@
#elif defined(HAVE_SHA2_H)
# include <sys/types.h>
# include <sha2.h>
-#elif defined(HAVE_MINIX_SHA2_H)
-# include <sys/types.h>
-# include <minix/sha2.h>
#endif
#if defined(HAVE_INTERNAL_SHA256)