From c0e091a52f8521d0cdcb9c22b4caa88bbe40e604 Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Tue, 3 Nov 2009 21:03:22 +0100 Subject: Fix openssl header inclusion caused cbc_encrypt to be redefined by an openssl macro --- include/libssh/crypto.h | 11 ++++++----- libssh/crypt.c | 3 +-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/libssh/crypto.h b/include/libssh/crypto.h index d838f24..00bb1c9 100644 --- a/include/libssh/crypto.h +++ b/include/libssh/crypto.h @@ -27,6 +27,12 @@ #define _CRYPTO_H_ #include "config.h" + +#ifdef HAVE_LIBGCRYPT +#include +#endif +#include "libssh/wrapper.h" + #ifdef cbc_encrypt #undef cbc_encrypt #endif @@ -34,11 +40,6 @@ #undef cbc_decrypt #endif -#ifdef HAVE_LIBGCRYPT -#include -#endif -#include "libssh/wrapper.h" - struct ssh_crypto_struct { bignum e,f,x,k,y; unsigned char session_id[SHA_DIGEST_LEN]; diff --git a/libssh/crypt.c b/libssh/crypt.c index 172d215..2e05146 100644 --- a/libssh/crypt.c +++ b/libssh/crypt.c @@ -37,10 +37,9 @@ #endif #include "libssh/priv.h" -#include "libssh/crypto.h" #include "libssh/session.h" #include "libssh/wrapper.h" - +#include "libssh/crypto.h" uint32_t packet_decrypt_len(ssh_session session, char *crypted){ uint32_t decrypted; -- cgit