svn rev #24226: branches/camellia-ccm/src/lib/crypto/krb/dk/
ghudson@MIT.EDU
ghudson at MIT.EDU
Tue Aug 3 05:11:45 EDT 2010
http://src.mit.edu/fisheye/changelog/krb5/?cs=24226
Commit By: ghudson
Log Message:
Simplify krb5int_dk_cmac_checksum since ctp->enc is set for the
relevant checksum types (and thus key verification occurs in the
caller).
Changed Files:
U branches/camellia-ccm/src/lib/crypto/krb/dk/checksum_cmac.c
Modified: branches/camellia-ccm/src/lib/crypto/krb/dk/checksum_cmac.c
===================================================================
--- branches/camellia-ccm/src/lib/crypto/krb/dk/checksum_cmac.c 2010-08-03 09:01:46 UTC (rev 24225)
+++ branches/camellia-ccm/src/lib/crypto/krb/dk/checksum_cmac.c 2010-08-03 09:11:45 UTC (rev 24226)
@@ -38,23 +38,12 @@
const krb5_crypto_iov *data, size_t num_data,
krb5_data *output)
{
- const struct krb5_keytypes *ktp;
- const struct krb5_enc_provider *enc;
+ const struct krb5_enc_provider *enc = ctp->enc;
krb5_error_code ret;
unsigned char constantdata[K5CLENGTH];
krb5_data datain;
krb5_key kc;
- /* Use the key's enctype (more flexible than setting an enctype in ctp). */
- ktp = find_enctype(key->keyblock.enctype);
- if (ktp == NULL)
- return KRB5_BAD_ENCTYPE;
- enc = ktp->enc;
- if (key->keyblock.length != enc->keylength)
- return KRB5_BAD_KEYSIZE;
- if (ctp->compute_size != enc->block_size)
- return KRB5_BAD_MSIZE;
-
/* Derive the key. */
datain = make_data(constantdata, K5CLENGTH);
store_32_be(usage, constantdata);
More information about the cvs-krb5
mailing list