diff options
author | Christian Pointner <equinox@anytun.org> | 2014-06-21 16:48:26 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2014-06-21 16:48:26 +0000 |
commit | e8c117aa01ac48fa2cf022810543bd97a0e44e57 (patch) | |
tree | 2512d1d438fe4639ce51a3e867c54926fe9fcb29 /src/key_derivation.h | |
parent | added branch for new crypto library (diff) |
refactored crypto lib selection
Diffstat (limited to 'src/key_derivation.h')
-rw-r--r-- | src/key_derivation.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/key_derivation.h b/src/key_derivation.h index 19fd88b..0d3c93f 100644 --- a/src/key_derivation.h +++ b/src/key_derivation.h @@ -36,10 +36,10 @@ #ifndef UANYTUN_key_derivation_h_INCLUDED #define UANYTUN_key_derivation_h_INCLUDED -#ifndef USE_SSL_CRYPTO -#include <gcrypt.h> -#else +#ifdef USE_SSL_CRYPTO #include <openssl/aes.h> +#else // USE_GCRYPT is the default +#include <gcrypt.h> #endif #include "options.h" @@ -103,11 +103,11 @@ union __attribute__((__packed__)) key_derivation_aesctr_ctr_union { typedef union key_derivation_aesctr_ctr_union key_derivation_aesctr_ctr_t; struct key_derivation_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 key_derivation_aesctr_ctr_t ctr_; }; |