From 01ef67da5564e1dcb380adead3e7f869fa3be2c8 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 21 Jun 2014 18:26:51 +0000 Subject: added defines for nettle as crypto lib further improved selection of crypto lib --- src/cipher.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/cipher.h') diff --git a/src/cipher.h b/src/cipher.h index d4506d4..8221a3c 100644 --- a/src/cipher.h +++ b/src/cipher.h @@ -37,8 +37,10 @@ #define UANYTUN_cipher_h_INCLUDED #ifndef NO_CRYPT -#ifndef USE_SSL_CRYPTO +#if defined(USE_SSL_CRYPTO) #include +#elif defined(USE_NETTLE) +#include #else // USE_GCRYPT is the default #include #endif @@ -94,9 +96,12 @@ union __attribute__((__packed__)) cipher_aesctr_ctr_union { typedef union cipher_aesctr_ctr_union cipher_aesctr_ctr_t; struct cipher_aesctr_param_struct { -#ifdef USE_SSL_CRYPTO +#if defined(USE_SSL_CRYPTO) AES_KEY aes_key_; u_int8_t ecount_buf_[AES_BLOCK_SIZE]; +#elif defined(USE_NETTLE) + // TODO: nettle + #else // USE_GCRYPT is the default gcry_cipher_hd_t handle_; #endif -- cgit v1.2.3