svn rev #24220: branches/camellia-ccm/src/lib/crypto/krb/ checksum/ dk/
ghudson@MIT.EDU
ghudson at MIT.EDU
Fri Jul 30 14:27:29 EDT 2010
http://src.mit.edu/fisheye/changelog/krb5/?cs=24220
Commit By: ghudson
Log Message:
Remove some unnecessary casts in the camellia-ccm code. (make_data
takes void * as its first argument.)
Changed Files:
U branches/camellia-ccm/src/lib/crypto/krb/checksum/cmac.c
U branches/camellia-ccm/src/lib/crypto/krb/dk/dk_ccm.c
Modified: branches/camellia-ccm/src/lib/crypto/krb/checksum/cmac.c
===================================================================
--- branches/camellia-ccm/src/lib/crypto/krb/checksum/cmac.c 2010-07-29 21:17:30 UTC (rev 24219)
+++ branches/camellia-ccm/src/lib/crypto/krb/checksum/cmac.c 2010-07-30 18:27:29 UTC (rev 24220)
@@ -94,9 +94,9 @@
memset(Z, 0, sizeof(Z));
iov[0].flags = KRB5_CRYPTO_TYPE_DATA;
- iov[0].data = make_data((char *)Z, sizeof(Z));
+ iov[0].data = make_data(Z, sizeof(Z));
- d = make_data((char *)L, BLOCK_SIZE);
+ d = make_data(L, BLOCK_SIZE);
ret = enc->cbc_mac(key, iov, 1, NULL, &d);
if (ret != 0)
@@ -182,12 +182,12 @@
}
iov[0].flags = KRB5_CRYPTO_TYPE_DATA;
- iov[0].data = make_data((char *)input, BLOCK_SIZE);
+ iov[0].data = make_data(input, BLOCK_SIZE);
memset(Y, 0, BLOCK_SIZE);
- ivec = make_data((char *)Y, BLOCK_SIZE);
- d = make_data((char *)Y, BLOCK_SIZE);
+ ivec = make_data(Y, BLOCK_SIZE);
+ d = make_data(Y, BLOCK_SIZE);
IOV_BLOCK_STATE_INIT(&iov_state);
iov_state.include_sign_only = 1;
@@ -210,7 +210,7 @@
xor_128(padded, K2, M_last);
}
- iov[0].data = make_data((char *)M_last, BLOCK_SIZE);
+ iov[0].data = make_data(M_last, BLOCK_SIZE);
ret = enc->cbc_mac(key, iov, 1, &ivec, &d);
if (ret != 0)
Modified: branches/camellia-ccm/src/lib/crypto/krb/dk/dk_ccm.c
===================================================================
--- branches/camellia-ccm/src/lib/crypto/krb/dk/dk_ccm.c 2010-07-29 21:17:30 UTC (rev 24219)
+++ branches/camellia-ccm/src/lib/crypto/krb/dk/dk_ccm.c 2010-07-30 18:27:29 UTC (rev 24220)
@@ -269,7 +269,7 @@
size_t adata_len = 0;
char adata_len_buf[6];
unsigned char B0[16], Ctr[16];
- krb5_data counter = make_data((char *)Ctr, sizeof(Ctr));
+ krb5_data counter = make_data(Ctr, sizeof(Ctr));
header_len = ktp->crypto_length(ktp, KRB5_CRYPTO_TYPE_HEADER);
@@ -328,7 +328,7 @@
goto cleanup;
sign_data[num_sign_data].flags = KRB5_CRYPTO_TYPE_HEADER;
- sign_data[num_sign_data].data = make_data((char *)B0, sizeof(B0));
+ sign_data[num_sign_data].data = make_data(B0, sizeof(B0));
ret = format_B0(&sign_data[num_sign_data].data, &header->data, trailer_len,
(krb5_ui_8)adata_len, (krb5_ui_8)payload_len);
if (ret != 0)
@@ -439,7 +439,7 @@
char adata_len_buf[6];
unsigned char B0[16], Ctr[16];
krb5_data made_cksum = empty_data();
- krb5_data counter = make_data((char *)Ctr, sizeof(Ctr));
+ krb5_data counter = make_data(Ctr, sizeof(Ctr));
header_len = ktp->crypto_length(ktp, KRB5_CRYPTO_TYPE_HEADER);
@@ -493,7 +493,7 @@
goto cleanup;
sign_data[num_sign_data].flags = KRB5_CRYPTO_TYPE_HEADER;
- sign_data[num_sign_data].data = make_data((char *)B0, sizeof(B0));
+ sign_data[num_sign_data].data = make_data(B0, sizeof(B0));
ret = format_B0(&sign_data[num_sign_data].data, &header->data, trailer_len,
(krb5_ui_8)adata_len, (krb5_ui_8)payload_len);
if (ret != 0)
More information about the cvs-krb5
mailing list