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/keyDerivation.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/keyDerivation.h') diff --git a/src/keyDerivation.h b/src/keyDerivation.h index 5d433ca..926d35f 100644 --- a/src/keyDerivation.h +++ b/src/keyDerivation.h @@ -170,14 +170,17 @@ private: key_store_t key_store_[2][KD_LABEL_COUNT]; +#ifdef _MSC_VER + #pragma pack(push, 1) +#endif union ATTR_PACKED key_derivation_aesctr_ctr_union { u_int8_t buf_[CTR_LENGTH]; - struct ATTR_PACKED { + struct ATTR_PACKED { u_int8_t buf_[SALT_LENGTH]; u_int16_t zero_; } salt_; #ifndef ANYTUN_02_COMPAT - struct ATTR_PACKED { + struct ATTR_PACKED { u_int8_t fill_[SALT_LENGTH - sizeof(u_int8_t) - sizeof(seq_nr_t)]; u_int8_t label_; seq_nr_t r_; @@ -193,6 +196,9 @@ private: } params_; #endif } ctr_[2]; +#ifdef _MSC_VER + #pragma pack(pop) +#endif }; #endif -- cgit v1.2.3