* keytab.c (krb5_ktkdb_get_entry): Do not perform the enctype
comparison if the requested enctype is a wildcard.
ticket: new
status: open
tags: pullup
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15295
dc483132-0cff-0310-8789-
dd5450dbe970
+2003-03-18 Tom Yu <tlyu@mit.edu>
+
+ * keytab.c (krb5_ktkdb_get_entry): Do not perform the enctype
+ comparison if the requested enctype is a wildcard.
+
2003-03-16 Sam Hartman <hartmans@mit.edu>
* keytab.c (krb5_ktkdb_get_entry): Match only against the first
if (kerror)
goto error;
- kerror = krb5_c_enctype_compare(context, enctype, entry->key.enctype, &similar);
- if (kerror)
- goto error;
-
- if (!similar) {
- kerror = KRB5_KDB_NO_PERMITTED_KEY;
- goto error;
+ if (enctype > 0) {
+ kerror = krb5_c_enctype_compare(context, enctype,
+ entry->key.enctype, &similar);
+ if (kerror)
+ goto error;
+
+ if (!similar) {
+ kerror = KRB5_KDB_NO_PERMITTED_KEY;
+ goto error;
+ }
}
-
/*
* Coerce the enctype of the output keyblock in case we got an
* inexact match on the enctype.