* fetch_mkey.c: If the keyblock is initialized with an enctype of
authorRichard Basch <probe@mit.edu>
Tue, 12 Dec 1995 02:32:05 +0000 (02:32 +0000)
committerRichard Basch <probe@mit.edu>
Tue, 12 Dec 1995 02:32:05 +0000 (02:32 +0000)
NULL, simply read in the enctype from the stash file and
don't try to check it.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7196 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/kdb/fetch_mkey.c

index 1197374ef63f9bc92787a4d5f819cb83f936269c..fc7e873f219022bbebc1f68c20a1a72c747177d9 100644 (file)
@@ -115,7 +115,9 @@ krb5_db_fetch_mkey(context, mname, eblock, fromkeyboard, twice, keyfile, salt, k
            retval = KRB5_KDB_CANTREAD_STORED;
            goto errout;
        }
-       if (enctype != key->enctype) {
+       if (key->enctype == NULL)
+           key->enctype = enctype;
+       else if (enctype != key->enctype) {
            retval = KRB5_KDB_BADSTORED_MKEY;
            goto errout;
        }