remove hack string_to_keyarray, using instead the (new) keytype array.
authorJohn Kohl <jtkohl@mit.edu>
Mon, 26 Mar 1990 11:56:42 +0000 (11:56 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Mon, 26 Mar 1990 11:56:42 +0000 (11:56 +0000)
fix up error codes

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

src/lib/krb5/krb/in_tkt_pwd.c

index 3e7f17155e38a0beefeb42b940f1eb92d0a9bcc5..25a8b84cb0804648e3fc2af89e5c850aab520442 100644 (file)
@@ -21,8 +21,6 @@ static char rcsid_in_tkt_pwd_c[] =
 #include <errno.h>
 #include <krb5/ext-proto.h>
 
-extern krb5_cryptosystem_entry *string_to_keyarray[]; /* XXX */
-
 struct pwd_keyproc_arg {
     krb5_principal who;
     krb5_data password;
@@ -44,16 +42,17 @@ OLDDECLARG(krb5_pointer, keyseed)
     struct pwd_keyproc_arg *arg;
 
     if (!valid_keytype(type))
-       return KRB5KDC_ERR_ETYPE_NOSUPP; /* XXX */
+       return KRB5_PROG_KEYTYPE_NOSUPP;
     *key = (krb5_keyblock *)malloc(sizeof(**key));
     if (!*key)
        return ENOMEM;
     
     arg = (struct pwd_keyproc_arg *)keyseed;
-    if (retval = (*string_to_keyarray[type]->string_to_key)(type,
-                                                           *key,
-                                                           &arg->password,
-                                                           arg->who)) {
+    if (retval = (*krb5_keytype_array[type]->system->
+                 string_to_key)(type,
+                                *key,
+                                &arg->password,
+                                arg->who)) {
        free((char *) *key);
        return(retval);
     }