[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] More cleanups noticed by weasel; also, remove macros that n...



Update of /home/or/cvsroot/tor/src/common
In directory moria:/tmp/cvs-serv3641/src/common

Modified Files:
	aes.c crypto.c 
Log Message:
More cleanups noticed by weasel; also, remove macros that nobody uses.

Index: aes.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/aes.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -p -d -r1.32 -r1.33
--- aes.c	9 Feb 2006 05:46:48 -0000	1.32
+++ aes.c	12 Mar 2006 23:31:16 -0000	1.33
@@ -48,8 +48,6 @@ typedef uint32_t u32;
 typedef uint8_t u8;
 
 #ifndef USE_OPENSSL_AES
-#define MAXKC   (256/32)
-#define MAXKB   (256/8)
 #define MAXNR   14
 
 static int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/],

Index: crypto.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/common/crypto.c,v
retrieving revision 1.187
retrieving revision 1.188
diff -u -p -d -r1.187 -r1.188
--- crypto.c	13 Feb 2006 08:01:59 -0000	1.187
+++ crypto.c	12 Mar 2006 23:31:16 -0000	1.188
@@ -63,28 +63,14 @@ const char crypto_c_id[] =
 
 #if OPENSSL_VERSION_NUMBER < 0x00905000l
 #error "We require openssl >= 0.9.5"
-#elif OPENSSL_VERSION_NUMBER < 0x00906000l
-#define OPENSSL_095
 #endif
 
 #if OPENSSL_VERSION_NUMBER < 0x00907000l
-#define OPENSSL_PRE_097
 #define NO_ENGINES
 #else
 #include <openssl/engine.h>
 #endif
 
-/* Certain functions that return a success code in OpenSSL 0.9.6 return void
- * (and don't indicate errors) in OpenSSL version 0.9.5.
- *
- * [OpenSSL 0.9.5 matters, because it ships with Redhat 6.2.]
- */
-#ifdef OPENSSL_095
-#define RETURN_SSL_OUTCOME(exp) (exp); return 0
-#else
-#define RETURN_SSL_OUTCOME(exp) return !(exp)
-#endif
-
 /** Macro: is k a valid RSA public or private key? */
 #define PUBLIC_KEY_OK(k) ((k) && (k)->key && (k)->key->n)
 /** Macro: is k a valid RSA private key? */