* client.c Call krb5_get_credentials() with new calling convention
authorChris Provenzano <proven@mit.edu>
Thu, 23 Feb 1995 13:24:46 +0000 (13:24 +0000)
committerChris Provenzano <proven@mit.edu>
Thu, 23 Feb 1995 13:24:46 +0000 (13:24 +0000)
        * server.c Call krb5_mk_req_extended() with new calling convention.

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

src/appl/user_user/ChangeLog
src/appl/user_user/client.c
src/appl/user_user/server.c

index 4c195bd5eb1e774ff4e66fe58661166a11f0c19c..0b3e5358dc8f9611f1b9ed41698429ec2009f2af 100644 (file)
@@ -1,3 +1,9 @@
+Tue Feb 14 15:30:55 1995 Chris Provenzano  (proven@mit.edu)
+
+        * client.c Call krb5_get_credentials() with new calling convention.
+
+        * server.c Call krb5_mk_req_extended() with new calling convention.
+
 Fri Feb  3 11:58:18 1995  Theodore Y. Ts'o  (tytso@dcl)
 
        * client.c: (tgt_keyproc): Add keytype argument to rd_req_proc.
index 8f0845d73f4e1d9793859d0ee72d10f82f4988ca..91fd911aeebe059415b497ddddfa57a3e1dfa3a7 100644 (file)
@@ -65,7 +65,7 @@ char *argv[];
   struct sockaddr_in serv_net_addr, cli_net_addr;
   krb5_address serv_addr, cli_addr;
   krb5_ccache cc;
-  krb5_creds creds;
+  krb5_creds creds, *new_creds;
   krb5_data reply, msg, princ_data;
   krb5_tkt_authent *authdat;
   krb5_context context;
@@ -188,7 +188,8 @@ char *argv[];
     }
 
   /* Get TGT from credentials cache */
-  if (retval = krb5_get_credentials(context, KRB5_GC_CACHED, cc, &creds))
+  if (retval = krb5_get_credentials(context, KRB5_GC_CACHED, cc, 
+                                   &creds, &new_creds))
     {
       com_err("uu-client", retval, "getting TGT");
       return 6;
@@ -196,7 +197,7 @@ char *argv[];
 
   i = strlen(princ) + 1;
 
-  fprintf(stderr, "uu-client: sending %d bytes\n", creds.ticket.length + i);
+  fprintf(stderr, "uu-client: sending %d bytes\n",new_creds->ticket.length + i);
   princ_data.data = princ;
   princ_data.length = i;               /* include null terminator for
                                           server's convenience */
@@ -207,7 +208,7 @@ char *argv[];
       return 8;
     }
   free(princ);
-  retval = krb5_write_message(context, (krb5_pointer) &s, &creds.ticket);
+  retval = krb5_write_message(context, (krb5_pointer) &s, &new_creds->ticket);
   if (retval)
     {
       com_err("uu-client", retval, "sending ticket to server");
@@ -235,7 +236,7 @@ char *argv[];
                       &serv_addr,
                       0,               /* no fetchfrom */
                       tgt_keyproc,
-                      (krb5_pointer)&creds, /* credentials as arg to
+                      (krb5_pointer)new_creds, /* credentials as arg to
                                                keyproc */
                       0,               /* no rcache for the moment XXX */
                       &authdat);
@@ -243,7 +244,7 @@ char *argv[];
 #else
   retval = krb5_recvauth(context, (krb5_pointer)&s, "???",
                         0, /* server */
-                        &serv_addr, 0, tgt_keyproc, (krb5_pointer)&creds,
+                        &serv_addr, 0, tgt_keyproc, (krb5_pointer)new_creds,
                         0, 0,
                         0, 0, 0, 0);
 #endif
index dfa76df87c413d5088a70a47c66ca8ee19dadc13..f00fc112620ccd331bd7c1272606f3468465eef5 100644 (file)
@@ -50,7 +50,7 @@ char *argv[];
   int retval;
   struct sockaddr_in l_inaddr, f_inaddr;       /* local, foreign address */
   krb5_address laddr, faddr;
-  krb5_creds creds;
+  krb5_creds creds, *new_creds;
   krb5_ccache cc;
   krb5_data msgtext, msg;
   krb5_int32 seqno;
@@ -134,7 +134,8 @@ char *argv[];
   printf ("uu-server: client ticket is %d bytes.\n",
          creds.second_ticket.length);
 
-  if (retval = krb5_get_credentials(context, KRB5_GC_USER_USER, cc, &creds))
+  if (retval = krb5_get_credentials(context, KRB5_GC_USER_USER, cc, 
+                                   &creds, &new_creds))
     {
       com_err("uu-server", retval, "getting user-user ticket");
       return 5;
@@ -166,17 +167,15 @@ char *argv[];
   /* send a ticket/authenticator to the other side, so it can get the key
      we're using for the krb_safe below. */
 
-  if (retval = krb5_generate_seq_number(context, &creds.keyblock, &seqno)) {
+  if (retval = krb5_generate_seq_number(context, &new_creds->keyblock, &seqno)){
       com_err("uu-server", retval, "generating sequence number");
       return 8;
   }
 #if 1
   if (retval = krb5_mk_req_extended(context, AP_OPTS_USE_SESSION_KEY,
                               0,       /* no application checksum here */
-                              krb5_kdc_default_options,
                               seqno,
                               0,       /* no need for subkey */
-                              cc,
                               &creds,
                               0,       /* don't need authenticator copy */
                               &msg)) {
@@ -201,7 +200,7 @@ char *argv[];
   msgtext.data = "Hello, other end of connection.";
 
   if (retval = krb5_mk_safe(context, &msgtext, CKSUMTYPE_RSA_MD4_DES, 
-                           &creds.keyblock, &laddr, &faddr, seqno,
+                           &new_creds->keyblock, &laddr, &faddr, seqno,
                            KRB5_SAFE_NOTIME|KRB5_SAFE_DOSEQUENCE, 0, &msg))
     {
       com_err("uu-server", retval, "encoding message to client");