USE_cipher related fixed (#if instead of #ifdef) by David.
authorWerner Koch <wk@gnupg.org>
Tue, 1 May 2007 12:01:47 +0000 (12:01 +0000)
committerWerner Koch <wk@gnupg.org>
Tue, 1 May 2007 12:01:47 +0000 (12:01 +0000)
cipher/ChangeLog
cipher/cipher.c
tests/ChangeLog
tests/basic.c

index 0218c4b..72ec0d2 100644 (file)
@@ -1,3 +1,8 @@
+2007-04-30  David Shaw  <dshaw@jabberwocky.com>
+
+       * cipher.c: Use #if instead of #ifdef as configure defines the
+       USE_cipher defines as 0 for disabled.
+
 2007-04-30  Werner Koch  <wk@g10code.com>
 
        * rndegd.c (_gcry_rndegd_set_socket_name): New.
index 43576fa..f116503 100644 (file)
@@ -69,10 +69,10 @@ static struct cipher_table_entry
     { &_gcry_cipher_spec_serpent192, GCRY_CIPHER_SERPENT192 },
     { &_gcry_cipher_spec_serpent256, GCRY_CIPHER_SERPENT256 },
 #endif
-#ifdef USE_RFC2268
+#if USE_RFC2268
     { &_gcry_cipher_spec_rfc2268_40, GCRY_CIPHER_RFC2268_40 },
 #endif
-#ifdef USE_SEED
+#if USE_SEED
     { &_gcry_cipher_spec_seed,       GCRY_CIPHER_SEED },
 #endif
     { NULL                    }
index 9cc423f..2b12d87 100644 (file)
@@ -1,3 +1,8 @@
+2007-04-30  David Shaw  <dshaw@jabberwocky.com>
+
+       * basic.c (check_ciphers): #if out ciphers we don't have.  Add
+       test for GCRY_CIPHER_RFC2268_40.
+
 2007-04-30  Werner Koch  <wk@g10code.com>
 
        * version.c: New.
index 22498e5..dba94e3 100644 (file)
@@ -956,23 +956,42 @@ static void
 check_ciphers (void)
 {
   static int algos[] = {
+#if USE_BLOWFISH
+    GCRY_CIPHER_BLOWFISH,
+#endif
+#if USE_DES
+    GCRY_CIPHER_DES,
     GCRY_CIPHER_3DES,
+#endif
+#if USE_CAST5
     GCRY_CIPHER_CAST5,
-    GCRY_CIPHER_BLOWFISH,
+#endif
+#if USE_AES
     GCRY_CIPHER_AES,
     GCRY_CIPHER_AES192,
     GCRY_CIPHER_AES256,
+#endif
+#if USE_TWOFISH
     GCRY_CIPHER_TWOFISH,
     GCRY_CIPHER_TWOFISH128,
-    GCRY_CIPHER_DES,
+#endif
+#if USE_SERPENT
     GCRY_CIPHER_SERPENT128,
     GCRY_CIPHER_SERPENT192,
     GCRY_CIPHER_SERPENT256,
+#endif
+#if USE_RFC2268
+    GCRY_CIPHER_RFC2268_40,
+#endif
+#if USE_SEED
     GCRY_CIPHER_SEED,
+#endif
     0
   };
   static int algos2[] = {
+#if USE_ARCFOUR
     GCRY_CIPHER_ARCFOUR,
+#endif
     0
   };
   int i;