summaryrefslogtreecommitdiff
path: root/src/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cc')
-rw-r--r--src/util.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/util.cc b/src/util.cc
index 3d9e8548..7e7932ab 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -85,10 +85,8 @@
#include "SocketCore.h"
#include "Lock.h"
-#ifdef ENABLE_MESSAGE_DIGEST
-# include "MessageDigest.h"
-# include "message_digest_helper.h"
-#endif // ENABLE_MESSAGE_DIGEST
+#include "MessageDigest.h"
+#include "message_digest_helper.h"
// For libc6 which doesn't define ULLONG_MAX properly because of broken limits.h
#ifndef ULLONG_MAX
@@ -1641,14 +1639,10 @@ std::string fixTaintedBasename(const std::string& src)
void generateRandomKey(unsigned char* key)
{
-#ifdef ENABLE_MESSAGE_DIGEST
unsigned char bytes[40];
generateRandomData(bytes, sizeof(bytes));
message_digest::digest(key, 20, MessageDigest::sha1().get(), bytes,
sizeof(bytes));
-#else // !ENABLE_MESSAGE_DIGEST
- generateRandomData(key, 20);
-#endif // !ENABLE_MESSAGE_DIGEST
}
// Returns true is given numeric ipv4addr is in Private Address Space.