use macros to hide abstraction
authorJohn Kohl <jtkohl@mit.edu>
Thu, 20 Sep 1990 15:46:58 +0000 (15:46 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Thu, 20 Sep 1990 15:46:58 +0000 (15:46 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1139 dc483132-0cff-0310-8789-dd5450dbe970

src/admin/create/kdb5_create.c
src/admin/edit/kdb5_edit.c

index f0a2c5ebd8aa4ea191dcadbb2130b39d956c68d5..46cdff6cd1cbf0f92302c804ec8b4a1d2ee14a1e 100644 (file)
@@ -289,8 +289,7 @@ struct realm_info *pblock;
            return retval;
        break;
     case RANDOM_KEY:
-       if (retval = (*pblock->eblock->crypto_entry->random_key)(pblock->rseed,
-                                                                &rkey))
+       if (retval = krb5_random_key(pblock->eblock, pblock->rseed, &rkey))
            return retval;
        retval = krb5_kdb_encrypt_key(pblock->eblock, rkey, &ekey);
        krb5_free_keyblock(rkey);
index 5d2c5e6882ac324e9f6a9e914a85cc2ecdf7f742..e862508c25ad7bf7c03ec247ef6ef591ab7067f7 100644 (file)
@@ -697,8 +697,7 @@ OLDDECLARG(krb5_kvno, vno)
     krb5_error_code retval;
     krb5_keyblock *tempkey;
 
-    if (retval = (*master_encblock.crypto_entry->random_key)(master_random,
-                                                            &tempkey)) {
+    if (retval = krb5_random_key(&master_encblock, master_random, &tempkey)) {
        com_err(argv[0], retval, "while generating random key");
        return;
     }
@@ -789,11 +788,10 @@ OLDDECLARG(krb5_kvno, vno)
     pwd.data = password;
     pwd.length = pwsize;
 
-    retval = (*master_encblock.crypto_entry->
-             string_to_key)(master_keyblock.keytype,
-                            &tempkey,
-                            &pwd,
-                            string_princ);
+    retval = krb5_string_to_key(&master_encblock, master_keyblock.keytype,
+                               &tempkey,
+                               &pwd,
+                               string_princ);
     bzero(password, sizeof(password)); /* erase it */
     if (retval) {
        com_err(argv[0], retval, "while converting password to key for '%s'", argv[1]);