diff options
Diffstat (limited to 'toxcore/onion_announce.c')
-rw-r--r-- | toxcore/onion_announce.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/onion_announce.c b/toxcore/onion_announce.c index 8150974b..2ca53896 100644 --- a/toxcore/onion_announce.c +++ b/toxcore/onion_announce.c | |||
@@ -61,7 +61,7 @@ int send_announce_request(DHT *dht, Node_format *nodes, uint8_t *public_key, uin | |||
61 | ONION_ANNOUNCE_SENDBACK_DATA_LENGTH); | 61 | ONION_ANNOUNCE_SENDBACK_DATA_LENGTH); |
62 | uint8_t packet[ANNOUNCE_REQUEST_SIZE]; | 62 | uint8_t packet[ANNOUNCE_REQUEST_SIZE]; |
63 | packet[0] = NET_PACKET_ANNOUNCE_REQUEST; | 63 | packet[0] = NET_PACKET_ANNOUNCE_REQUEST; |
64 | new_nonce(packet + 1); | 64 | random_nonce(packet + 1); |
65 | 65 | ||
66 | int len = encrypt_data(nodes[3].client_id, secret_key, packet + 1, plain, sizeof(plain), | 66 | int len = encrypt_data(nodes[3].client_id, secret_key, packet + 1, plain, sizeof(plain), |
67 | packet + 1 + crypto_box_NONCEBYTES + crypto_box_PUBLICKEYBYTES); | 67 | packet + 1 + crypto_box_NONCEBYTES + crypto_box_PUBLICKEYBYTES); |
@@ -253,7 +253,7 @@ static int handle_announce_request(void *object, IP_Port source, uint8_t *packet | |||
253 | to_net_family(&nodes_list[i].ip_port.ip); | 253 | to_net_family(&nodes_list[i].ip_port.ip); |
254 | 254 | ||
255 | uint8_t nonce[crypto_box_NONCEBYTES]; | 255 | uint8_t nonce[crypto_box_NONCEBYTES]; |
256 | new_nonce(nonce); | 256 | random_nonce(nonce); |
257 | 257 | ||
258 | uint8_t pl[1 + ONION_PING_ID_SIZE + sizeof(nodes_list)]; | 258 | uint8_t pl[1 + ONION_PING_ID_SIZE + sizeof(nodes_list)]; |
259 | 259 | ||