From: Theodore Tso Date: Tue, 8 Nov 1994 22:52:39 +0000 (+0000) Subject: Use published interface to call krb5_random_key X-Git-Tag: krb5-1.0-beta5~1002 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d993448b0dd18ff7113d70037d43455f43adae4b;p=krb5.git Use published interface to call krb5_random_key Fix typo in do_as_req.c (added missing '&') git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4646 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index a6521f1a5..69d55104d 100644 --- a/src/kdc/ChangeLog +++ b/src/kdc/ChangeLog @@ -1,3 +1,8 @@ +Tue Nov 8 17:51:30 1994 Theodore Y. Ts'o (tytso@dcl) + + * do_tgs_req.c (process_tgs_req): Use published interface to call + krb5_random_key(). + Mon Nov 7 22:11:01 1994 Theodore Y. Ts'o (tytso@dcl) * kerberos_v4.c: Don't define functions manually, but pull in the diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c index 62e260915..12fea7aa5 100644 --- a/src/kdc/do_as_req.c +++ b/src/kdc/do_as_req.c @@ -251,7 +251,7 @@ krb5_data **response; /* filled in with a response packet */ useetype = request->etype[i]; krb5_use_cstype(&eblock, useetype); - if (retval = krb5_random_key(eblock, + if (retval = krb5_random_key(&eblock, krb5_csarray[useetype]->random_sequence, &session_key)) { /* random key failed */ diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c index 6b46954c8..62d810bfc 100644 --- a/src/kdc/do_tgs_req.c +++ b/src/kdc/do_tgs_req.c @@ -66,6 +66,7 @@ const krb5_fulladdr *from; /* who sent it ? */ int is_secondary; krb5_data **response; /* filled in with a response packet */ { + krb5_encrypt_block eblock; krb5_kdc_req *request = 0; krb5_db_entry server; krb5_kdc_rep reply; @@ -208,8 +209,11 @@ tgt_again: goto cleanup; } useetype = request->etype[i]; + krb5_use_keytype(&eblock, useetype); - if (retval = (*(krb5_csarray[useetype]->system->random_key))(krb5_csarray[useetype]->random_sequence, &session_key)) { + retval = krb5_random_key(&eblock, krb5_csarray[useetype]->random_sequence, + &session_key); + if (retval) { /* random key failed */ status = "RANDOM_KEY_FAILED"; goto cleanup;