From e9b3ad73baf25fa780f853e40f91ce74f0381c76 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Tue, 17 Jan 2012 14:03:34 +1100 Subject: - (dtucker) [configure.ac mac.c openbsd-compat/openssl-compat.h] Add null implementation of HMAC_CTX_init for the benefit of old versions of OpenSSL that don't have it. --- ChangeLog | 5 +++++ configure.ac | 6 +++--- mac.c | 2 ++ openbsd-compat/openssl-compat.h | 7 ++++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a0655485..4bdc73ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +20120117 + - (dtucker) [configure.ac mac.c openbsd-compat/openssl-compat.h] Add + null implementation of HMAC_CTX_init for the benefit of old versions + of OpenSSL that don't have it. + 20111219 - OpenBSD CVS Sync - djm@cvs.openbsd.org 2011/12/02 00:41:56 diff --git a/configure.ac b/configure.ac index 5aeb7a8f..54fc7d0c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.485 2011/11/21 05:38:50 dtucker Exp $ +# $Id: configure.ac,v 1.486 2012/01/17 03:03:37 dtucker Exp $ # # Copyright (c) 1999-2004 Damien Miller # @@ -15,7 +15,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) -AC_REVISION($Revision: 1.485 $) +AC_REVISION($Revision: 1.486 $) AC_CONFIG_SRCDIR([ssh.c]) AC_LANG([C]) @@ -2205,7 +2205,7 @@ AC_LINK_IFELSE( ] ) -AC_CHECK_FUNCS([RSA_generate_key_ex DSA_generate_parameters_ex BN_is_prime_ex RSA_get_default_method]) +AC_CHECK_FUNCS([RSA_generate_key_ex DSA_generate_parameters_ex BN_is_prime_ex RSA_get_default_method HMAC_CTX_init]) AC_ARG_WITH([ssl-engine], [ --with-ssl-engine Enable OpenSSL (hardware) ENGINE support ], diff --git a/mac.c b/mac.c index da7b5d8b..332d3c62 100644 --- a/mac.c +++ b/mac.c @@ -44,6 +44,8 @@ #include "umac.h" +#include "openbsd-compat/openssl-compat.h" + #define SSH_EVP 1 /* OpenSSL EVP-based MAC */ #define SSH_UMAC 2 /* UMAC (not integrated with OpenSSL) */ diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h index c5fc24eb..a151eff3 100644 --- a/openbsd-compat/openssl-compat.h +++ b/openbsd-compat/openssl-compat.h @@ -1,4 +1,4 @@ -/* $Id: openssl-compat.h,v 1.19 2011/05/10 01:13:38 dtucker Exp $ */ +/* $Id: openssl-compat.h,v 1.20 2012/01/17 03:03:39 dtucker Exp $ */ /* * Copyright (c) 2005 Darren Tucker @@ -130,5 +130,10 @@ int ssh_EVP_CipherInit(EVP_CIPHER_CTX *, const EVP_CIPHER *, unsigned char *, int ssh_EVP_Cipher(EVP_CIPHER_CTX *, char *, char *, int); int ssh_EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *); void ssh_OpenSSL_add_all_algorithms(void); + +# ifndef HAVE_HMAC_CTX_INIT +# define HMAC_CTX_init(a) +# endif + #endif /* SSH_DONT_OVERLOAD_OPENSSL_FUNCS */ -- cgit v1.2.1