* sclient.c Use new calling convention for krb5_sendauth()
authorChris Provenzano <proven@mit.edu>
Fri, 10 Mar 1995 17:29:43 +0000 (17:29 +0000)
committerChris Provenzano <proven@mit.edu>
Fri, 10 Mar 1995 17:29:43 +0000 (17:29 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5103 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/sample/sclient/ChangeLog
src/appl/sample/sclient/sclient.c

index 2243c8d58d85b1d86eb523bf4deaf97f03941c5b..4e7296c6fda68aedc0af1d3a77b25ed03fd7fc7c 100644 (file)
@@ -1,3 +1,7 @@
+Fri Mar 10 11:09:34 1995  Chris Provenzano (proven@mit.edu)
+
+        * sclient.c Use new calling convention for krb5_sendauth().
+
 Thu Mar  2 12:27:22 1995  Theodore Y. Ts'o  <tytso@dcl>
 
        * Makefile.in (ISODELIB): Remove reference to $(ISODELIB).
index ec4c5a1302d0b0b0fbece9b21d335be22a373da6..2a61b197a07d723674c2f22c96846a4010bb30f9 100644 (file)
@@ -51,12 +51,13 @@ char *argv[];
     int sock, namelen;
     krb5_context context;
     krb5_data recv_data;
-    krb5_checksum send_cksum;
+    krb5_data cksum_data;
     krb5_error_code retval;
     krb5_ccache ccdef;
     krb5_principal client, server;
     krb5_error *err_ret;
     krb5_ap_rep_enc_part *rep_ret;
+    krb5_auth_context * auth_context;
     short xmitlen;
 
     if (argc != 2 && argc != 3) {
@@ -135,23 +136,8 @@ char *argv[];
        exit(1);
     }
 
-    /* compute checksum, using CRC-32 */
-    if (!(send_cksum.contents = (krb5_octet *)
-         malloc(krb5_checksum_size(context, CKSUMTYPE_CRC32)))) {
-       com_err(argv[0], ENOMEM, "while allocating checksum");
-       exit(1);
-    }
-    /* choose some random stuff to compute checksum from */
-    if (retval = krb5_calculate_checksum(context, CKSUMTYPE_CRC32,
-                                        argv[1],
-                                        strlen(argv[1]),
-                                        0,
-                                        0, /* if length is 0, crc-32 doesn't
-                                              use the seed */
-                                        &send_cksum)) {
-       com_err(argv[0], retval, "while computing checksum");
-       exit(1);
-    }
+    cksum_data.data = argv[1];
+    cksum_data.length = strlen(argv[1]);
 
     if (retval = krb5_cc_default(context, &ccdef)) {
        com_err(argv[0], retval, "while getting default ccache");
@@ -162,16 +148,12 @@ char *argv[];
        com_err(argv[0], retval, "while getting client principal name");
        exit(1);
     }
-    retval = krb5_sendauth(context, (krb5_pointer) &sock,
+    retval = krb5_sendauth(context, &auth_context, (krb5_pointer) &sock,
                           SAMPLE_VERSION, client, server,
                           AP_OPTS_MUTUAL_REQUIRED,
-                          &send_cksum,
+                          &cksum_data,
                           0,           /* no creds, use ccache instead */
-                          ccdef,
-                          0,           /* don't need seq # */
-                          0,           /* don't need a subsession key */
-                          &err_ret,
-                          &rep_ret, NULL);
+                          ccdef, &err_ret, &rep_ret, NULL);
 
     krb5_free_principal(context, server);      /* finished using it */