On Sat, 17 Mar 2012, Paul Howarth wrote:
Thanks for this! How about the attached patch, is that enough to make it build and work without that work-around you found?No, same symptoms as not calling the function.
I simply cannot find any public docs for this strangeness from openssl (and it annoys me a lot). I guess we can instead switch to always use our implementation if AES_CTR is desired. See my second take on a patch (ditch the previous).
-- / daniel.haxx.se
From 765ad3b5a0abfb9ff2831aa6c04b32ba713b4cf3 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg <dan...@haxx.se> Date: Sat, 17 Mar 2012 22:45:56 +0100 Subject: [PATCH] aes: the init function fails when OpenSSL has AES support The internal init function only worked fine when the configure script didn't detect the OpenSSL AES_CTR function! Bug: http://www.libssh2.org/mail/libssh2-devel-archive-2012-03/0111.shtml Reported by: Paul Howarth --- src/openssl.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/openssl.c b/src/openssl.c index 40818c0..481982c 100644 --- a/src/openssl.c +++ b/src/openssl.c @@ -201,7 +201,7 @@ _libssh2_cipher_crypt(_libssh2_cipher_ctx * ctx, return ret == 1 ? 0 : 1; } -#if LIBSSH2_AES_CTR && !defined(HAVE_EVP_AES_128_CTR) +#if LIBSSH2_AES_CTR #include <openssl/aes.h> #include <openssl/evp.h> @@ -362,6 +362,8 @@ void _libssh2_init_aes_ctr(void) _libssh2_EVP_aes_256_ctr(); } +#else +void _libssh2_init_aes_ctr(void) {} #endif /* LIBSSH2_AES_CTR */ /* TODO: Optionally call a passphrase callback specified by the -- 1.7.9.1
_______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel