www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: detect linkage against openssl or gcrypt

detect linkage against openssl or gcrypt

From: Jan David Mol <mol_at_astron.nl>
Date: Fri, 26 Jul 2013 13:28:17 +0200

Hi,

I'm using libssh2 in a multithreaded environment, and thus need to setup
the crypto library for multithreaded use. libssh2 can be linked against
openssl or gcrypt however, so my build environment needs to know which
one in order to trigger the proper initialisation code and avoid
unneeded dependencies.

Currently, the only way (I could find) to find out whether a
preinstalled libssh2 has been built against openssl or gcrypt is to
check the dependencies of the so file.

Apart from the fact that that approach does not work for static
libraries, wouldn't it be nicer if LIBSSH2_LIBGCRYPT or something
similar was exposed in libssh2's public interface. Such a construct
would allow one to query libssh2 instead of deriving this knowledge.

Cheers,
   Jan David Mol

PS: Thanks for writing this great library! We're actually using it as
part of production code on our BlueGene/P supercomputer, and it works great!
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2013-07-26

the libssh2 team