summaryrefslogtreecommitdiff
path: root/src/keyDerivation.h
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/keyDerivation.h
parentadded feature branch for nettle support (diff)
improved selection of crypto lib
Diffstat (limited to 'src/keyDerivation.h')
-rw-r--r--src/keyDerivation.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/keyDerivation.h b/src/keyDerivation.h
index accb501..7f0c137 100644
--- a/src/keyDerivation.h
+++ b/src/keyDerivation.h
@@ -40,11 +40,13 @@
#include "options.h"
#ifndef NO_CRYPT
-#ifndef USE_SSL_CRYPTO
-#include <gcrypt.h>
-#else
+
+#if defined(USE_SSL_CRYPTO)
#include <openssl/aes.h>
+#else // USE_GCRYPT is the default
+#include <gcrypt.h>
#endif
+
#endif
#include <boost/archive/text_oarchive.hpp>
#include <boost/archive/text_iarchive.hpp>
@@ -168,11 +170,11 @@ private:
ar& boost::serialization::base_object<KeyDerivation>(*this);
}
-#ifndef USE_SSL_CRYPTO
- gcry_cipher_hd_t handle_[2];
-#else
+#if defined(USE_SSL_CRYPTO)
AES_KEY aes_key_[2];
uint8_t ecount_buf_[2][AES_BLOCK_SIZE];
+#else // USE_GCRYPT is the default
+ gcry_cipher_hd_t handle_[2];
#endif
#ifdef _MSC_VER