Use the documented interface for calling krb5_string_to_key()
authorTheodore Tso <tytso@mit.edu>
Tue, 8 Nov 1994 22:53:21 +0000 (22:53 +0000)
committerTheodore Tso <tytso@mit.edu>
Tue, 8 Nov 1994 22:53:21 +0000 (22:53 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4647 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/in_tkt_pwd.c

index 22bd58d4cc22f6c231fb3e487210f99fc7458667..818f188d8fda50536bb8b595ad8dc0f6dab4cfc5 100644 (file)
@@ -1,3 +1,8 @@
+Tue Nov  8 17:09:48 1994  Theodore Y. Ts'o  (tytso@dcl)
+
+       * in_tkt_pwd.c (pwd_keyproc): Use the documented interface for
+               calling krb5_string_to_key().
+
 Tue Oct 25 23:34:57 1994  Theodore Y. Ts'o  (tytso@dcl)
 
        * srv_rcache.c (krb5_get_server_rcache): Added missing continue so
index a0ab8172cf889248cc67b5866dd2e0edbf78a057..6d636d5c64e74532f6837f07f2d73493027b3c5e 100644 (file)
@@ -54,6 +54,7 @@ OLDDECLARG(krb5_pa_data **,padata)
 {
     krb5_data salt;
     krb5_error_code retval;
+    krb5_encrypt_block eblock;
     const struct pwd_keyproc_arg *arg;
     struct pwd_keyproc_arg arg2;
     char pwdbuf[BUFSIZ];
@@ -63,6 +64,8 @@ OLDDECLARG(krb5_pa_data **,padata)
     if (!valid_keytype(type))
        return KRB5_PROG_KEYTYPE_NOSUPP;
 
+    krb5_use_keytype(&eblock, type);
+    
     if (padata) {
         krb5_pa_data **ptr;
 
@@ -102,12 +105,9 @@ OLDDECLARG(krb5_pa_data **,padata)
     if (!*key) {
        if (f_salt) krb5_xfree(salt.data);
        return ENOMEM;
-    }    
-    if (retval = (*krb5_keytype_array[type]->system->
-                 string_to_key)(type,
-                                *key,
-                                &arg->password,
-                                 &salt)) {
+    }
+    retval = krb5_string_to_key(&eblock, type, *key, &arg->password, &salt);
+    if (retval) {
        krb5_xfree(*key);
        if (f_salt) krb5_xfree(salt.data);
        return(retval);