summaryrefslogtreecommitdiff
path: root/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c')
-rw-r--r--other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c b/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c
index dc519448..e8e06b55 100644
--- a/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c
+++ b/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c
@@ -347,6 +347,13 @@ int main(int argc, char *argv[])
347 IP ip; 347 IP ip;
348 ip_init(&ip, 0); 348 ip_init(&ip, 0);
349 DHT *dht = new_DHT(new_net_crypto(new_networking(ip, server_conf.port))); 349 DHT *dht = new_DHT(new_net_crypto(new_networking(ip, server_conf.port)));
350 Onion *onion = new_onion(dht);
351 Onion_Announce *onion_a = new_onion_announce(dht);
352
353 if (!(onion && onion_a)) {
354 printf("Something failed to initialize.\n");
355 exit(1);
356 }
350 /* Read the config file */ 357 /* Read the config file */
351 printf("PID file: %s\n", server_conf.pid_file); 358 printf("PID file: %s\n", server_conf.pid_file);
352 printf("Key file: %s\n", server_conf.keys_file); 359 printf("Key file: %s\n", server_conf.keys_file);
@@ -367,6 +374,10 @@ int main(int argc, char *argv[])
367 manage_keys(dht, server_conf.keys_file); 374 manage_keys(dht, server_conf.keys_file);
368 errno = tmperr; 375 errno = tmperr;
369 376
377 /* We want our DHT public key to be the same as our internal one since this is a bootstrap server */
378 memcpy(dht->self_public_key, dht->c->self_public_key, crypto_box_PUBLICKEYBYTES);
379 memcpy(dht->self_secret_key, dht->c->self_secret_key, crypto_box_SECRETKEYBYTES);
380
370 /* Public key */ 381 /* Public key */
371 int i; 382 int i;
372 printf("\nPublic Key: "); 383 printf("\nPublic Key: ");