- (dtucker) [configure.ac openbsd-compat/openssl-compat.{c,h}]

EVP_DigestUpdate does not exactly match the other OLD_EVP functions (eg
   in openssl 0.9.6) so add an explicit test for it.
This commit is contained in:
Darren Tucker 2009-03-07 22:22:35 +11:00
parent 30ed668de0
commit 3e7e15f1bd
4 changed files with 30 additions and 5 deletions

View File

@ -7,6 +7,9 @@
to use them. Allows building with older OpenSSL versions.
- (dtucker) [configure.ac defines.h] Check for in_port_t and typedef if needed.
- (dtucker) [configure.ac] Missing comma in type list.
- (dtucker) [configure.ac openbsd-compat/openssl-compat.{c,h}]
EVP_DigestUpdate does not exactly match the other OLD_EVP functions (eg
in openssl 0.9.6) so add an explicit test for it.
20090306
- (djm) OpenBSD CVS Sync

View File

@ -1,4 +1,4 @@
# $Id: configure.ac,v 1.417 2009/03/07 07:06:22 dtucker Exp $
# $Id: configure.ac,v 1.418 2009/03/07 11:22:35 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.417 $)
AC_REVISION($Revision: 1.418 $)
AC_CONFIG_SRCDIR([ssh.c])
AC_CONFIG_HEADER(config.h)
@ -2076,6 +2076,23 @@ int main(void) { exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);}
]
)
AC_MSG_CHECKING([if EVP_DigestUpdate returns an int])
AC_LINK_IFELSE(
[AC_LANG_SOURCE([[
#include <string.h>
#include <openssl/evp.h>
int main(void) { if(EVP_DigestUpdate(NULL, NULL,0)) exit(0); }
]])],
[
AC_MSG_RESULT(yes)
],
[
AC_MSG_RESULT(no)
AC_DEFINE(OPENSSL_EVP_DIGESTUPDATE_VOID, 1,
[Define if EVP_DigestUpdate returns void])
]
)
# Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
# because the system crypt() is more featureful.
if test "x$check_for_libcrypt_before" = "x1"; then

View File

@ -1,4 +1,4 @@
/* $Id: openssl-compat.c,v 1.7 2009/03/07 01:01:47 dtucker Exp $ */
/* $Id: openssl-compat.c,v 1.8 2009/03/07 11:22:35 dtucker Exp $ */
/*
* Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au>
@ -47,7 +47,9 @@ ssh_EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *evp)
EVP_CIPHER_CTX_cleanup(evp);
return 1;
}
#endif
#ifdef OPENSSL_EVP_DIGESTUPDATE_VOID
int
ssh_EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt)
{

View File

@ -1,4 +1,4 @@
/* $Id: openssl-compat.h,v 1.13 2009/03/07 01:01:47 dtucker Exp $ */
/* $Id: openssl-compat.h,v 1.14 2009/03/07 11:22:35 dtucker Exp $ */
/*
* Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au>
@ -78,9 +78,12 @@ extern const EVP_CIPHER *evp_acss(void);
# define EVP_CipherInit(a,b,c,d,e) ssh_EVP_CipherInit((a),(b),(c),(d),(e))
# define EVP_Cipher(a,b,c,d) ssh_EVP_Cipher((a),(b),(c),(d))
# define EVP_CIPHER_CTX_cleanup(a) ssh_EVP_CIPHER_CTX_cleanup((a))
# define EVP_DigestUpdate(a,b,c) ssh_EVP_DigestUpdate((a),(b),(c))
# endif /* SSH_OLD_EVP */
# ifdef OPENSSL_EVP_DIGESTUPDATE_VOID
# define EVP_DigestUpdate(a,b,c) ssh_EVP_DigestUpdate((a),(b),(c))
# endif
# ifdef USE_OPENSSL_ENGINE
# ifdef SSLeay_add_all_algorithms
# undef SSLeay_add_all_algorithms