(krb5_kt_get_entry): check the keytype
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3569 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -154,10 +154,12 @@ krb5_kt_get_entry(krb5_context context,
|
|||||||
if (r)
|
if (r)
|
||||||
return KRB5_KT_NOTFOUND; /* XXX i.e. file not found */
|
return KRB5_KT_NOTFOUND; /* XXX i.e. file not found */
|
||||||
while (krb5_kt_next_entry(context, id, entry, &cursor) == 0) {
|
while (krb5_kt_next_entry(context, id, entry, &cursor) == 0) {
|
||||||
if ((principal == NULL || krb5_principal_compare(context,
|
if ((principal == NULL
|
||||||
principal,
|
|| (krb5_principal_compare(context,
|
||||||
entry->principal)) &&
|
principal,
|
||||||
(kvno == 0 || kvno == entry->vno)) {
|
entry->principal)))
|
||||||
|
&& (kvno == 0 || kvno == entry->vno)
|
||||||
|
&& (keytype == 0 || keytype == entry->keyblock.keytype)) {
|
||||||
krb5_kt_end_seq_get (context, id, &cursor);
|
krb5_kt_end_seq_get (context, id, &cursor);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user