X-Git-Url: http://tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Ftincd.c;h=0f78e45a6239e3a02625d7309d04eb44e6be9cdd;hb=a9bdfb424e7a469d15156aa44bbe2fd0b8e28531;hp=c0be975ee8635e6c80763e5ed86d368c7e791c6b;hpb=40731d030fef793c6b6405efd9b3e64c26c00045;p=tinc diff --git a/src/tincd.c b/src/tincd.c index c0be975e..0f78e45a 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -31,18 +31,13 @@ #include #endif -#include -#include -#include -#include -#include - #include LZO1X_H #include #include "conf.h" #include "control.h" +#include "crypto.h" #include "device.h" #include "logger.h" #include "net.h" @@ -218,7 +213,7 @@ static void make_names(void) #endif if(!controlsocketname) - asprintf(&controlsocketname, LOCALSTATEDIR "/run/%s.control", identname); + asprintf(&controlsocketname, "%s/run/%s.control/socket", LOCALSTATEDIR, identname); if(!logfilename) asprintf(&logfilename, LOCALSTATEDIR "/log/%s.log", identname); @@ -295,12 +290,7 @@ int main(int argc, char **argv) /* Slllluuuuuuurrrrp! */ srand(time(NULL)); - RAND_load_file("/dev/urandom", 1024); - - ENGINE_load_builtin_engines(); - ENGINE_register_all_complete(); - - OpenSSL_add_all_algorithms(); + crypto_init(); if(!read_server_config()) return 1; @@ -353,7 +343,7 @@ end: exit_control(); #endif - EVP_cleanup(); - + crypto_exit(); + return status; }