summaryrefslogtreecommitdiffstats
path: root/src/init.c
diff options
context:
space:
mode:
authorOliver Stöneberg <oliverst@online.de>2011-04-26 16:06:46 -0700
committerAndreas Schneider <asn@cryptomilk.org>2011-05-01 19:43:57 +0200
commit30bdca07e90f2c28547f095211783588db212fba (patch)
tree62a7d9459616a6434738e9be5e3760c2d17d86c1 /src/init.c
parentb4b49cf3f6f7cfd74eb5325bea264863590731a7 (diff)
downloadlibssh-30bdca07e90f2c28547f095211783588db212fba.tar.gz
libssh-30bdca07e90f2c28547f095211783588db212fba.tar.xz
libssh-30bdca07e90f2c28547f095211783588db212fba.zip
init: Some initialization fixes.
- Check result of ssh_init() in privatekey_from_base64() - Moved code from ssh_finalize() to appropriate subroutines - Only initialize sockets once (caused mismatch of WSAStartup() and WSACleanup() calls and potential usage of bsd_poll when win_poll should be used)
Diffstat (limited to 'src/init.c')
-rw-r--r--src/init.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/init.c b/src/init.c
index 21505db1..241b8618 100644
--- a/src/init.c
+++ b/src/init.c
@@ -73,15 +73,6 @@ int ssh_init(void) {
int ssh_finalize(void) {
ssh_crypto_finalize();
ssh_socket_cleanup();
-#ifdef HAVE_LIBGCRYPT
- gcry_control(GCRYCTL_TERM_SECMEM);
-#elif defined HAVE_LIBCRYPTO
- EVP_cleanup();
- CRYPTO_cleanup_all_ex_data();
-#endif
-#ifdef _WIN32
- WSACleanup();
-#endif
/* It is important to finalize threading after CRYPTO because
* it still depends on it */
ssh_threads_finalize();