From c658d303e580849fa77f669c4ece78bfc0ddd74b Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 16 Jan 2009 22:59:45 +0000 Subject: got rid of NOPACKED (struct alignment works now under Windows) crypto works now under windows using openssl crypto --- src/cipher.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/cipher.h') diff --git a/src/cipher.h b/src/cipher.h index 1e3471b..b26416b 100644 --- a/src/cipher.h +++ b/src/cipher.h @@ -105,13 +105,16 @@ private: Buffer key_; Buffer salt_; +#ifdef _MSC_VER + #pragma pack(push, 1) +#endif union ATTR_PACKED cipher_aesctr_ctr_union { u_int8_t buf_[CTR_LENGTH]; struct ATTR_PACKED { u_int8_t buf_[SALT_LENGTH]; u_int16_t zero_; } salt_; - struct ATTR_PACKED { + struct ATTR_PACKED { u_int8_t fill_[SALT_LENGTH - sizeof(mux_t) - sizeof(sender_id_t) - 2 - sizeof(seq_nr_t)]; mux_t mux_; sender_id_t sender_id_; @@ -120,6 +123,9 @@ private: u_int16_t zero_; } params_; } ctr_; +#ifdef _MSC_VER + #pragma pack(pop) +#endif }; #endif -- cgit v1.2.3