summaryrefslogtreecommitdiff
path: root/src/cipher.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2014-06-21 16:48:26 +0000
committerChristian Pointner <equinox@anytun.org>2014-06-21 16:48:26 +0000
commite8c117aa01ac48fa2cf022810543bd97a0e44e57 (patch)
tree2512d1d438fe4639ce51a3e867c54926fe9fcb29 /src/cipher.h
parentadded branch for new crypto library (diff)
refactored crypto lib selection
Diffstat (limited to 'src/cipher.h')
-rw-r--r--src/cipher.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cipher.h b/src/cipher.h
index 5758fde..d4506d4 100644
--- a/src/cipher.h
+++ b/src/cipher.h
@@ -38,9 +38,9 @@
#ifndef NO_CRYPT
#ifndef USE_SSL_CRYPTO
-#include <gcrypt.h>
-#else
#include <openssl/aes.h>
+#else // USE_GCRYPT is the default
+#include <gcrypt.h>
#endif
#include "key_derivation.h"
#else
@@ -94,11 +94,11 @@ union __attribute__((__packed__)) cipher_aesctr_ctr_union {
typedef union cipher_aesctr_ctr_union cipher_aesctr_ctr_t;
struct cipher_aesctr_param_struct {
-#ifndef USE_SSL_CRYPTO
- gcry_cipher_hd_t handle_;
-#else
+#ifdef USE_SSL_CRYPTO
AES_KEY aes_key_;
u_int8_t ecount_buf_[AES_BLOCK_SIZE];
+#else // USE_GCRYPT is the default
+ gcry_cipher_hd_t handle_;
#endif
cipher_aesctr_ctr_t ctr_;
};