diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-05-20 00:35:13 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-05-20 00:36:20 +0200 |
commit | 0be37e812d034754eb725701f237fbc81b973904 (patch) | |
tree | c50481209ec97b5dbbd075489255477c5e761d3d /src/cadet/cadet_protocol.h | |
parent | c227e3f00efb4b3677e9b85c0273a7bf5fbcb4a9 (diff) | |
download | gnunet-0be37e812d034754eb725701f237fbc81b973904.tar.gz gnunet-0be37e812d034754eb725701f237fbc81b973904.zip |
fix off-by-one error in cadet connection construction, also enforce better timeouts for retransmissions of handshake
Diffstat (limited to 'src/cadet/cadet_protocol.h')
-rw-r--r-- | src/cadet/cadet_protocol.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/cadet/cadet_protocol.h b/src/cadet/cadet_protocol.h index de0cec5d0..d4a40f9e5 100644 --- a/src/cadet/cadet_protocol.h +++ b/src/cadet/cadet_protocol.h | |||
@@ -28,6 +28,14 @@ | |||
28 | #ifndef CADET_PROTOCOL_H_ | 28 | #ifndef CADET_PROTOCOL_H_ |
29 | #define CADET_PROTOCOL_H_ | 29 | #define CADET_PROTOCOL_H_ |
30 | 30 | ||
31 | /** | ||
32 | * At best, enable when debugging #5328! | ||
33 | */ | ||
34 | #define DEBUG_KX 0 | ||
35 | #if DEBUG_KX | ||
36 | #warning NEVER run this in production! KX debugging is on! | ||
37 | #endif | ||
38 | |||
31 | #include "platform.h" | 39 | #include "platform.h" |
32 | #include "gnunet_util_lib.h" | 40 | #include "gnunet_util_lib.h" |
33 | #include "cadet.h" | 41 | #include "cadet.h" |
@@ -234,6 +242,22 @@ struct GNUNET_CADET_TunnelKeyExchangeMessage | |||
234 | */ | 242 | */ |
235 | struct GNUNET_CRYPTO_EcdhePublicKey ephemeral_key; | 243 | struct GNUNET_CRYPTO_EcdhePublicKey ephemeral_key; |
236 | 244 | ||
245 | #if DEBUG_KX | ||
246 | /** | ||
247 | * Sender's ephemeral public ECC key encoded in a | ||
248 | * format suitable for network transmission, as created | ||
249 | * using 'gcry_sexp_sprint'. | ||
250 | */ | ||
251 | struct GNUNET_CRYPTO_EcdhePrivateKey ephemeral_key_XXX; // for debugging KX-crypto! | ||
252 | |||
253 | /** | ||
254 | * Sender's ephemeral public ECC key encoded in a | ||
255 | * format suitable for network transmission, as created | ||
256 | * using 'gcry_sexp_sprint'. | ||
257 | */ | ||
258 | struct GNUNET_CRYPTO_EddsaPrivateKey private_key_XXX; // for debugging KX-crypto! | ||
259 | #endif | ||
260 | |||
237 | /** | 261 | /** |
238 | * Sender's next ephemeral public ECC key encoded in a | 262 | * Sender's next ephemeral public ECC key encoded in a |
239 | * format suitable for network transmission, as created | 263 | * format suitable for network transmission, as created |
@@ -256,6 +280,15 @@ struct GNUNET_CADET_TunnelKeyExchangeAuthMessage | |||
256 | */ | 280 | */ |
257 | struct GNUNET_CADET_TunnelKeyExchangeMessage kx; | 281 | struct GNUNET_CADET_TunnelKeyExchangeMessage kx; |
258 | 282 | ||
283 | #if DEBUG_KX | ||
284 | /** | ||
285 | * Received ephemeral public ECC key encoded in a | ||
286 | * format suitable for network transmission, as created | ||
287 | * using 'gcry_sexp_sprint'. | ||
288 | */ | ||
289 | struct GNUNET_CRYPTO_EcdhePublicKey r_ephemeral_key_XXX; // for debugging KX-crypto! | ||
290 | #endif | ||
291 | |||
259 | /** | 292 | /** |
260 | * KDF-proof that sender could compute the 3-DH, used in lieu of a | 293 | * KDF-proof that sender could compute the 3-DH, used in lieu of a |
261 | * signature or payload data. | 294 | * signature or payload data. |