summaryrefslogtreecommitdiff
path: root/src/cipher.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-01-05 11:57:22 +0000
committerChristian Pointner <equinox@anytun.org>2009-01-05 11:57:22 +0000
commit11bb611ee9be10f2fc23e72883283d881669f97c (patch)
tree2d5dd00af374c5a50be94016eafd36585083d3ac /src/cipher.h
parentadded alternative implementation of key derivation using ssl crypto library (diff)
added ssl-crypto based implementation of cipher
Diffstat (limited to 'src/cipher.h')
-rw-r--r--src/cipher.h9
1 files changed, 9 insertions, 0 deletions
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 <gcrypt.h>
+#else
+#include <openssl/aes.h>
+#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;