From f5f25d171091e29d15773009d8f66769403c2ba7 Mon Sep 17 00:00:00 2001 From: dtucker Date: Thu, 28 Feb 2008 08:13:52 +0000 Subject: [PATCH] - (dtucker) [includes.h ssh-add.c ssh-agent.c ssh-keygen.c ssh.c sshd.c openbsd-compat/openssl-compat.{c,h}] Bug #1437 Move the OpenSSL compat header to after OpenSSL headers, since some versions of OpenSSL have SSLeay_add_all_algorithms as a macro already. --- ChangeLog | 4 ++++ includes.h | 1 - openbsd-compat/openssl-compat.c | 4 +++- openbsd-compat/openssl-compat.h | 4 ++-- ssh-add.c | 1 + ssh-agent.c | 1 + ssh-keygen.c | 1 + ssh.c | 1 + sshd.c | 2 ++ 9 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index dc761e4d..8841bce7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,10 @@ 20080228 - (dtucker) [configure.ac] Add -fstack-protector to LDFLAGS too, fixes linking problems on AIX with gcc 4.1.x. + - (dtucker) [includes.h ssh-add.c ssh-agent.c ssh-keygen.c ssh.c sshd.c + openbsd-compat/openssl-compat.{c,h}] Bug #1437 Move the OpenSSL compat + header to after OpenSSL headers, since some versions of OpenSSL have + SSLeay_add_all_algorithms as a macro already. 20080225 - (dtucker) [openbsd-compat/fake-rfc2553.h] rename ssh_gai_strerror hack diff --git a/includes.h b/includes.h index af231a9b..9fcf1b02 100644 --- a/includes.h +++ b/includes.h @@ -166,7 +166,6 @@ #include "platform.h" #include "openbsd-compat/openbsd-compat.h" #include "openbsd-compat/bsd-nextstep.h" -#include "openbsd-compat/openssl-compat.h" #include "entropy.h" diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c index 58faf63b..56449092 100644 --- a/openbsd-compat/openssl-compat.c +++ b/openbsd-compat/openssl-compat.c @@ -16,13 +16,15 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#define SSH_DONT_OVERLOAD_OPENSSL_FUNCS #include "includes.h" #ifdef USE_OPENSSL_ENGINE # include #endif +#define SSH_DONT_OVERLOAD_OPENSSL_FUNCS +#include "openssl-compat.h" + #ifdef SSH_OLD_EVP int ssh_EVP_CipherInit(EVP_CIPHER_CTX *evp, const EVP_CIPHER *type, diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h index e44f501f..6068bf21 100644 --- a/openbsd-compat/openssl-compat.h +++ b/openbsd-compat/openssl-compat.h @@ -79,8 +79,8 @@ extern const EVP_CIPHER *evp_acss(void); # ifdef SSLeay_add_all_algorithms # undef SSLeay_add_all_algorithms # endif -# define SSLeay_add_all_algorithms() ssh_SSLeay_add_all_algorithms() -#endif +# define SSLeay_add_all_algorithms() ssh_SSLeay_add_all_algorithms() +# endif int ssh_EVP_CipherInit(EVP_CIPHER_CTX *, const EVP_CIPHER *, unsigned char *, unsigned char *, int); diff --git a/ssh-add.c b/ssh-add.c index 7f654a97..7a43282f 100644 --- a/ssh-add.c +++ b/ssh-add.c @@ -42,6 +42,7 @@ #include #include +#include "openbsd-compat/openssl-compat.h" #include #include diff --git a/ssh-agent.c b/ssh-agent.c index f1794834..6f8727b3 100644 --- a/ssh-agent.c +++ b/ssh-agent.c @@ -51,6 +51,7 @@ #include #include +#include "openbsd-compat/openssl-compat.h" #include #include diff --git a/ssh-keygen.c b/ssh-keygen.c index adacbff0..69b16e6f 100644 --- a/ssh-keygen.c +++ b/ssh-keygen.c @@ -21,6 +21,7 @@ #include #include +#include "openbsd-compat/openssl-compat.h" #include #include diff --git a/ssh.c b/ssh.c index fe2f1adf..2ed76c9a 100644 --- a/ssh.c +++ b/ssh.c @@ -72,6 +72,7 @@ #include #include +#include "openbsd-compat/openssl-compat.h" #include "xmalloc.h" #include "ssh.h" diff --git a/sshd.c b/sshd.c index 27c38ba5..9144bbae 100644 --- a/sshd.c +++ b/sshd.c @@ -75,6 +75,8 @@ #include #include #include +#include "openbsd-compat/openssl-compat.h" + #ifdef HAVE_SECUREWARE #include #include -- 2.45.2