From cb52017ad9024e4d72766a19f286addcdafc2374 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 14 Jun 2007 23:21:32 +1000 Subject: - (dtucker) [cipher-ctr.c umac.c openbsd-compat/openssl-compat.h] Move the USE_BUILTIN_RIJNDAEL compat goop to openssl-compat.h so it can be shared with umac.c. Allows building with OpenSSL 0.9.5 again including umac support. With tim@ djm@, ok djm. --- openbsd-compat/openssl-compat.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'openbsd-compat/openssl-compat.h') diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h index 9b5ccff5f..01efb9cfa 100644 --- a/openbsd-compat/openssl-compat.h +++ b/openbsd-compat/openssl-compat.h @@ -1,4 +1,4 @@ -/* $Id: openssl-compat.h,v 1.7 2007/03/05 07:25:20 dtucker Exp $ */ +/* $Id: openssl-compat.h,v 1.8 2007/06/14 13:21:33 dtucker Exp $ */ /* * Copyright (c) 2005 Darren Tucker @@ -22,6 +22,15 @@ #if OPENSSL_VERSION_NUMBER < 0x00906000L # define SSH_OLD_EVP # define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data) +# define USE_BUILTIN_RIJNDAEL +#endif + +#ifdef USE_BUILTIN_RIJNDAEL +# include "rijndael.h" +# define AES_KEY rijndael_ctx +# define AES_BLOCK_SIZE 16 +# define AES_encrypt(a, b, c) rijndael_encrypt(c, a, b) +# define AES_set_encrypt_key(a, b, c) rijndael_set_key(c, (char *)a, b, 1) #endif #if (OPENSSL_VERSION_NUMBER < 0x00907000L) || defined(OPENSSL_LOBOTOMISED_AES) -- cgit v1.2.3 From a2ed75582fb10a67424bca64775d0121631760fb Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 14 Jun 2007 23:38:39 +1000 Subject: - (dtucker) [openbsd-compat/openssl-compat.h] Merge USE_BUILTIN_RIJNDAEL sections. Fixes builds with early OpenSSL 0.9.6 versions. --- ChangeLog | 4 +++- openbsd-compat/openssl-compat.h | 13 +++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'openbsd-compat/openssl-compat.h') diff --git a/ChangeLog b/ChangeLog index dda00d04d..c1cbfd1cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,8 @@ USE_BUILTIN_RIJNDAEL compat goop to openssl-compat.h so it can be shared with umac.c. Allows building with OpenSSL 0.9.5 again including umac support. With tim@ djm@, ok djm. + - (dtucker) [openbsd-compat/openssl-compat.h] Merge USE_BUILTIN_RIJNDAEL + sections. Fixes builds with early OpenSSL 0.9.6 versions. 20070612 - (dtucker) OpenBSD CVS Sync @@ -3067,4 +3069,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.4700 2007/06/14 13:21:32 dtucker Exp $ +$Id: ChangeLog,v 1.4701 2007/06/14 13:38:39 dtucker Exp $ diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h index 01efb9cfa..cd7e366ad 100644 --- a/openbsd-compat/openssl-compat.h +++ b/openbsd-compat/openssl-compat.h @@ -1,4 +1,4 @@ -/* $Id: openssl-compat.h,v 1.8 2007/06/14 13:21:33 dtucker Exp $ */ +/* $Id: openssl-compat.h,v 1.9 2007/06/14 13:38:39 dtucker Exp $ */ /* * Copyright (c) 2005 Darren Tucker @@ -25,19 +25,16 @@ # define USE_BUILTIN_RIJNDAEL #endif +#if (OPENSSL_VERSION_NUMBER < 0x00907000L) || defined(OPENSSL_LOBOTOMISED_AES) +# define USE_BUILTIN_RIJNDAEL +#endif + #ifdef USE_BUILTIN_RIJNDAEL # include "rijndael.h" # define AES_KEY rijndael_ctx # define AES_BLOCK_SIZE 16 # define AES_encrypt(a, b, c) rijndael_encrypt(c, a, b) # define AES_set_encrypt_key(a, b, c) rijndael_set_key(c, (char *)a, b, 1) -#endif - -#if (OPENSSL_VERSION_NUMBER < 0x00907000L) || defined(OPENSSL_LOBOTOMISED_AES) -# define USE_BUILTIN_RIJNDAEL -#endif - -#ifdef USE_BUILTIN_RIJNDAEL # define EVP_aes_128_cbc evp_rijndael # define EVP_aes_192_cbc evp_rijndael # define EVP_aes_256_cbc evp_rijndael -- cgit v1.2.3 From 7dae3d296e685843f003038a7f1a9f8ef7f614bd Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 14 Jun 2007 23:47:31 +1000 Subject: - (dtucker) [openbsd-compat/openssl-compat.h] Remove redundant definition of USE_BUILTIN_RIJNDAEL since the <0.9.6 test is covered by the subsequent <0.9.7 test. --- ChangeLog | 5 ++++- openbsd-compat/openssl-compat.h | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'openbsd-compat/openssl-compat.h') diff --git a/ChangeLog b/ChangeLog index c1cbfd1cb..08d55cc54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ umac support. With tim@ djm@, ok djm. - (dtucker) [openbsd-compat/openssl-compat.h] Merge USE_BUILTIN_RIJNDAEL sections. Fixes builds with early OpenSSL 0.9.6 versions. + - (dtucker) [openbsd-compat/openssl-compat.h] Remove redundant definition + of USE_BUILTIN_RIJNDAEL since the <0.9.6 test is covered by the + subsequent <0.9.7 test. 20070612 - (dtucker) OpenBSD CVS Sync @@ -3069,4 +3072,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -$Id: ChangeLog,v 1.4701 2007/06/14 13:38:39 dtucker Exp $ +$Id: ChangeLog,v 1.4702 2007/06/14 13:47:31 dtucker Exp $ diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h index cd7e366ad..f1d2f19fc 100644 --- a/openbsd-compat/openssl-compat.h +++ b/openbsd-compat/openssl-compat.h @@ -1,4 +1,4 @@ -/* $Id: openssl-compat.h,v 1.9 2007/06/14 13:38:39 dtucker Exp $ */ +/* $Id: openssl-compat.h,v 1.10 2007/06/14 13:47:31 dtucker Exp $ */ /* * Copyright (c) 2005 Darren Tucker @@ -22,7 +22,6 @@ #if OPENSSL_VERSION_NUMBER < 0x00906000L # define SSH_OLD_EVP # define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data) -# define USE_BUILTIN_RIJNDAEL #endif #if (OPENSSL_VERSION_NUMBER < 0x00907000L) || defined(OPENSSL_LOBOTOMISED_AES) -- cgit v1.2.3