From: John Kohl Date: Thu, 20 Sep 1990 15:46:58 +0000 (+0000) Subject: use macros to hide abstraction X-Git-Tag: krb5-1.0-alpha2~272 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=286fc42b828e4dbdd579696c2a2da6c571697d4a;p=krb5.git use macros to hide abstraction git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1139 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/admin/create/kdb5_create.c b/src/admin/create/kdb5_create.c index f0a2c5ebd..46cdff6cd 100644 --- a/src/admin/create/kdb5_create.c +++ b/src/admin/create/kdb5_create.c @@ -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); diff --git a/src/admin/edit/kdb5_edit.c b/src/admin/edit/kdb5_edit.c index 5d2c5e688..e862508c2 100644 --- a/src/admin/edit/kdb5_edit.c +++ b/src/admin/edit/kdb5_edit.c @@ -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]);