(read_master_encryptionkey): handle old keytype based files, and
convert the key to cfb64 git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8602 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -204,7 +204,15 @@ read_master_encryptionkey(krb5_context context, const char *filename,
|
||||
if(ret)
|
||||
return ret;
|
||||
|
||||
ret = hdb_process_master_key(context, 0, &key, ETYPE_DES_CFB64_NONE, mkey);
|
||||
/* Originally, the keytype was just that, and later it got changed
|
||||
to des-cbc-md5, but we always used des in cfb64 mode. This
|
||||
should cover all cases, but will break if someone has hacked
|
||||
this code to really use des-cbc-md5 -- but then that's not my
|
||||
problem. */
|
||||
if(key.keytype == KEYTYPE_DES || key.keytype == ETYPE_DES_CBC_MD5)
|
||||
key.keytype = ETYPE_DES_CFB64_NONE;
|
||||
|
||||
ret = hdb_process_master_key(context, 0, &key, 0, mkey);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user