X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;ds=sidebyside;f=src%2Fnet_setup.c;h=7d88c326bbb8a43c9839e39e959c45102445a3b2;hb=1ebadf1a4e497f36d6d3a916b14b4f29c925fda5;hp=ed69808d6c1a882229c1299d586305b2bda0db75;hpb=1af8ca58b86f5956d6acd9f63083a84666647ef0;p=tinc diff --git a/src/net_setup.c b/src/net_setup.c index ed69808d..7d88c326 100644 --- a/src/net_setup.c +++ b/src/net_setup.c @@ -341,6 +341,7 @@ static bool read_rsa_private_key(void) { } #endif +#ifndef DISABLE_LEGACY static timeout_t keyexpire_timeout; static void keyexpire_handler(void *data) { @@ -349,6 +350,7 @@ static void keyexpire_handler(void *data) { keylifetime, rand() % 100000 }); } +#endif void regenerate_key(void) { logger(DEBUG_STATUS, LOG_INFO, "Expiring symmetric keys"); @@ -822,7 +824,7 @@ void device_disable(void) { Configure node_t myself and set up the local sockets (listen only) */ static bool setup_myself(void) { - char *name, *hostname, *cipher, *digest, *type; + char *name, *hostname, *type; char *address = NULL; bool port_specified = false; @@ -967,6 +969,8 @@ static bool setup_myself(void) { #ifndef DISABLE_LEGACY /* Generate packet encryption key */ + char *cipher; + if(!get_config_string(lookup_config(config_tree, "Cipher"), &cipher)) { cipher = xstrdup("aes-256-cbc"); } @@ -995,6 +999,8 @@ static bool setup_myself(void) { return false; } + char *digest; + if(!get_config_string(lookup_config(config_tree, "Digest"), &digest)) { digest = xstrdup("sha256"); }