Don't build the built-in Camellia block cipher code if Camellia-CCM
authorGreg Hudson <ghudson@mit.edu>
Wed, 8 Sep 2010 03:48:05 +0000 (03:48 +0000)
committerGreg Hudson <ghudson@mit.edu>
Wed, 8 Sep 2010 03:48:05 +0000 (03:48 +0000)
enctypes aren't enabled.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24297 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/crypto/builtin/camellia/camellia-gen.c
src/lib/crypto/builtin/camellia/camellia.c

index 1446d779e654906d7e436e93e4763cb443b07aab..bbe64d039fcd396f2213de23599857b8b7462cbd 100644 (file)
@@ -8,6 +8,8 @@
 #include <unistd.h>
 #include "camellia.h"
 
+#ifdef CAMELLIA_CCM
+
 #define B 16U
 unsigned char key[16];
 unsigned char test_case_len[] = { B+1, 2*B-1, 2*B, 2*B+1, 3*B-1, 3*B, 4*B, };
@@ -314,14 +316,18 @@ static void cts_test ()
     printf ("\n");
 }
 
+#endif /* CAMELLIA_CCM */
+
 int main ()
 {
+#ifdef CAMELLIA_CCM
     init ();
     fips_test ();
 
     ecb_test();
     cbc_test();
     cts_test();
+#endif
 
     return 0;
 }
index 57b2e3642f23837a55834d77ecdb6d45a47cd260..1b8cc46dddf12f1d2a7badc68e3c0b236d0d95d2 100644 (file)
@@ -36,6 +36,8 @@
 
 #include "camellia.h"
 
+#ifdef CAMELLIA_CCM
+
 /* key constants */
 
 #define CAMELLIA_SIGMA1L (0xA09E667FL)
@@ -1537,3 +1539,5 @@ camellia_dec_blk(const unsigned char in_blk[],  unsigned char out_blk[],
     Camellia_DecryptBlock(cx->keybitlen, in_blk, cx->k_sch, out_blk);
     return camellia_good;
 }
+
+#endif /* CAMELLIA_CCM */