diff options
| author | Greg Hudson <ghudson@mit.edu> | 2012-10-09 14:27:04 -0400 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2012-10-09 14:27:04 -0400 |
| commit | 01f30a7f06110f54c5d69fdd7697347c102f5274 (patch) | |
| tree | d7103da14e3d895f6c2629647daa3fdde0641759 /src/lib/crypto/builtin | |
| parent | fd136728de5b603974e3ec21bc5856406c4e814d (diff) | |
| download | krb5-01f30a7f06110f54c5d69fdd7697347c102f5274.tar.gz krb5-01f30a7f06110f54c5d69fdd7697347c102f5274.tar.xz krb5-01f30a7f06110f54c5d69fdd7697347c102f5274.zip | |
De-conditionalize Camellia code
The Camellia enctypes and cksumtypes have received IANA assignments.
Add #defines using those assignments to krb5.h, remove the CAMELLIA
conditional, and enable testing code as appropriate.
The Camellia draft has not received an RFC number yet, so there is no
Doxygen markup for the enctype and cksumtype #defines. That can be
added once the RFC number is known.
Diffstat (limited to 'src/lib/crypto/builtin')
| -rw-r--r-- | src/lib/crypto/builtin/camellia/Makefile.in | 3 | ||||
| -rw-r--r-- | src/lib/crypto/builtin/camellia/camellia-gen.c | 6 | ||||
| -rw-r--r-- | src/lib/crypto/builtin/camellia/camellia.c | 5 | ||||
| -rw-r--r-- | src/lib/crypto/builtin/enc_provider/camellia.c | 24 |
4 files changed, 1 insertions, 37 deletions
diff --git a/src/lib/crypto/builtin/camellia/Makefile.in b/src/lib/crypto/builtin/camellia/Makefile.in index b11716ecc..e6c86bc13 100644 --- a/src/lib/crypto/builtin/camellia/Makefile.in +++ b/src/lib/crypto/builtin/camellia/Makefile.in @@ -39,8 +39,7 @@ camellia-gen: camellia-gen.o $(GEN_OBJS) run-camellia-gen: camellia-gen ./camellia-gen > kresults.out -# Enable when Camellia support becomes unconditional. -#check:: run-camellia-gen +check:: run-camellia-gen clean-unix:: clean-libobjs diff --git a/src/lib/crypto/builtin/camellia/camellia-gen.c b/src/lib/crypto/builtin/camellia/camellia-gen.c index a98316715..1446d779e 100644 --- a/src/lib/crypto/builtin/camellia/camellia-gen.c +++ b/src/lib/crypto/builtin/camellia/camellia-gen.c @@ -8,8 +8,6 @@ #include <unistd.h> #include "camellia.h" -#ifdef CAMELLIA - #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, }; @@ -316,18 +314,14 @@ static void cts_test () printf ("\n"); } -#endif /* CAMELLIA */ - int main () { -#ifdef CAMELLIA 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 222b66215..88dfe99ad 100644 --- a/src/lib/crypto/builtin/camellia/camellia.c +++ b/src/lib/crypto/builtin/camellia/camellia.c @@ -36,9 +36,6 @@ #include "camellia.h" -#include "k5-int.h" /* Only for CAMELLIA; remove later. */ -#ifdef CAMELLIA - /* key constants */ #define CAMELLIA_SIGMA1L (0xA09E667FL) @@ -1540,5 +1537,3 @@ 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 */ diff --git a/src/lib/crypto/builtin/enc_provider/camellia.c b/src/lib/crypto/builtin/enc_provider/camellia.c index ef51d4421..2faf811bf 100644 --- a/src/lib/crypto/builtin/enc_provider/camellia.c +++ b/src/lib/crypto/builtin/enc_provider/camellia.c @@ -27,8 +27,6 @@ #include "crypto_int.h" #include "camellia.h" -#ifdef CAMELLIA - /* * Private per-key data to cache after first generation. We don't want to mess * with the imported Cemallia implementation too much, so we'll just use two @@ -339,25 +337,3 @@ const struct krb5_enc_provider krb5int_enc_camellia256 = { camellia_init_state, krb5int_default_free_state }; - -#else /* CAMELLIA */ - -/* These won't be used, but are still in the export table. */ - -krb5_error_code -krb5int_camellia_cbc_mac(krb5_key key, const krb5_crypto_iov *data, - size_t num_data, const krb5_data *iv, - krb5_data *output) -{ - return EINVAL; -} - -const struct krb5_enc_provider krb5int_enc_camellia128 = { - 0 -}; - -const struct krb5_enc_provider krb5int_enc_camellia256 = { - 0 -}; - -#endif /* CAMELLIA */ |
