Add global init/exit points, to do crypto initialization in one place.
By Lars Nordin.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user