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:42:50 +0200
commit3ae01ff9f5b3e1f2ebded97ff36a705ae3b17b30 (patch)
tree823ecc62dcc3a7e01af2c85a852e5ba882393b94 /src/init.c
parent040a543f57107efc267b7b5b7352293dcb7d87d5 (diff)
downloadlibssh-3ae01ff9f5b3e1f2ebded97ff36a705ae3b17b30.tar.gz
libssh-3ae01ff9f5b3e1f2ebded97ff36a705ae3b17b30.tar.xz
libssh-3ae01ff9f5b3e1f2ebded97ff36a705ae3b17b30.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 21505db..241b861 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();