* descbc.c, k5_md4des.c, k5_md5des.c, t_cksum.c: Cleanup unsigned
authorEzra Peisach <epeisach@mit.edu>
Mon, 25 Sep 2000 17:14:38 +0000 (17:14 +0000)
committerEzra Peisach <epeisach@mit.edu>
Mon, 25 Sep 2000 17:14:38 +0000 (17:14 +0000)
vs. signed warnings.

* Makefile.in (t_cksum5, t_cksum4): Executables do not need to
link with the krb5 library.

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

src/lib/crypto/keyhash_provider/ChangeLog
src/lib/crypto/keyhash_provider/Makefile.in
src/lib/crypto/keyhash_provider/descbc.c
src/lib/crypto/keyhash_provider/k5_md4des.c
src/lib/crypto/keyhash_provider/k5_md5des.c
src/lib/crypto/keyhash_provider/t_cksum.c

index 9e28d058da9920c08aec2fd6978c121eab2f9f5c..92b15c31e332e1189967ea517a7a74fd16f0d597 100644 (file)
@@ -1,3 +1,11 @@
+2000-09-25  Ezra Peisach  <epeisach@mit.edu>
+
+       * descbc.c, k5_md4des.c, k5_md5des.c, t_cksum.c: Cleanup unsigned
+       vs. signed warnings.
+
+       * Makefile.in (t_cksum5, t_cksum4): Executables do not need to
+       link with the krb5 library.
+
 2000-06-28  Ezra Peisach  <epeisach@mit.edu>
 
        * descbc.c (k5_descbc_hash): Get rid of unused variable.
index 50c9d352f71b1e086968980a66c97d2b344c07fc..3d29c3e4fd57a6f3422a8a72c4dadd61241e909c 100644 (file)
@@ -35,11 +35,11 @@ t_cksum4.o: $(srcdir)/t_cksum.c
 t_cksum5.o: $(srcdir)/t_cksum.c
        $(CC) -DMD=5 $(ALL_CFLAGS) -o t_cksum5.o -c $(srcdir)/t_cksum.c
 
-t_cksum4: t_cksum4.o $(KRB5_BASE_DEPLIBS)
-       $(CC_LINK) -o t_cksum4 t_cksum4.o $(KRB5_BASE_LIBS)
+t_cksum4: t_cksum4.o $(CRYTPO_DEPLIB)
+       $(CC_LINK) -o t_cksum4 t_cksum4.o $(K5CRYPTO_LIB)
 
-t_cksum5: t_cksum5.o $(KRB5_BASE_DEPLIBS)
-       $(CC_LINK) -o t_cksum5 t_cksum5.o $(KRB5_BASE_LIBS)
+t_cksum5: t_cksum5.o $(CRYPTO_DEPLIB)
+       $(CC_LINK) -o t_cksum5 t_cksum5.o $(K5CRYPTO_LIB)
 
 check-unix:: t_cksum4 t_cksum5
        $(RUN_SETUP) $(C)t_cksum4 "this is a test"
