Use published interface to call krb5_random_key
authorTheodore Tso <tytso@mit.edu>
Tue, 8 Nov 1994 22:52:39 +0000 (22:52 +0000)
committerTheodore Tso <tytso@mit.edu>
Tue, 8 Nov 1994 22:52:39 +0000 (22:52 +0000)
Fix typo in do_as_req.c (added missing '&')

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

src/kdc/ChangeLog
src/kdc/do_as_req.c
src/kdc/do_tgs_req.c

index a6521f1a58914ccd8c385530384fe5df29f5b2f9..69d55104db7f3981ee0063407e1519543c57349f 100644 (file)
@@ -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
index 62e260915957895a78b388fbd0ec24da5ae726e0..12fea7aa57af447d8d35a0f8f5d6d2a46b449cbf 100644 (file)
@@ -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 */
index 6b46954c863927cdf2fe0c8ba47ffb5c80e4ec7a..62d810bfc0efbfc70b0c4f65c37886a78b3bed10 100644 (file)
@@ -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;