svn rev #25038: trunk/src/lib/crypto/krb/
ghudson@MIT.EDU
ghudson at MIT.EDU
Fri Jul 22 12:58:35 EDT 2011
http://src.mit.edu/fisheye/changelog/krb5/?cs=25038
Commit By: ghudson
Log Message:
Rename "ivec" to "cipher_state" in encrypt/decrypt.
This makes the implementations match up with the prototypes, and is
more correct for enctypes like RC4 where the cipher state is not an
ivec.
Changed Files:
U trunk/src/lib/crypto/krb/decrypt.c
U trunk/src/lib/crypto/krb/encrypt.c
Modified: trunk/src/lib/crypto/krb/decrypt.c
===================================================================
--- trunk/src/lib/crypto/krb/decrypt.c 2011-07-22 16:56:36 UTC (rev 25037)
+++ trunk/src/lib/crypto/krb/decrypt.c 2011-07-22 16:58:35 UTC (rev 25038)
@@ -29,7 +29,7 @@
krb5_error_code KRB5_CALLCONV
krb5_k_decrypt(krb5_context context, krb5_key key,
- krb5_keyusage usage, const krb5_data *ivec,
+ krb5_keyusage usage, const krb5_data *cipher_state,
const krb5_enc_data *input, krb5_data *output)
{
const struct krb5_keytypes *ktp;
@@ -75,7 +75,7 @@
memcpy(iov[3].data.data, input->ciphertext.data + header_len + plain_len,
trailer_len);
- ret = ktp->decrypt(ktp, key, usage, ivec, iov, 4);
+ ret = ktp->decrypt(ktp, key, usage, cipher_state, iov, 4);
if (ret != 0)
zap(output->data, plain_len);
else
@@ -86,7 +86,7 @@
krb5_error_code KRB5_CALLCONV
krb5_c_decrypt(krb5_context context, const krb5_keyblock *keyblock,
- krb5_keyusage usage, const krb5_data *ivec,
+ krb5_keyusage usage, const krb5_data *cipher_state,
const krb5_enc_data *input, krb5_data *output)
{
krb5_key key;
@@ -95,7 +95,7 @@
ret = krb5_k_create_key(context, keyblock, &key);
if (ret != 0)
return ret;
- ret = krb5_k_decrypt(context, key, usage, ivec, input, output);
+ ret = krb5_k_decrypt(context, key, usage, cipher_state, input, output);
krb5_k_free_key(context, key);
return ret;
}
Modified: trunk/src/lib/crypto/krb/encrypt.c
===================================================================
--- trunk/src/lib/crypto/krb/encrypt.c 2011-07-22 16:56:36 UTC (rev 25037)
+++ trunk/src/lib/crypto/krb/encrypt.c 2011-07-22 16:58:35 UTC (rev 25038)
@@ -29,7 +29,7 @@
krb5_error_code KRB5_CALLCONV
krb5_k_encrypt(krb5_context context, krb5_key key,
- krb5_keyusage usage, const krb5_data *ivec,
+ krb5_keyusage usage, const krb5_data *cipher_state,
const krb5_data *input, krb5_enc_data *output)
{
const struct krb5_keytypes *ktp;
@@ -68,7 +68,7 @@
iov[3].flags = KRB5_CRYPTO_TYPE_TRAILER;
iov[3].data = make_data(iov[2].data.data + padding_len, trailer_len);
- ret = ktp->encrypt(ktp, key, usage, ivec, iov, 4);
+ ret = ktp->encrypt(ktp, key, usage, cipher_state, iov, 4);
if (ret != 0)
zap(iov[1].data.data, iov[1].data.length);
else
@@ -78,7 +78,7 @@
krb5_error_code KRB5_CALLCONV
krb5_c_encrypt(krb5_context context, const krb5_keyblock *keyblock,
- krb5_keyusage usage, const krb5_data *ivec,
+ krb5_keyusage usage, const krb5_data *cipher_state,
const krb5_data *input, krb5_enc_data *output)
{
krb5_key key;
@@ -87,7 +87,7 @@
ret = krb5_k_create_key(context, keyblock, &key);
if (ret != 0)
return ret;
- ret = krb5_k_encrypt(context, key, usage, ivec, input, output);
+ ret = krb5_k_encrypt(context, key, usage, cipher_state, input, output);
krb5_k_free_key(context, key);
return ret;
}
More information about the cvs-krb5
mailing list