summaryrefslogtreecommitdiff
path: root/src/cryptinit.hpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2014-06-22 21:26:20 +0000
committerChristian Pointner <equinox@anytun.org>2014-06-22 21:26:20 +0000
commit79d2ca974fe095ded71de6384237f1799ab422d8 (patch)
tree889d1b0f8dca3d51374e6df576983f80a7ae8009 /src/cryptinit.hpp
parentadded feature branch for nettle support (diff)
improved selection of crypto lib
Diffstat (limited to 'src/cryptinit.hpp')
-rw-r--r--src/cryptinit.hpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/cryptinit.hpp b/src/cryptinit.hpp
index 9f9c5a5..e684a13 100644
--- a/src/cryptinit.hpp
+++ b/src/cryptinit.hpp
@@ -34,7 +34,8 @@
#define ANYTUN_cryptinit_hpp_INCLUDED
#ifndef NO_CRYPT
-#ifndef USE_SSL_CRYPTO
+
+#if defined(USE_GCRYPT)
#include <gcrypt.h>
// boost thread callbacks for libgcrypt
@@ -104,16 +105,19 @@ bool initLibGCrypt()
return true;
}
#endif
+
#endif
bool initCrypto()
{
#ifndef NO_CRYPT
-#ifndef USE_SSL_CRYPTO
- return initLibGCrypt();
-#else
+
+#if defined(USE_SSL_CRYPTO)
return true;
+#else // USE_GCRYPT is the default
+ return initLibGCrypt();
#endif
+
#else
return true;
#endif