diff options
Diffstat (limited to 'toxcore/net_crypto.h')
-rw-r--r-- | toxcore/net_crypto.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h index e2e0fffb..dbbb295c 100644 --- a/toxcore/net_crypto.h +++ b/toxcore/net_crypto.h | |||
@@ -92,6 +92,7 @@ typedef struct { | |||
92 | uint64_t cookie_request_number; /* number used in the cookie request packets for this connection */ | 92 | uint64_t cookie_request_number; /* number used in the cookie request packets for this connection */ |
93 | uint8_t dht_public_key[crypto_box_PUBLICKEYBYTES]; /* The dht public key of the peer */ | 93 | uint8_t dht_public_key[crypto_box_PUBLICKEYBYTES]; /* The dht public key of the peer */ |
94 | uint8_t dht_public_key_set; /* True if the dht public key is set, false if it isn't. */ | 94 | uint8_t dht_public_key_set; /* True if the dht public key is set, false if it isn't. */ |
95 | uint64_t dht_public_key_timestamp; /* Timestamp of the last time we confirmed the key was correct. */ | ||
95 | 96 | ||
96 | uint8_t *temp_packet; /* Where the cookie request/handshake packet is stored while it is being sent. */ | 97 | uint8_t *temp_packet; /* Where the cookie request/handshake packet is stored while it is being sent. */ |
97 | uint16_t temp_packet_length; | 98 | uint16_t temp_packet_length; |
@@ -186,11 +187,13 @@ int accept_crypto_connection(Net_Crypto *c, New_Connection *n_c); | |||
186 | int new_crypto_connection(Net_Crypto *c, uint8_t *real_public_key); | 187 | int new_crypto_connection(Net_Crypto *c, uint8_t *real_public_key); |
187 | 188 | ||
188 | /* Set the DHT public key of the crypto connection. | 189 | /* Set the DHT public key of the crypto connection. |
190 | * timestamp is the time (current_time_monotonic()) at which the key was last confirmed belonging to | ||
191 | * the other peer. | ||
189 | * | 192 | * |
190 | * return -1 on failure. | 193 | * return -1 on failure. |
191 | * return 0 on success. | 194 | * return 0 on success. |
192 | */ | 195 | */ |
193 | int set_connection_dht_public_key(Net_Crypto *c, int crypt_connection_id, uint8_t *dht_public_key); | 196 | int set_connection_dht_public_key(Net_Crypto *c, int crypt_connection_id, uint8_t *dht_public_key, uint64_t timestamp); |
194 | 197 | ||
195 | /* Set the direct ip of the crypto connection. | 198 | /* Set the direct ip of the crypto connection. |
196 | * | 199 | * |