From ebcd87dae077ac376cba23c06cc8b365325e9616 Mon Sep 17 00:00:00 2001 From: jbasney Date: Fri, 23 Jan 2004 22:09:12 +0000 Subject: [PATCH] resync with vendor branch; should not have local modifications here --- openssh/cipher-3des1.c | 4 ++++ openssh/cipher-aes.c | 4 ++++ openssh/cipher-bf1.c | 5 +++++ openssh/cipher-ctr.c | 6 ++++++ openssh/openbsd-compat/fake-rfc2553.c | 4 ++++ openssh/openbsd-compat/fake-rfc2553.h | 2 +- 6 files changed, 24 insertions(+), 1 deletion(-) diff --git a/openssh/cipher-3des1.c b/openssh/cipher-3des1.c index f9a3523..6f9f5dd 100644 --- a/openssh/cipher-3des1.c +++ b/openssh/cipher-3des1.c @@ -29,6 +29,10 @@ RCSID("$OpenBSD: cipher-3des1.c,v 1.1 2003/05/15 03:08:29 markus Exp $"); #include "xmalloc.h" #include "log.h" +#if OPENSSL_VERSION_NUMBER < 0x00906000L +#define SSH_OLD_EVP +#endif + /* * This is used by SSH1: * diff --git a/openssh/cipher-aes.c b/openssh/cipher-aes.c index c41def6..7ba9501 100644 --- a/openssh/cipher-aes.c +++ b/openssh/cipher-aes.c @@ -31,6 +31,10 @@ RCSID("$OpenBSD: cipher-aes.c,v 1.1 2003/05/15 03:08:29 markus Exp $"); #include "xmalloc.h" #include "log.h" +#if OPENSSL_VERSION_NUMBER < 0x00906000L +#define SSH_OLD_EVP +#endif + #define RIJNDAEL_BLOCKSIZE 16 struct ssh_rijndael_ctx { diff --git a/openssh/cipher-bf1.c b/openssh/cipher-bf1.c index 64578ba..5af695c 100644 --- a/openssh/cipher-bf1.c +++ b/openssh/cipher-bf1.c @@ -28,6 +28,11 @@ RCSID("$OpenBSD: cipher-bf1.c,v 1.1 2003/05/15 03:08:29 markus Exp $"); #include #include "xmalloc.h" #include "log.h" + +#if OPENSSL_VERSION_NUMBER < 0x00906000L +#define SSH_OLD_EVP +#endif + /* * SSH1 uses a variation on Blowfish, all bytes must be swapped before * and after encryption/decryption. Thus the swap_bytes stuff (yuk). diff --git a/openssh/cipher-ctr.c b/openssh/cipher-ctr.c index a2bab5c..4f0814b 100644 --- a/openssh/cipher-ctr.c +++ b/openssh/cipher-ctr.c @@ -21,6 +21,10 @@ RCSID("$OpenBSD: cipher-ctr.c,v 1.2 2003/06/17 18:14:23 markus Exp $"); #include "log.h" #include "xmalloc.h" +#if OPENSSL_VERSION_NUMBER < 0x00906000L +#define SSH_OLD_EVP +#endif + #if OPENSSL_VERSION_NUMBER < 0x00907000L #include "rijndael.h" #define AES_KEY rijndael_ctx @@ -135,7 +139,9 @@ evp_aes_128_ctr(void) aes_ctr.init = ssh_aes_ctr_init; aes_ctr.cleanup = ssh_aes_ctr_cleanup; aes_ctr.do_cipher = ssh_aes_ctr; +#ifndef SSH_OLD_EVP aes_ctr.flags = EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_ALWAYS_CALL_INIT | EVP_CIPH_CUSTOM_IV; +#endif return (&aes_ctr); } diff --git a/openssh/openbsd-compat/fake-rfc2553.c b/openssh/openbsd-compat/fake-rfc2553.c index b9ac085..a8a9dd7 100644 --- a/openssh/openbsd-compat/fake-rfc2553.c +++ b/openssh/openbsd-compat/fake-rfc2553.c @@ -77,7 +77,11 @@ int getnameinfo(const struct sockaddr *sa, size_t salen, char *host, #endif /* !HAVE_GETNAMEINFO */ #ifndef HAVE_GAI_STRERROR +#ifdef HAVE_CONST_GAI_STRERROR_PROTO +const char * +#else char * +#endif gai_strerror(int err) { switch (err) { diff --git a/openssh/openbsd-compat/fake-rfc2553.h b/openssh/openbsd-compat/fake-rfc2553.h index 1ebabf9..955986b 100644 --- a/openssh/openbsd-compat/fake-rfc2553.h +++ b/openssh/openbsd-compat/fake-rfc2553.h @@ -137,7 +137,7 @@ int getaddrinfo(const char *, const char *, const struct addrinfo *, struct addrinfo **); #endif /* !HAVE_GETADDRINFO */ -#ifndef HAVE_GAI_STRERROR +#if !defined(HAVE_GAI_STRERROR) && !defined(HAVE_CONST_GAI_STRERROR_PROTO) char *gai_strerror(int); #endif /* !HAVE_GAI_STRERROR */ -- 2.45.2