aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-12-21 09:40:15 +0000
committerChristian Grothoff <christian@grothoff.org>2011-12-21 09:40:15 +0000
commitc4f0fe3ea5a5ca3ce1f7dfecef719da631e4c6ac (patch)
tree02e313a83c4416f07fadf650d33aff09dfe46130 /src/util
parent40e5092e9a5db88b4c9b62cb341596fbf6ce1cf8 (diff)
downloadgnunet-c4f0fe3ea5a5ca3ce1f7dfecef719da631e4c6ac.tar.gz
gnunet-c4f0fe3ea5a5ca3ce1f7dfecef719da631e4c6ac.zip
fixing 2012: network structure alignment now forced to be correct even on W32 using #pragma pack from gcc 4.x
Diffstat (limited to 'src/util')
-rw-r--r--src/util/crypto_ksk.c3
-rw-r--r--src/util/crypto_rsa.c4
-rw-r--r--src/util/resolver.h3
3 files changed, 8 insertions, 2 deletions
diff --git a/src/util/crypto_ksk.c b/src/util/crypto_ksk.c
index 60639a709..0f5a29507 100644
--- a/src/util/crypto_ksk.c
+++ b/src/util/crypto_ksk.c
@@ -463,6 +463,7 @@ generate_kblock_key (KBlock_secret_key *sk, unsigned int nbits,
463 gcry_mpi_release (g); 463 gcry_mpi_release (g);
464} 464}
465 465
466GNUNET_NETWORK_STRUCT_BEGIN
466 467
467/** 468/**
468 * Internal representation of the private key. 469 * Internal representation of the private key.
@@ -482,7 +483,7 @@ struct KskRsaPrivateKeyBinaryEncoded
482 uint16_t sizedmq1 GNUNET_PACKED; /* in big-endian! */ 483 uint16_t sizedmq1 GNUNET_PACKED; /* in big-endian! */
483 /* followed by the actual values */ 484 /* followed by the actual values */
484}; 485};
485 486GNUNET_NETWORK_STRUCT_END
486 487
487/** 488/**
488 * Deterministically (!) create a hostkey using only the 489 * Deterministically (!) create a hostkey using only the
diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c
index d29566ac8..418fe833b 100644
--- a/src/util/crypto_rsa.c
+++ b/src/util/crypto_rsa.c
@@ -53,6 +53,8 @@ struct GNUNET_CRYPTO_RsaPrivateKey
53}; 53};
54 54
55 55
56GNUNET_NETWORK_STRUCT_BEGIN
57
56/** 58/**
57 * GNUnet mandates a certain format for the encoding 59 * GNUnet mandates a certain format for the encoding
58 * of private RSA key information that is provided 60 * of private RSA key information that is provided
@@ -75,7 +77,7 @@ struct RsaPrivateKeyBinaryEncoded
75 uint16_t sizedmq1 GNUNET_PACKED; /* in big-endian! */ 77 uint16_t sizedmq1 GNUNET_PACKED; /* in big-endian! */
76 /* followed by the actual values */ 78 /* followed by the actual values */
77}; 79};
78 80GNUNET_NETWORK_STRUCT_END
79 81
80#define HOSTKEY_LEN 2048 82#define HOSTKEY_LEN 2048
81 83
diff --git a/src/util/resolver.h b/src/util/resolver.h
index 57cb68650..eca753a55 100644
--- a/src/util/resolver.h
+++ b/src/util/resolver.h
@@ -29,6 +29,8 @@
29 29
30#define DEBUG_RESOLVER GNUNET_EXTRA_LOGGING 30#define DEBUG_RESOLVER GNUNET_EXTRA_LOGGING
31 31
32GNUNET_NETWORK_STRUCT_BEGIN
33
32/** 34/**
33 * Request for the resolver. Followed by either 35 * Request for the resolver. Followed by either
34 * the "struct sockaddr" or the 0-terminated hostname. 36 * the "struct sockaddr" or the 0-terminated hostname.
@@ -59,5 +61,6 @@ struct GNUNET_RESOLVER_GetMessage
59 int32_t domain GNUNET_PACKED; 61 int32_t domain GNUNET_PACKED;
60 62
61}; 63};
64GNUNET_NETWORK_STRUCT_END
62 65
63#endif 66#endif