index c608bec2667dc79b6eaee61a6e053df934d6e962..53a0e47f95b44f1f8dee3e652a659240747f054c 100644 (file)
@@ -60,8 +60,11 @@ k5_descbc_hash(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
 
     /* this has a return value, but it's useless to us */
 
-    mit_des_cbc_cksum(input->data, output->data, input->length,
-                     schedule, ivec?ivec->data:(char *)mit_des_zeroblock);
+    mit_des_cbc_cksum((unsigned char *) input->data, 
+                     (unsigned char *) output->data, input->length,
+                     schedule, 
+                     ivec? (unsigned char *)ivec->data: 
+                           (unsigned char *)mit_des_zeroblock);
 
     memset(schedule, 0, sizeof(schedule));
 
index 7cefa98c3b46b78315d8009fbfd58a7a608fbfb5..360a81009fe3d09ca273eaf352a6d984644f8815 100644 (file)
@@ -69,7 +69,7 @@ k5_md4des_hash(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
     /* create the confouder */
 
     data.length = CONFLENGTH;
-    data.data = conf;
+    data.data = (char *) conf;
     if ((ret = krb5_c_random_make_octets(/* XXX */ 0, &data)))
        return(ret);
 
@@ -90,7 +90,8 @@ k5_md4des_hash(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
 
     krb5_MD4Init(&ctx);
     krb5_MD4Update(&ctx, conf, CONFLENGTH);
-    krb5_MD4Update(&ctx, input->data, input->length);
+    krb5_MD4Update(&ctx, (unsigned char *) input->data,
+                  (unsigned int) input->length);
     krb5_MD4Final(&ctx);
 
     /* construct the buffer to be encrypted */
@@ -103,7 +104,7 @@ k5_md4des_hash(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
 
     mit_des_cbc_encrypt((krb5_pointer) output->data,
                        (krb5_pointer) output->data, output->length,
-                       schedule, (char *) mit_des_zeroblock, 1);
+                       schedule, (unsigned char *) mit_des_zeroblock, 1);
 
     return(0);
 }
@@ -157,7 +158,7 @@ k5_md4des_verify(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
     if (!compathash) {
        mit_des_cbc_encrypt((krb5_pointer) hash->data,
                            (krb5_pointer) plaintext, hash->length,
-                           schedule, (char *) mit_des_zeroblock, 0);
+                           schedule, (unsigned char *) mit_des_zeroblock, 0);
     } else {
        mit_des_cbc_encrypt((krb5_pointer) hash->data,
                            (krb5_pointer) plaintext, hash->length,
@@ -170,7 +171,8 @@ k5_md4des_verify(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
     if (!compathash) {
        krb5_MD4Update(&ctx, plaintext, CONFLENGTH);
     }
-    krb5_MD4Update(&ctx, input->data, input->length);
+    krb5_MD4Update(&ctx, (unsigned char *) input->data, 
+                  (unsigned int) input->length);
     krb5_MD4Final(&ctx);
 
     /* compare the decrypted hash to the computed one */
index 7886139044017b5d4c6aa33fc43c67eae7395d92..bf9e5f7be4a020c9c031135ef5da18cd04e3a97e 100644 (file)
@@ -69,7 +69,7 @@ k5_md5des_hash(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
     /* create the confouder */
 
     data.length = CONFLENGTH;
-    data.data = conf;
+    data.data = (char *) conf;
     if ((ret = krb5_c_random_make_octets(/* XXX */ 0, &data)))
        return(ret);
 
@@ -90,7 +90,8 @@ k5_md5des_hash(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
 
     krb5_MD5Init(&ctx);
     krb5_MD5Update(&ctx, conf, CONFLENGTH);
-    krb5_MD5Update(&ctx, input->data, input->length);
+    krb5_MD5Update(&ctx, (unsigned char *) input->data, 
+                  (unsigned int) input->length);
     krb5_MD5Final(&ctx);
 
     /* construct the buffer to be encrypted */
@@ -103,7 +104,7 @@ k5_md5des_hash(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
 
     mit_des_cbc_encrypt((krb5_pointer) output->data,
                        (krb5_pointer) output->data, output->length,
-                       schedule, (char *) mit_des_zeroblock, 1);
+                       schedule, (unsigned char *) mit_des_zeroblock, 1);
 
     return(0);
 }
@@ -156,7 +157,7 @@ k5_md5des_verify(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
     if (!compathash) {
        mit_des_cbc_encrypt((krb5_pointer) hash->data,
                            (krb5_pointer) plaintext, hash->length,
-                           schedule, (char *) mit_des_zeroblock, 0);
+                           schedule, (unsigned char *) mit_des_zeroblock, 0);
     } else {
        mit_des_cbc_encrypt((krb5_pointer) hash->data,
                            (krb5_pointer) plaintext, hash->length,
@@ -169,7 +170,8 @@ k5_md5des_verify(krb5_const krb5_keyblock *key, krb5_const krb5_data *ivec,
     if (!compathash) {
        krb5_MD5Update(&ctx, plaintext, CONFLENGTH);
     }
-    krb5_MD5Update(&ctx, input->data, input->length);
+    krb5_MD5Update(&ctx, (unsigned char *) input->data, 
+                  (unsigned) input->length);
     krb5_MD5Final(&ctx);
 
     /* compare the decrypted hash to the computed one */
index b153103498e4d2d68672616dc6372508a05d3cea..9ef58a0898ce71fd9b2ba5a7c65b72e3a9918579 100644 (file)
@@ -74,7 +74,6 @@ main(argc, argv)
   int                  msgindex;
   krb5_boolean         valid;
   size_t               length;
-  krb5_context         kcontext;
   krb5_keyblock                keyblock;
   krb5_error_code      kret;
   krb5_data            plaintext, newstyle_checksum;
@@ -82,7 +81,7 @@ main(argc, argv)
   /* this is a terrible seed, but that's ok for the test. */
 
   plaintext.length = 8;
-  plaintext.data = testkey;
+  plaintext.data = (char *) testkey;
 
   krb5_c_random_seed(/* XXX */ 0, &plaintext);
 
@@ -94,8 +93,8 @@ main(argc, argv)
 
   newstyle_checksum.length = length;
 
-  if (!(newstyle_checksum.data = (krb5_octet *)
-       malloc(newstyle_checksum.length))) {
+  if (!(newstyle_checksum.data = (char *)
+       malloc((unsigned) newstyle_checksum.length))) {
     printf("cannot get memory for new style checksum\n");
     return(ENOMEM);
   }