aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/cipher.c
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-02-21 20:49:58 +0000
committerDavid Shaw <[email protected]>2003-02-21 20:49:58 +0000
commit5e9d144a530d226ebb0379dd0fa4e0b911ab0910 (patch)
treeff1945f6ee7b9a0fd3753bf6bf3f526605ff7156 /cipher/cipher.c
parent* g10.c (main): Use 3DES instead of CAST5 if we don't have CAST5 support. (diff)
downloadgnupg-5e9d144a530d226ebb0379dd0fa4e0b911ab0910.tar.gz
gnupg-5e9d144a530d226ebb0379dd0fa4e0b911ab0910.zip
* cipher.c (setup_cipher_table): #ifdef all optional ciphers.
* md.c (load_digest_module): #ifdef all optional digests.
Diffstat (limited to 'cipher/cipher.c')
-rw-r--r--cipher/cipher.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/cipher/cipher.c b/cipher/cipher.c
index 4bbef9377..ff19219e4 100644
--- a/cipher/cipher.c
+++ b/cipher/cipher.c
@@ -85,10 +85,9 @@ dummy_decrypt_block( void *c, byte *outbuf, byte *inbuf ) { BUG(); }
static void
setup_cipher_table(void)
{
+ int i=0;
- int i;
-
- i = 0;
+#ifdef USE_AES
cipher_table[i].algo = CIPHER_ALGO_RIJNDAEL;
cipher_table[i].name = rijndael_get_info( cipher_table[i].algo,
&cipher_table[i].keylen,
@@ -122,6 +121,9 @@ setup_cipher_table(void)
if( !cipher_table[i].name )
BUG();
i++;
+#endif
+
+#ifdef USE_TWOFISH
cipher_table[i].algo = CIPHER_ALGO_TWOFISH;
cipher_table[i].name = twofish_get_info( cipher_table[i].algo,
&cipher_table[i].keylen,
@@ -133,6 +135,9 @@ setup_cipher_table(void)
if( !cipher_table[i].name )
BUG();
i++;
+#endif
+
+#ifdef USE_BLOWFISH
cipher_table[i].algo = CIPHER_ALGO_BLOWFISH;
cipher_table[i].name = blowfish_get_info( cipher_table[i].algo,
&cipher_table[i].keylen,
@@ -144,6 +149,9 @@ setup_cipher_table(void)
if( !cipher_table[i].name )
BUG();
i++;
+#endif
+
+#ifdef USE_CAST5
cipher_table[i].algo = CIPHER_ALGO_CAST5;
cipher_table[i].name = cast5_get_info( cipher_table[i].algo,
&cipher_table[i].keylen,
@@ -155,6 +163,8 @@ setup_cipher_table(void)
if( !cipher_table[i].name )
BUG();
i++;
+#endif
+
cipher_table[i].algo = CIPHER_ALGO_3DES;
cipher_table[i].name = des_get_info( cipher_table[i].algo,
&cipher_table[i].keylen,