diff options
author | Greg Hudson <ghudson@mit.edu> | 2010-09-08 03:48:05 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2010-09-08 03:48:05 +0000 |
commit | a589314c0b42ad79cbca14c6fd379f5dc72bb7d3 (patch) | |
tree | 98249a28b779708430ad60126a166f7fafaeeaa6 /src | |
parent | 91a250bf1a299cedbf30e1ef5a7a33d7830e2a84 (diff) | |
download | krb5-a589314c0b42ad79cbca14c6fd379f5dc72bb7d3.tar.gz krb5-a589314c0b42ad79cbca14c6fd379f5dc72bb7d3.tar.xz krb5-a589314c0b42ad79cbca14c6fd379f5dc72bb7d3.zip |
Don't build the built-in Camellia block cipher code if Camellia-CCM
enctypes aren't enabled.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24297 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/crypto/builtin/camellia/camellia-gen.c | 6 | ||||
-rw-r--r-- | src/lib/crypto/builtin/camellia/camellia.c | 4 |
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 */ |