+2001-04-10 Ken Raeburn <raeburn@mit.edu>
+
+ * make_checksum.c (krb5_c_make_checksum): Add cast assigning to
+ krb5_data data field.
+ * make_random_key.c (krb5_c_make_random_key): Likewise.
+
+ * keyed_cksum.c (is_keyed_cksum): Use -1U to keep compiler quiet,
+ since return type is not signed.
+
2001-03-14 Ken Raeburn <raeburn@mit.edu>
* t_nfold.c: Include assert.h.
2001-04-10 Ken Raeburn <raeburn@mit.edu>
+ * t_afss2k.c (do_it): Add cast to keep compiler quiet.
+
* f_cksum.c (mit_des_cbc_cksum): Use const for input, key
schedule, and initial vector. Get rid of casts when possible.
* f_cbc.c (mit_des_cbc_encrypt): Likewise.
abort ();
}
+ /* Run another pass to make sure the characters after the
+ password in the buffer aren't influencing the output. The
+ password is *not* required to be null-terminated. */
memset (longpass, '!', sizeof (longpass));
longpass[sizeof (longpass)-1] = '\0';
memcpy (longpass, "My Password", strlen ("My Password"));
- passwd.data = longpass;
+ passwd.data = (char *) longpass;
for (i = 0; i < 12; i++) {
passwd.length = i;
err = mit_afs_string_to_key (&key, &passwd, &salt);
+2001-04-10 Ken Raeburn <raeburn@mit.edu>
+
+ * checksum.c (krb5_dk_make_checksum): Add casts when mixing
+ pointers with different target signedness.
+ * dk_decrypt.c (krb5_dk_decrypt): Likewise.
+ * stringtokey.c (krb5_dk_string_to_key): Likewise.
+
2001-03-05 Ken Raeburn <raeburn@mit.edu>
* checksum.c, derive.c, dk.h, dk_decrypt.c, dk_encrypt.c,
/* derive the key */
- datain.data = constantdata;
+ datain.data = (char *) constantdata;
datain.length = K5CLENGTH;
datain.data[0] = (usage>>24)&0xff;
/* derive the keys */
- d1.data = constantdata;
+ d1.data = (char *) constantdata;
d1.length = K5CLENGTH;
d1.data[0] = (usage>>24)&0xff;
d1.data = input->data;
d2.length = enclen;
- d2.data = plaindata;
+ d2.data = (char *) plaindata;
if ((ret = ((*(enc->decrypt))(&ke, ivec, &d1, &d2))) != 0)
goto cleanup;
if (ivec != NULL && ivec->length == blocksize)
- cn = d1.data + d1.length - blocksize;
+ cn = (unsigned char *) d1.data + d1.length - blocksize;
else
cn = NULL;
/* verify the hash */
d1.length = hashsize;
- d1.data = cksum;
+ d1.data = (char *) cksum;
if ((ret = krb5_hmac(hash, &ki, 1, &d2, &d1)) != 0)
goto cleanup;
/* now derive the key from this one */
indata.length = kerberos_len;
- indata.data = (unsigned char *) kerberos;
+ indata.data = (char *) kerberos;
if ((ret = krb5_derive_key(enc, &foldkey, key, &indata)))
memset(key->contents, 0, key->length);
+2001-04-10 Ken Raeburn <raeburn@mit.edu>
+
+ * des.c (k5_des_docrypt): Add casts when mixing pointer types with
+ different target signedness.
+ * des3.c (k5_des3_docrypt): Likewise.
+
2001-03-09 Ken Raeburn <raeburn@mit.edu>
* des.c, des3.c, enc_provider.h: Use krb5int_ prefix for internal
mit_des_cbc_encrypt((krb5_pointer) input->data,
(krb5_pointer) output->data, input->length,
- schedule, ivec?ivec->data:(char *)mit_des_zeroblock,
+ schedule,
+ (ivec
+ ? (unsigned char *) ivec->data
+ : (unsigned char *) mit_des_zeroblock),
encrypt);
memset(schedule, 0, sizeof(schedule));
mit_des3_cbc_encrypt((krb5_pointer) input->data,
(krb5_pointer) output->data, input->length,
schedule[0], schedule[1], schedule[2],
- ivec?ivec->data:(char *)mit_des_zeroblock,
+ ivec?(unsigned char *) ivec->data:(unsigned char *)mit_des_zeroblock,
encrypt);
memset(schedule, 0, sizeof(schedule));
/* ick, but it's better than coredumping, which is what the
old code would have done */
- return(-1);
+ return -1U;
}
return(ENOMEM);
data.length = cksum->length;
- data.data = cksum->contents;
+ data.data = (char *) cksum->contents;
if (krb5_cksumtypes_list[i].keyhash) {
/* check if key is compatible */
return(ENOMEM);
}
- random_data.data = bytes;
+ random_data.data = (char *) bytes;
random_data.length = keybytes;
if ((ret = krb5_c_random_make_octets(context, &random_data)))
+2001-04-10 Ken Raeburn <raeburn@mit.edu>
+
+ * old_decrypt.c (krb5_old_decrypt): Fix casts.
+ * old_encrypt.c (krb5_old_encrypt): Likewise.
+
2001-03-13 Ken Raeburn <raeburn@mit.edu>
* Makefile.in (STLIBOBJS): Undo last change.
if (arg_output->length < input->length) {
output.length = input->length;
- if ((output.data = (krb5_octet *) malloc(output.length)) == NULL) {
+ if ((output.data = (char *) malloc(output.length)) == NULL) {
free(cksumdata);
return(ENOMEM);
}
/* XXX this is gross, but I don't have much choice */
if ((key->enctype == ENCTYPE_DES_CBC_CRC) && (ivec == 0)) {
crcivec.length = key->length;
- crcivec.data = key->contents;
+ crcivec.data = (char *) key->contents;
ivec = &crcivec;
}
/* XXX this is gross, but I don't have much choice */
if ((key->enctype == ENCTYPE_DES_CBC_CRC) && (ivec == 0)) {
crcivec.length = key->length;
- crcivec.data = key->contents;
+ crcivec.data = (char *) key->contents;
ivec = &crcivec;
real_ivec = 0;
} else