From 602ed60d0b4019377634fb95e922f2dd246c1e2a Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 4 Jan 2009 11:39:22 +0000 Subject: added NO_LIBGMP and NO_CRYPT to build a daemon without cryptosupport NOTE: with NO_LIBGMP the cipher and the keyderivation don't work until now --- 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 5b750b9..036eb72 100644 --- a/src/cipher.h +++ b/src/cipher.h @@ -35,8 +35,12 @@ #ifndef _CIPHER_H_ #define _CIPHER_H_ +#ifndef NO_CRYPT #include #include "key_derivation.h" +#else +typedef u_int8_t* key_derivation_t; +#endif enum cipher_type_enum { c_unknown, c_null, c_aes_ctr }; typedef enum cipher_type_enum cipher_type_t; @@ -46,7 +50,9 @@ struct cipher_struct { u_int16_t key_length_; buffer_t key_; buffer_t salt_; +#ifndef NO_CRYPT gcry_cipher_hd_t handle_; +#endif }; typedef struct cipher_struct cipher_t; @@ -58,9 +64,12 @@ int cipher_decrypt(cipher_t* c, key_derivation_t* kd, encrypted_packet_t* in, pl int32_t cipher_null_crypt(u_int8_t* in, u_int32_t ilen, u_int8_t* out, u_int32_t olen); + +#ifndef NO_CRYPT int cipher_aesctr_init(cipher_t* c); void cipher_aesctr_close(cipher_t* c); buffer_t cipher_aesctr_calc_ctr(cipher_t* c, key_derivation_t* kd, seq_nr_t seq_nr, sender_id_t sender_id, mux_t mux); int32_t cipher_aesctr_crypt(cipher_t* c, key_derivation_t* kd, u_int8_t* in, u_int32_t ilen, u_int8_t* out, u_int32_t olen, seq_nr_t seq_nr, sender_id_t sender_id, mux_t mux); +#endif #endif -- cgit v1.2.3