diff options
author | Greg Hudson <ghudson@mit.edu> | 2010-07-30 18:27:29 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2010-07-30 18:27:29 +0000 |
commit | 1ac070880d81a541735986eede6a37a5e60073c5 (patch) | |
tree | 9561a4c435eefd50b10215028d240c29ea41a72e /src | |
parent | 597edcbc6b1ee68b0318593df245d4415f59d5f2 (diff) | |
download | krb5-1ac070880d81a541735986eede6a37a5e60073c5.zip krb5-1ac070880d81a541735986eede6a37a5e60073c5.tar.gz krb5-1ac070880d81a541735986eede6a37a5e60073c5.tar.bz2 |
Remove some unnecessary casts in the camellia-ccm code. (make_data
takes void * as its first argument.)
git-svn-id: svn://anonsvn.mit.edu/krb5/branches/camellia-ccm@24220 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/crypto/krb/checksum/cmac.c | 12 | ||||
-rw-r--r-- | src/lib/crypto/krb/dk/dk_ccm.c | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/crypto/krb/checksum/cmac.c b/src/lib/crypto/krb/checksum/cmac.c index bcb6049..5f4aefb 100644 --- a/src/lib/crypto/krb/checksum/cmac.c +++ b/src/lib/crypto/krb/checksum/cmac.c @@ -94,9 +94,9 @@ generate_subkey(const struct krb5_enc_provider *enc, 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 @@ krb5int_cmac_checksum(const struct krb5_enc_provider *enc, krb5_key key, } 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 @@ krb5int_cmac_checksum(const struct krb5_enc_provider *enc, krb5_key key, 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) diff --git a/src/lib/crypto/krb/dk/dk_ccm.c b/src/lib/crypto/krb/dk/dk_ccm.c index 36f53d2..7157024 100644 --- a/src/lib/crypto/krb/dk/dk_ccm.c +++ b/src/lib/crypto/krb/dk/dk_ccm.c @@ -269,7 +269,7 @@ ccm_encrypt(const struct krb5_keytypes *ktp, 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 @@ ccm_encrypt(const struct krb5_keytypes *ktp, 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 @@ ccm_decrypt(const struct krb5_keytypes *ktp, 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 @@ ccm_decrypt(const struct krb5_keytypes *ktp, 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) |