Please find attached patch to make libssh2 have a clean way of 
initialize the library.
The patch adds a new file, global.c. The makefile.in is changes, but not 
the WIN32 files.
session.c is changed to call libssh2_init only if the global variable 
libssh2_initialized is zero. The implicit load och ciphers in openssl.c 
has been removed.
/Lars
 From libssh2.h:
/*
  * libssh2_init()
  *
  * Initialize the libssh2 functions. flags can be:
  * LIBSSH2_INIT_ALL:               Initialize everything
  * LIBSSH2_INIT_NO_CRYPTO_INIT:    Do not initialize the crypto library 
(ie.
  * OPENSSL_add_cipher_algoritms() for OpenSSL
  *
  * Returns 0 if succeeded, or a negative value for error.
  */
LIBSSH2_API int libssh2_init(int flags);
/*
  * libssh2_exit()
  *
  * Exit the libssh2 functions and free's all memory used internal.
  */
LIBSSH2_API void libssh2_exit();
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel