From 11bb611ee9be10f2fc23e72883283d881669f97c Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Mon, 5 Jan 2009 11:57:22 +0000 Subject: added ssl-crypto based implementation of cipher --- src/cipher.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/cipher.h') diff --git a/src/cipher.h b/src/cipher.h index 2cf45d6..ae2c21d 100644 --- a/src/cipher.h +++ b/src/cipher.h @@ -36,7 +36,11 @@ #define _CIPHER_H_ #ifndef NO_CRYPT +#ifndef USE_SSL_CRYPTO #include +#else +#include +#endif #include "key_derivation.h" #else typedef u_int8_t key_derivation_t; @@ -87,7 +91,12 @@ 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 + AES_KEY aes_key_; + u_int8_t ecount_buf[AES_BLOCK_SIZE]; +#endif cipher_aesctr_ctr_t ctr_; }; typedef struct cipher_aesctr_param_struct cipher_aesctr_param_t; -- cgit v1.2.3