+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.
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"
/* 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));
/* 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);
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 */
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);
}
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,
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 */
/* 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);
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 */
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);
}
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,
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 */
int msgindex;
krb5_boolean valid;
size_t length;
- krb5_context kcontext;
krb5_keyblock keyblock;
krb5_error_code kret;
krb5_data plaintext, newstyle_checksum;
/* 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);
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);
}