diff options
author | Christian Pointner <equinox@anytun.org> | 2009-01-16 22:59:45 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2009-01-16 22:59:45 +0000 |
commit | c658d303e580849fa77f669c4ece78bfc0ddd74b (patch) | |
tree | 68e782c47915ce37fa83db9c4e879f271c5dc0b8 /src/keyDerivation.h | |
parent | added Log to stdout (diff) |
got rid of NOPACKED (struct alignment works now under Windows)
crypto works now under windows using openssl crypto
Diffstat (limited to 'src/keyDerivation.h')
-rw-r--r-- | src/keyDerivation.h | 10 |
1 files changed, 8 insertions, 2 deletions
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 |