summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--INSTALL4
-rw-r--r--configure.ac22
-rw-r--r--openbsd-compat/openssl-compat.c20
-rw-r--r--openbsd-compat/openssl-compat.h15
5 files changed, 56 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 67369376f..2c0bd1e9d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
120060220
2 - (dtucker) [INSTALL configure.ac openbsd-compat/openssl-compat.{c,h}]
3 Add optional enabling of OpenSSL's (hardware) Engine support, via
4 configure --with-ssl-engine. Based in part on a diff by michal at
5 logix.cz.
6
120060219 720060219
2 - (dtucker) [Makefile.in configure.ac, added openbsd-compat/regress/] 8 - (dtucker) [Makefile.in configure.ac, added openbsd-compat/regress/]
3 Add first attempt at regress tests for compat library. ok djm@ 9 Add first attempt at regress tests for compat library. ok djm@
@@ -3863,4 +3869,4 @@
3863 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 3869 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
3864 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 3870 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
3865 3871
3866$Id: ChangeLog,v 1.4130 2006/02/19 11:50:20 dtucker Exp $ 3872$Id: ChangeLog,v 1.4131 2006/02/20 09:17:35 dtucker Exp $
diff --git a/INSTALL b/INSTALL
index 753d2d061..38f39473f 100644
--- a/INSTALL
+++ b/INSTALL
@@ -165,6 +165,8 @@ created.
165--with-ssl-dir=DIR allows you to specify where your OpenSSL libraries 165--with-ssl-dir=DIR allows you to specify where your OpenSSL libraries
166are installed. 166are installed.
167 167
168--with-ssl-engine enables OpenSSL's (hardware) ENGINE support
169
168--with-4in6 Check for IPv4 in IPv6 mapped addresses and convert them to 170--with-4in6 Check for IPv4 in IPv6 mapped addresses and convert them to
169real (AF_INET) IPv4 addresses. Works around some quirks on Linux. 171real (AF_INET) IPv4 addresses. Works around some quirks on Linux.
170 172
@@ -225,4 +227,4 @@ Please refer to the "reporting bugs" section of the webpage at
225http://www.openssh.com/ 227http://www.openssh.com/
226 228
227 229
228$Id: INSTALL,v 1.70 2005/04/24 07:52:23 dtucker Exp $ 230$Id: INSTALL,v 1.71 2006/02/20 09:17:36 dtucker Exp $
diff --git a/configure.ac b/configure.ac
index c4feaf752..eb24fa00e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.330 2006/02/19 11:50:20 dtucker Exp $ 1# $Id: configure.ac,v 1.331 2006/02/20 09:17:36 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.330 $) 18AC_REVISION($Revision: 1.331 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20 20
21AC_CONFIG_HEADER(config.h) 21AC_CONFIG_HEADER(config.h)
@@ -1834,6 +1834,24 @@ Also see contrib/findssl.sh for help identifying header/library mismatches.])
1834 ] 1834 ]
1835) 1835)
1836 1836
1837AC_ARG_WITH(ssl-engine,
1838 [ --with-ssl-engine Enable OpenSSL (hardware) ENGINE support ],
1839 [ if test "x$withval" != "xno" ; then
1840 AC_MSG_CHECKING(for OpenSSL ENGINE support)
1841 AC_TRY_COMPILE(
1842 [ #include <openssl/engine.h>],
1843 [
1844int main(void){ENGINE_load_builtin_engines();ENGINE_register_all_complete();}
1845 ],
1846 [ AC_MSG_RESULT(yes)
1847 AC_DEFINE(USE_OPENSSL_ENGINE, 1,
1848 [Enable OpenSSL engine support])
1849 ],
1850 [ AC_MSG_ERROR(OpenSSL ENGINE support not found)]
1851 )
1852 fi ]
1853)
1854
1837# Check for OpenSSL without EVP_aes_{192,256}_cbc 1855# Check for OpenSSL without EVP_aes_{192,256}_cbc
1838AC_MSG_CHECKING([whether OpenSSL has crippled AES support]) 1856AC_MSG_CHECKING([whether OpenSSL has crippled AES support])
1839AC_COMPILE_IFELSE( 1857AC_COMPILE_IFELSE(
diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c
index b690e8fe6..763f84734 100644
--- a/openbsd-compat/openssl-compat.c
+++ b/openbsd-compat/openssl-compat.c
@@ -1,4 +1,4 @@
1/* $Id: openssl-compat.c,v 1.2 2005/06/17 11:15:21 dtucker Exp $ */ 1/* $Id: openssl-compat.c,v 1.3 2006/02/20 09:17:36 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>
@@ -18,7 +18,11 @@
18 18
19#include "includes.h" 19#include "includes.h"
20 20
21#define SSH_DONT_REDEF_EVP 21#ifdef USE_OPENSSL_ENGINE
22# include <openssl/engine.h>
23#endif
24
25#define SSH_DONT_OVERLOAD_OPENSSL_FUNCS
22#include "openssl-compat.h" 26#include "openssl-compat.h"
23 27
24#ifdef SSH_OLD_EVP 28#ifdef SSH_OLD_EVP
@@ -44,3 +48,15 @@ ssh_EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *evp)
44 return 1; 48 return 1;
45} 49}
46#endif 50#endif
51
52void
53ssh_SSLeay_add_all_algorithms(void)
54{
55 SSLeay_add_all_algorithms();
56
57#ifdef USE_OPENSSL_ENGINE
58 /* Enable use of crypto hardware */
59 ENGINE_load_builtin_engines();
60 ENGINE_register_all_complete();
61#endif
62}
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h
index 8a015ec43..1196d71ea 100644
--- a/openbsd-compat/openssl-compat.h
+++ b/openbsd-compat/openssl-compat.h
@@ -1,4 +1,4 @@
1/* $Id: openssl-compat.h,v 1.3 2005/12/19 06:40:40 dtucker Exp $ */ 1/* $Id: openssl-compat.h,v 1.4 2006/02/20 09:17:36 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>
@@ -54,21 +54,22 @@ extern const EVP_CIPHER *evp_acss(void);
54 * define SSH_DONT_OVERLOAD_OPENSSL_FUNCS before including this file and 54 * define SSH_DONT_OVERLOAD_OPENSSL_FUNCS before including this file and
55 * implement the ssh_* equivalents. 55 * implement the ssh_* equivalents.
56 */ 56 */
57#ifdef SSH_OLD_EVP 57#ifndef SSH_DONT_OVERLOAD_OPENSSL_FUNCS
58
59# ifndef SSH_DONT_REDEF_EVP
60 58
59# ifdef SSH_OLD_EVP
61# ifdef EVP_Cipher 60# ifdef EVP_Cipher
62# undef EVP_Cipher 61# undef EVP_Cipher
63# endif 62# endif
64
65# define EVP_CipherInit(a,b,c,d,e) ssh_EVP_CipherInit((a),(b),(c),(d),(e)) 63# define EVP_CipherInit(a,b,c,d,e) ssh_EVP_CipherInit((a),(b),(c),(d),(e))
66# define EVP_Cipher(a,b,c,d) ssh_EVP_Cipher((a),(b),(c),(d)) 64# define EVP_Cipher(a,b,c,d) ssh_EVP_Cipher((a),(b),(c),(d))
67# define EVP_CIPHER_CTX_cleanup(a) ssh_EVP_CIPHER_CTX_cleanup((a)) 65# define EVP_CIPHER_CTX_cleanup(a) ssh_EVP_CIPHER_CTX_cleanup((a))
68# endif 66# endif /* SSH_OLD_EVP */
67
68# define SSLeay_add_all_algorithms() ssh_SSLeay_add_all_algorithms()
69void ssh_SSLeay_add_all_algorithms(void);
69 70
70int ssh_EVP_CipherInit(EVP_CIPHER_CTX *, const EVP_CIPHER *, unsigned char *, 71int ssh_EVP_CipherInit(EVP_CIPHER_CTX *, const EVP_CIPHER *, unsigned char *,
71 unsigned char *, int); 72 unsigned char *, int);
72int ssh_EVP_Cipher(EVP_CIPHER_CTX *, char *, char *, int); 73int ssh_EVP_Cipher(EVP_CIPHER_CTX *, char *, char *, int);
73int ssh_EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *); 74int ssh_EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *);
74#endif 75#endif /* SSH_DONT_OVERLOAD_OPENSSL_FUNCS */