]> andersk Git - openssh.git/commitdiff
- (dtucker) [cipher-ctr.c umac.c openbsd-compat/openssl-compat.h] Move the
authordtucker <dtucker>
Thu, 14 Jun 2007 13:21:32 +0000 (13:21 +0000)
committerdtucker <dtucker>
Thu, 14 Jun 2007 13:21:32 +0000 (13:21 +0000)
   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.

ChangeLog
cipher-ctr.c
openbsd-compat/openssl-compat.h
umac.c

index dc53199839b141adc169543bfd22dfca260a1aec..c98f29634c5d4e5bc37aeb09bdecf6100bd02114 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+20070614
+ - (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.
+
 20070612
  - (dtucker) OpenBSD CVS Sync
    - markus@cvs.openbsd.org 2007/06/11 09:14:00
index b24f3a4288662108d0aa67e99e0b4cc86df22d61..3b86cc10bc69aae00567b76d5f7b6ed77dff3b06 100644 (file)
 /* compatibility with old or broken OpenSSL versions */
 #include "openbsd-compat/openssl-compat.h"
 
-#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)
-#else
+#ifndef USE_BUILTIN_RIJNDAEL
 #include <openssl/aes.h>
 #endif
 
index a37f1473a3ba44ea3d43017ea3ace6f324f6bbe2..fa6962c956eed5d186d904f20311f1a443a6906c 100644 (file)
 #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)
diff --git a/umac.c b/umac.c
index 29c202a2194f144daf19ff506462db91e83e2142..c2fdcf4485ce807f5daa71e21216d2902fd4ed4d 100644 (file)
--- a/umac.c
+++ b/umac.c
@@ -165,7 +165,10 @@ static void STORE_UINT32_REVERSED(void *ptr, UINT32 x)
 #define AES_BLOCK_LEN  16
 
 /* OpenSSL's AES */
-#include <openssl/aes.h>
+#include "openbsd-compat/openssl-compat.h"
+#ifndef USE_BUILTIN_RIJNDAEL
+# include <openssl/aes.h>
+#endif
 typedef AES_KEY aes_int_key[1];
 #define aes_encryption(in,out,int_key)                  \
   AES_encrypt((u_char *)(in),(u_char *)(out),(AES_KEY *)int_key)
This page took 0.331874 seconds and 5 git commands to generate.