summaryrefslogtreecommitdiff
path: root/toxcore/net_crypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/net_crypto.h')
-rw-r--r--toxcore/net_crypto.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h
index cfa7c576..3245b6a2 100644
--- a/toxcore/net_crypto.h
+++ b/toxcore/net_crypto.h
@@ -111,7 +111,6 @@ typedef struct {
111 uint64_t cookie_request_number; /* number used in the cookie request packets for this connection */ 111 uint64_t cookie_request_number; /* number used in the cookie request packets for this connection */
112 uint8_t dht_public_key[crypto_box_PUBLICKEYBYTES]; /* The dht public key of the peer */ 112 uint8_t dht_public_key[crypto_box_PUBLICKEYBYTES]; /* The dht public key of the peer */
113 uint8_t dht_public_key_set; /* True if the dht public key is set, false if it isn't. */ 113 uint8_t dht_public_key_set; /* True if the dht public key is set, false if it isn't. */
114 uint64_t dht_public_key_timestamp; /* Timestamp of the last time we confirmed the key was correct. */
115 114
116 uint8_t *temp_packet; /* Where the cookie request/handshake packet is stored while it is being sent. */ 115 uint8_t *temp_packet; /* Where the cookie request/handshake packet is stored while it is being sent. */
117 uint16_t temp_packet_length; 116 uint16_t temp_packet_length;
@@ -240,19 +239,16 @@ int new_crypto_connection(Net_Crypto *c, const uint8_t *real_public_key);
240/* Copy friends DHT public key into dht_key. 239/* Copy friends DHT public key into dht_key.
241 * 240 *
242 * return 0 on failure (no key copied). 241 * return 0 on failure (no key copied).
243 * return timestamp on success (key copied). 242 * return 1 on success (key copied).
244 */ 243 */
245uint64_t get_connection_dht_key(const Net_Crypto *c, int crypt_connection_id, uint8_t *dht_public_key); 244unsigned int get_connection_dht_key(const Net_Crypto *c, int crypt_connection_id, uint8_t *dht_public_key);
246 245
247/* Set the DHT public key of the crypto connection. 246/* Set the DHT public key of the crypto connection.
248 * timestamp is the time (current_time_monotonic()) at which the key was last confirmed belonging to
249 * the other peer.
250 * 247 *
251 * return -1 on failure. 248 * return -1 on failure.
252 * return 0 on success. 249 * return 0 on success.
253 */ 250 */
254int set_connection_dht_public_key(Net_Crypto *c, int crypt_connection_id, const uint8_t *dht_public_key, 251int set_connection_dht_public_key(Net_Crypto *c, int crypt_connection_id, const uint8_t *dht_public_key);
255 uint64_t timestamp);
256 252
257/* Set the direct ip of the crypto connection. 253/* Set the direct ip of the crypto connection.
258 * 254 *