summaryrefslogtreecommitdiff
path: root/src/cipher.h
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-01-16 22:59:45 +0000
committerChristian Pointner <equinox@anytun.org>2009-01-16 22:59:45 +0000
commitc658d303e580849fa77f669c4ece78bfc0ddd74b (patch)
tree68e782c47915ce37fa83db9c4e879f271c5dc0b8 /src/cipher.h
parentadded 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/cipher.h')
-rw-r--r--src/cipher.h8
1 files changed, 7 insertions, 1 deletions
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