diff options
author | Greg Hudson <ghudson@mit.edu> | 2011-10-28 15:45:03 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2011-10-28 15:45:03 +0000 |
commit | 94f2cc96913426fd7add452cdea423877c2dcf0a (patch) | |
tree | 06325fe211e397658f4e47a4b82c0aab02ffb271 /src/lib/crypto | |
parent | 3e1de31181fb999840fd90f8df505fa7f0414646 (diff) | |
download | krb5-94f2cc96913426fd7add452cdea423877c2dcf0a.tar.gz krb5-94f2cc96913426fd7add452cdea423877c2dcf0a.tar.xz krb5-94f2cc96913426fd7add452cdea423877c2dcf0a.zip |
Fix intermediate key length in hmac-md5 checksum
When using hmac-md5, the intermediate key length is the output of the
hash function (128 bits), not the input key length. Relevant if the
input key is not an RC4 key.
ticket: 6994
target_version: 1.10
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25418 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/crypto')
-rw-r--r-- | src/lib/crypto/krb/checksum_hmac_md5.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/crypto/krb/checksum_hmac_md5.c b/src/lib/crypto/krb/checksum_hmac_md5.c index 6c5f6175de..8145875ba9 100644 --- a/src/lib/crypto/krb/checksum_hmac_md5.c +++ b/src/lib/crypto/krb/checksum_hmac_md5.c @@ -59,7 +59,7 @@ krb5_error_code krb5int_hmacmd5_checksum(const struct krb5_cksumtypes *ctp, ret = krb5int_hmac(ctp->hash, key, &iov, 1, &ds); if (ret) goto cleanup; - ks.length = key->keyblock.length; + ks.length = ds.length; ks.contents = (krb5_octet *) ds.data; keyblock = &ks; } else /* For md5-hmac, just use the key. */ |