summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/DHT_cryptosendfiletest.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/testing/DHT_cryptosendfiletest.c b/testing/DHT_cryptosendfiletest.c
index 787e279e..84d777cc 100644
--- a/testing/DHT_cryptosendfiletest.c
+++ b/testing/DHT_cryptosendfiletest.c
@@ -8,7 +8,7 @@
8 * NOTE: this program simulates 33% packet loss. 8 * NOTE: this program simulates 33% packet loss.
9 * 9 *
10 * This is how I compile it: gcc -O2 -Wall -o test ../core/Lossless_UDP.c ../core/network.c ../core/net_crypto.c ../core/DHT.c ../nacl/build/Linux/lib/amd64/* DHT_cryptosendfiletest.c 10 * This is how I compile it: gcc -O2 -Wall -o test ../core/Lossless_UDP.c ../core/network.c ../core/net_crypto.c ../core/DHT.c ../nacl/build/Linux/lib/amd64/* DHT_cryptosendfiletest.c
11* 11 *
12 * 12 *
13 * Command line arguments are the ip and port of a node (for bootstrapping). 13 * Command line arguments are the ip and port of a node (for bootstrapping).
14 * 14 *
@@ -167,8 +167,9 @@ int main(int argc, char *argv[])
167 { 167 {
168 uint8_t secret_nonce[crypto_box_NONCEBYTES]; 168 uint8_t secret_nonce[crypto_box_NONCEBYTES];
169 uint8_t public_key[crypto_box_PUBLICKEYBYTES]; 169 uint8_t public_key[crypto_box_PUBLICKEYBYTES];
170 inconnection = crypto_inbound(public_key, secret_nonce); 170 uint8_t session_key[crypto_box_PUBLICKEYBYTES];
171 inconnection = accept_crypto_inbound(inconnection, acceptedfriend_public_key, secret_nonce); 171 inconnection = crypto_inbound(public_key, secret_nonce, session_key);
172 inconnection = accept_crypto_inbound(inconnection, acceptedfriend_public_key, secret_nonce, session_key);
172 //inconnection = incoming_connection(); 173 //inconnection = incoming_connection();
173 if(inconnection != -1) 174 if(inconnection != -1)
174 { 175 {