Question about using NULL for public key and determining whether my distro built libssh2 against openssl

Will Cosgrove will at panic.com
Wed Sep 28 18:30:12 CEST 2022


I’m even the one who reviewed and landed it. Classic. Well, there is is. :-)

Will

> On Sep 28, 2022, at 12:55 AM, Bastien Durel via libssh2-devel <libssh2-devel at lists.haxx.se> wrote:
> 
> Le mardi 27 septembre 2022 à 15:52 -0700, Will Cosgrove via libssh2-
> devel a écrit :
>> There isn't currently a runtime check to get what backend libssh2 was
>> built against. 
>> 
>> This has come up from time to time but never been implemented.
>> 
>> Cheers,
>> Will
>> 
> 
> Actually, master has it : https://github.com/libssh2/libssh2/pull/643
> 
> 
> As a workaround, I'm using this cmake checks to detect engine at
> compile-time :
> 
> # Try to detect libssh2 crypto variant
> list(FIND Libssh2_STATIC_LIBRARIES "ssl" CRYPTO_LIBSSH2_OPENSSL)
> list(FIND Libssh2_STATIC_LIBRARIES "gpg-error" CRYPTO_LIBSSH2_GCRYPT)
> list(FIND Libssh2_STATIC_LIBRARIES "mbed" CRYPTO_LIBSSH2_MBEDTLS)
> list(FIND Libssh2_STATIC_LIBRARIES "wincng" CRYPTO_LIBSSH2_WINCNG)



More information about the libssh2-devel mailing list