summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/crypto/builtin/camellia/camellia-gen.c6
-rw-r--r--src/lib/crypto/builtin/camellia/camellia.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/crypto/builtin/camellia/camellia-gen.c b/src/lib/crypto/builtin/camellia/camellia-gen.c
index 1446d779e6..bbe64d039f 100644
--- a/src/lib/crypto/builtin/camellia/camellia-gen.c
+++ b/src/lib/crypto/builtin/camellia/camellia-gen.c
@@ -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;
}
diff --git a/src/lib/crypto/builtin/camellia/camellia.c b/src/lib/crypto/builtin/camellia/camellia.c
index 57b2e3642f..1b8cc46ddd 100644
--- a/src/lib/crypto/builtin/camellia/camellia.c
+++ b/src/lib/crypto/builtin/camellia/camellia.c
@@ -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 */