From a6ce192b02076a42adfe3ed0452cfafb314522ea Mon Sep 17 00:00:00 2001 From: Chris Provenzano Date: Sat, 28 Jan 1995 20:07:26 +0000 Subject: [PATCH] Added krb5_keytype arg to krb5_kt_read_service_key() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4866 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/keytab/ChangeLog | 6 +++++- src/lib/krb5/keytab/read_servi.c | 25 ++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/lib/krb5/keytab/ChangeLog b/src/lib/krb5/keytab/ChangeLog index 0cc1852f7..ab3d872c2 100644 --- a/src/lib/krb5/keytab/ChangeLog +++ b/src/lib/krb5/keytab/ChangeLog @@ -1,6 +1,10 @@ Fri Jan 13 15:23:47 1995 Chris Provenzano (proven@mit.edu) - * Added krb5_context to all krb5_routines + * read_servi.c (krb5_kt_read_service_key) Add krb5_keytype arg. + +Fri Jan 13 15:23:47 1995 Chris Provenzano (proven@mit.edu) + + * Added krb5_context to all krb5_routines Fri Oct 14 23:09:02 1994 Theodore Y. Ts'o (tytso@dcl) diff --git a/src/lib/krb5/keytab/read_servi.c b/src/lib/krb5/keytab/read_servi.c index ff4890b12..5ed735b16 100644 --- a/src/lib/krb5/keytab/read_servi.c +++ b/src/lib/krb5/keytab/read_servi.c @@ -34,24 +34,23 @@ #define KSUCCESS 0 +/* + * effects: If keyprocarg is not NULL, it is taken to be the name of a + * keytab. Otherwise, the default keytab will be used. This + * routine opens the keytab and finds the principal associated with + * principal, vno, and keytype and returns the resulting key in *key + * or returning an error code if it is not found. + * returns: Either KSUCCESS or error code. + * errors: error code if not found or keyprocarg is invalid. + */ krb5_error_code -krb5_kt_read_service_key(context, keyprocarg, principal, vno, key) +krb5_kt_read_service_key(context, keyprocarg, principal, vno, keytype, key) krb5_context context; krb5_pointer keyprocarg; krb5_principal principal; krb5_kvno vno; + krb5_keytype keytype; krb5_keyblock ** key; -/* - effects: If keyprocarg is not NULL, it is taken to be - the name of a keytab. Otherwise, the default - keytab will be used. This routine opens the - keytab and finds the principal associated with - principal and vno, returning the resulting key - in *key or returning an error code if it is not - found. - returns: nothing - errors: error code if not found -*/ { krb5_error_code kerror = KSUCCESS; char keytabname[MAX_KEYTAB_NAME_LEN + 1]; /* + 1 for NULL termination */ @@ -74,7 +73,7 @@ krb5_kt_read_service_key(context, keyprocarg, principal, vno, key) if (kerror = krb5_kt_resolve(context, (char *)keytabname, &id)) return (kerror); - kerror = krb5_kt_get_entry(context, id, principal, vno, &entry); + kerror = krb5_kt_get_entry(context, id, principal, vno, keytype, &entry); krb5_kt_close(context, id); if (kerror) -- 2.26.2