mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 03:23:09 +03:00
vere: properly un/initialize openssl
This commit is contained in:
parent
c945c58375
commit
d71c26417a
@ -13,6 +13,9 @@
|
||||
#include <termios.h>
|
||||
#include <ncurses/term.h>
|
||||
#include <dirent.h>
|
||||
#include <openssl/conf.h>
|
||||
#include <openssl/engine.h>
|
||||
#include <openssl/err.h>
|
||||
#include <openssl/ssl.h>
|
||||
#include <h2o.h>
|
||||
#include <curl/curl.h>
|
||||
@ -744,12 +747,27 @@ main(c3_i argc,
|
||||
}
|
||||
}
|
||||
|
||||
/* Initialize OpenSSL for client and server
|
||||
*/
|
||||
SSL_library_init();
|
||||
SSL_load_error_strings();
|
||||
// Initialize OpenSSL for client and server
|
||||
//
|
||||
{
|
||||
SSL_library_init();
|
||||
SSL_load_error_strings();
|
||||
}
|
||||
|
||||
u3_daemon_commence();
|
||||
|
||||
// uninitialize OpenSSL
|
||||
//
|
||||
// see https://wiki.openssl.org/index.php/Library_Initialization
|
||||
//
|
||||
{
|
||||
ENGINE_cleanup();
|
||||
CONF_modules_unload(1);
|
||||
EVP_cleanup();
|
||||
CRYPTO_cleanup_all_ex_data();
|
||||
SSL_COMP_free_compression_methods();
|
||||
ERR_free_strings();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -928,8 +928,8 @@ u3_daemon_commence()
|
||||
}
|
||||
}
|
||||
|
||||
/* listen on command socket
|
||||
*/
|
||||
// listen on command socket
|
||||
//
|
||||
{
|
||||
c3_c buf_c[256];
|
||||
|
||||
@ -948,7 +948,6 @@ u3_daemon_commence()
|
||||
uv_run(u3L, UV_RUN_DEFAULT);
|
||||
|
||||
_daemon_loop_exit();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
/* u3_daemon_bail(): immediately shutdown.
|
||||
|
Loading…
Reference in New Issue
Block a user