diff options
author | t3sserakt <t3ss@posteo.de> | 2020-06-05 16:37:10 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2020-06-05 16:37:10 +0200 |
commit | d22eacb13eb676b5c096b47c72a3fdbdb332d5a5 (patch) | |
tree | 9be948a80a6be2c56080be8826cba747de9dce57 /src/cadet/gnunet-service-cadet_connection.h | |
parent | 59f616a3c5d8a6873de0090d0db1413c8b9c411d (diff) | |
download | gnunet-d22eacb13eb676b5c096b47c72a3fdbdb332d5a5.tar.gz gnunet-d22eacb13eb676b5c096b47c72a3fdbdb332d5a5.zip |
Fixed bug #5822 by adding a monotonic time to the connection create message of a peer that want to start a KX, and the corresponding test #5823. Credits to dvn, lurchi and xrs for helpful discussions and coding.
Diffstat (limited to 'src/cadet/gnunet-service-cadet_connection.h')
-rw-r--r-- | src/cadet/gnunet-service-cadet_connection.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/cadet/gnunet-service-cadet_connection.h b/src/cadet/gnunet-service-cadet_connection.h index b05c3b72c..a9ebef567 100644 --- a/src/cadet/gnunet-service-cadet_connection.h +++ b/src/cadet/gnunet-service-cadet_connection.h | |||
@@ -182,7 +182,29 @@ void | |||
182 | GCC_handle_kx_auth (struct CadetConnection *cc, | 182 | GCC_handle_kx_auth (struct CadetConnection *cc, |
183 | const struct | 183 | const struct |
184 | GNUNET_CADET_TunnelKeyExchangeAuthMessage *msg); | 184 | GNUNET_CADET_TunnelKeyExchangeAuthMessage *msg); |
185 | struct CadetConnectionCreatePS | ||
186 | { | ||
187 | |||
188 | /** | ||
189 | * Purpose is #GNUNET_SIGNATURE_PURPOSE_CADET_CONNECTION_INITIATOR | ||
190 | */ | ||
191 | struct GNUNET_CRYPTO_EccSignaturePurpose purpose; | ||
185 | 192 | ||
193 | /** | ||
194 | * Time at the initiator when generating the signature. | ||
195 | * | ||
196 | * Note that the receiver MUST IGNORE the absolute time, and only interpret | ||
197 | * the value as a mononic time and reject "older" values than the last one | ||
198 | * observed. This is necessary as we do not want to require synchronized | ||
199 | * clocks and may not have a bidirectional communication channel. | ||
200 | * | ||
201 | * Even with this, there is no real guarantee against replay achieved here, | ||
202 | * unless the latest timestamp is persisted. Persistence should be | ||
203 | * provided via PEERSTORE if possible. | ||
204 | */ | ||
205 | struct GNUNET_TIME_AbsoluteNBO monotonic_time; | ||
206 | |||
207 | }; | ||
186 | 208 | ||
187 | /** | 209 | /** |
188 | * Performance metrics for a connection. | 210 | * Performance metrics for a connection. |