summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Hornstein <kenh@cmf.nrl.navy.mil>2014-05-20 14:50:22 -0400
committerGreg Hudson <ghudson@mit.edu>2014-05-21 11:33:24 -0400
commit89803a5a781107365d5a4534eebf48dbaf010f96 (patch)
treef1d02f8095a25df70b22fa3eaab7e43c721cee94
parent6ffbf48932f735f6b77866db9b345c4fe0e395ac (diff)
downloadkrb5-89803a5a781107365d5a4534eebf48dbaf010f96.tar.gz
krb5-89803a5a781107365d5a4534eebf48dbaf010f96.tar.xz
krb5-89803a5a781107365d5a4534eebf48dbaf010f96.zip
Fix krb5int_c_combine_keys
When krb5int_c_combine_keys was updated to use the new crypto interface, a small bug was introduced. It turns out the temporary keyblock created needs to have its enctype set; otherwise, when krb5int_derive_keyblock() is called later, it will fail with KRB5_BAD_ENCTYPE. ticket: 7914 target_version: 1.12.2 tags: pullup
-rw-r--r--src/lib/crypto/krb/combine_keys.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/crypto/krb/combine_keys.c b/src/lib/crypto/krb/combine_keys.c
index 0c44e8b43..9ab0ac4f9 100644
--- a/src/lib/crypto/krb/combine_keys.c
+++ b/src/lib/crypto/krb/combine_keys.c
@@ -155,6 +155,7 @@ krb5int_c_combine_keys(krb5_context context, krb5_keyblock *key1,
randbits.data = (char *) rnd;
tkeyblock.length = keylength;
tkeyblock.contents = output;
+ tkeyblock.enctype = key1->enctype;
ret = (*ktp->rand2key)(&randbits, &tkeyblock);
if (ret)