summaryrefslogtreecommitdiff
path: root/src/cryptinit.hpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2014-06-22 23:09:15 +0000
committerChristian Pointner <equinox@anytun.org>2014-06-22 23:09:15 +0000
commitfac90fc49e667b18522b442ff15edd3bb8eb804b (patch)
tree7530b98b4b7c50f0512184e9a2369a0b196306a7 /src/cryptinit.hpp
parentfixed typo in license header (diff)
parentimplemented key derivation using libnettle (diff)
merged nettle featuer branch to trunk
Diffstat (limited to 'src/cryptinit.hpp')
-rw-r--r--src/cryptinit.hpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/cryptinit.hpp b/src/cryptinit.hpp
index 9f9c5a5..d57f19e 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,21 @@ 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;
+#elif defined(USE_NETTLE)
return true;
+#else // USE_GCRYPT is the default
+ return initLibGCrypt();
#endif
+
#else
return true;
#endif