Subject: Re: Patch to use aes_*_ctr in newer versions of OpenSSL and #if LIBSSH2_DSA for more DSA-code

Re: Patch to use aes_*_ctr in newer versions of OpenSSL and #if LIBSSH2_DSA for more DSA-code

From: Tor Arntsen <tor_at_spacetec.no>
Date: Mon, 1 Mar 2010 13:01:30 +0100

On Mon, Mar 1, 2010 at 12:30, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Mon, 1 Mar 2010, Simon Josefsson wrote:
>
>> Great.  Btw, any particular reason you needed those fixes?  They don't
>> look required to me.
>
> Because the first one caused a compiler failure, and the second a compiler
> warning...

But if it's this change:

-#if LIBSSH2_AES_CTR && !HAVE_EVP_AES128_CTR
+#if defined(LIBSSH2_AES_CTR) && !defined(HAVE_EVP_AES128_CTR)

then there's something else wrong, because the code has:

src/openssl.h:
#if OPENSSL_VERSION_NUMBER >= 0x00907000L && !defined(OPENSSL_NO_AES)
# define LIBSSH2_AES_CTR 1
# define LIBSSH2_AES 1
#else
# define LIBSSH2_AES_CTR 0
# define LIBSSH2_AES 0
#endif

so the test _should_ test for 1, and not just for defined (i.e. the
change ef27023.. is wrong).
If it fails then that means cpp didn't go through the path above -
i.e. src/openssl.c didn't read src/openssl.h...

-Tor
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-03-01