summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2009-03-07 22:22:35 +1100
committerDarren Tucker <dtucker@zip.com.au>2009-03-07 22:22:35 +1100
commit3e7e15f1bdc2ddd8fe4a389212c6b8db58e2b511 (patch)
treef8ad1aaf09d130d416d8b345f9e2ddc4d8f28c58
parent30ed668de0f7755934971f2e7e80b62073091624 (diff)
- (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.
-rw-r--r--ChangeLog3
-rw-r--r--configure.ac21
-rw-r--r--openbsd-compat/openssl-compat.c4
-rw-r--r--openbsd-compat/openssl-compat.h7
4 files changed, 30 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c982f5d2..be302d9b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,9 @@
7 to use them. Allows building with older OpenSSL versions. 7 to use them. Allows building with older OpenSSL versions.
8 - (dtucker) [configure.ac defines.h] Check for in_port_t and typedef if needed. 8 - (dtucker) [configure.ac defines.h] Check for in_port_t and typedef if needed.
9 - (dtucker) [configure.ac] Missing comma in type list. 9 - (dtucker) [configure.ac] Missing comma in type list.
10 - (dtucker) [configure.ac openbsd-compat/openssl-compat.{c,h}]
11 EVP_DigestUpdate does not exactly match the other OLD_EVP functions (eg
12 in openssl 0.9.6) so add an explicit test for it.
10 13
1120090306 1420090306
12 - (djm) OpenBSD CVS Sync 15 - (djm) OpenBSD CVS Sync
diff --git a/configure.ac b/configure.ac
index a2cb7a215..51fee9e6b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.417 2009/03/07 07:06:22 dtucker Exp $ 1# $Id: configure.ac,v 1.418 2009/03/07 11:22:35 dtucker Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -15,7 +15,7 @@
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 16
17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) 17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
18AC_REVISION($Revision: 1.417 $) 18AC_REVISION($Revision: 1.418 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20 20
21AC_CONFIG_HEADER(config.h) 21AC_CONFIG_HEADER(config.h)
@@ -2076,6 +2076,23 @@ int main(void) { exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);}
2076 ] 2076 ]
2077) 2077)
2078 2078
2079AC_MSG_CHECKING([if EVP_DigestUpdate returns an int])
2080AC_LINK_IFELSE(
2081 [AC_LANG_SOURCE([[
2082#include <string.h>
2083#include <openssl/evp.h>
2084int main(void) { if(EVP_DigestUpdate(NULL, NULL,0)) exit(0); }
2085 ]])],
2086 [
2087 AC_MSG_RESULT(yes)
2088 ],
2089 [
2090 AC_MSG_RESULT(no)
2091 AC_DEFINE(OPENSSL_EVP_DIGESTUPDATE_VOID, 1,
2092 [Define if EVP_DigestUpdate returns void])
2093 ]
2094)
2095
2079# Some systems want crypt() from libcrypt, *not* the version in OpenSSL, 2096# Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
2080# because the system crypt() is more featureful. 2097# because the system crypt() is more featureful.
2081if test "x$check_for_libcrypt_before" = "x1"; then 2098if test "x$check_for_libcrypt_before" = "x1"; then
diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c
index f5435784b..dd326c00f 100644
--- a/openbsd-compat/openssl-compat.c
+++ b/openbsd-compat/openssl-compat.c
@@ -1,4 +1,4 @@
1/* $Id: openssl-compat.c,v 1.7 2009/03/07 01:01:47 dtucker Exp $ */ 1/* $Id: openssl-compat.c,v 1.8 2009/03/07 11:22:35 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au> 4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au>
@@ -47,7 +47,9 @@ ssh_EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *evp)
47 EVP_CIPHER_CTX_cleanup(evp); 47 EVP_CIPHER_CTX_cleanup(evp);
48 return 1; 48 return 1;
49} 49}
50#endif
50 51
52#ifdef OPENSSL_EVP_DIGESTUPDATE_VOID
51int 53int
52ssh_EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt) 54ssh_EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *d, unsigned int cnt)
53{ 55{
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h
index 945a7a300..fcc762867 100644
--- a/openbsd-compat/openssl-compat.h
+++ b/openbsd-compat/openssl-compat.h
@@ -1,4 +1,4 @@
1/* $Id: openssl-compat.h,v 1.13 2009/03/07 01:01:47 dtucker Exp $ */ 1/* $Id: openssl-compat.h,v 1.14 2009/03/07 11:22:35 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au> 4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au>
@@ -78,9 +78,12 @@ extern const EVP_CIPHER *evp_acss(void);
78# define EVP_CipherInit(a,b,c,d,e) ssh_EVP_CipherInit((a),(b),(c),(d),(e)) 78# define EVP_CipherInit(a,b,c,d,e) ssh_EVP_CipherInit((a),(b),(c),(d),(e))
79# define EVP_Cipher(a,b,c,d) ssh_EVP_Cipher((a),(b),(c),(d)) 79# define EVP_Cipher(a,b,c,d) ssh_EVP_Cipher((a),(b),(c),(d))
80# define EVP_CIPHER_CTX_cleanup(a) ssh_EVP_CIPHER_CTX_cleanup((a)) 80# define EVP_CIPHER_CTX_cleanup(a) ssh_EVP_CIPHER_CTX_cleanup((a))
81# define EVP_DigestUpdate(a,b,c) ssh_EVP_DigestUpdate((a),(b),(c))
82# endif /* SSH_OLD_EVP */ 81# endif /* SSH_OLD_EVP */
83 82
83# ifdef OPENSSL_EVP_DIGESTUPDATE_VOID
84# define EVP_DigestUpdate(a,b,c) ssh_EVP_DigestUpdate((a),(b),(c))
85# endif
86
84# ifdef USE_OPENSSL_ENGINE 87# ifdef USE_OPENSSL_ENGINE
85# ifdef SSLeay_add_all_algorithms 88# ifdef SSLeay_add_all_algorithms
86# undef SSLeay_add_all_algorithms 89# undef SSLeay_add_all_algorithms