Add global init/exit points, to do crypto initialization in one place.

By Lars Nordin.
This commit is contained in:
Simon Josefsson
2010-03-19 09:05:52 +01:00
parent 1b1b4ac387
commit 9ea5b0625e
9 changed files with 140 additions and 30 deletions

View File

@@ -457,7 +457,8 @@ libssh2_session_init_ex(LIBSSH2_ALLOC_FUNC((*my_alloc)),
session->api_block_mode = 1; /* blocking API by default */
_libssh2_debug(session, LIBSSH2_TRACE_TRANS,
"New session resource allocated");
libssh2_crypto_init();
if (!libssh2_initialized)
libssh2_init(0);
}
return session;
}