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

src/kdc/kdc_util.c
src/kdc/main.c

index 027239da32090ab1b2a6892e464814ad2c58d4a5..1c37758948486bd433c9b802188b4a7bb2bd7986 100644 (file)
@@ -108,26 +108,25 @@ const krb5_fulladdr *from;
 
        eblock.crypto_entry = krb5_csarray[tgs_req->tgs_request2->etype]->system; /* XXX */
        /* do any necessary key pre-processing */
-       if (retval = (*eblock.crypto_entry->process_key)(&eblock,
-                                                        tgs_req->header2->ticket->enc_part2->session)) {
+       if (retval = krb5_process_key(&eblock,
+                                     tgs_req->header2->ticket->enc_part2->session)) {
            free(scratch.data);
            return(retval);
        }
 
        /* call the encryption routine */
-       if (retval =
-           (*eblock.crypto_entry->decrypt_func)((krb5_pointer) tgs_req->tgs_request2->enc_part.data,
-                                                (krb5_pointer) scratch.data,
-                                                scratch.length, &eblock,
-                                                0)) {
-           (void) (*eblock.crypto_entry->finish_key)(&eblock);
+       if (retval = krb5_decrypt((krb5_pointer) tgs_req->tgs_request2->enc_part.data,
+                                 (krb5_pointer) scratch.data,
+                                 scratch.length, &eblock,
+                                 0)) {
+           (void) krb5_finish_key(&eblock);
            free(scratch.data);
            return retval;
        }
 
 #define clean_scratch() {bzero(scratch.data, scratch.length); free(scratch.data);}
 
-       if (retval = (*eblock.crypto_entry->finish_key)(&eblock)) {
+       if (retval = krb5_finish_key(&eblock)) {
            clean_scratch();
            return retval;
        }
index 5454d1522893b33ff02404760a64d0217f4b52f6..d36d015b96a37eb1ea64efcfa5f6b15734d119b2 100644 (file)
@@ -284,8 +284,7 @@ krb5_keyblock *masterkeyblock;
     }
 
     /* do any necessary key pre-processing */
-    if (retval = (*master_encblock.crypto_entry->
-                 process_key)(&master_encblock, masterkeyblock)) {
+    if (retval = krb5_process_key(&master_encblock, masterkeyblock)) {
        master_encblock.crypto_entry = 0;
        (void) krb5_db_fini();
        return(retval);
@@ -300,7 +299,7 @@ closedown_db()
     krb5_error_code retval;
 
     /* clean up master key stuff */
-    retval = (*master_encblock.crypto_entry->finish_key)(&master_encblock);
+    retval = krb5_finish_key(&master_encblock);
 
     bzero((char *)&master_encblock, sizeof(master_encblock));