From 0e721ac570d8841fd6323179c0775cef777ede09 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Fri, 22 Jul 2011 16:58:35 +0000 Subject: [PATCH] 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25038 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/krb/decrypt.c | 8 ++++---- src/lib/crypto/krb/encrypt.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/crypto/krb/decrypt.c b/src/lib/crypto/krb/decrypt.c index 775e10a9b..496d262e9 100644 --- a/src/lib/crypto/krb/decrypt.c +++ b/src/lib/crypto/krb/decrypt.c @@ -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 @@ krb5_k_decrypt(krb5_context context, krb5_key key, 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_k_decrypt(krb5_context context, krb5_key key, 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 @@ krb5_c_decrypt(krb5_context context, const krb5_keyblock *keyblock, 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; } diff --git a/src/lib/crypto/krb/encrypt.c b/src/lib/crypto/krb/encrypt.c index 3c7bbdacd..f46fb1370 100644 --- a/src/lib/crypto/krb/encrypt.c +++ b/src/lib/crypto/krb/encrypt.c @@ -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 @@ krb5_k_encrypt(krb5_context context, krb5_key key, 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_k_encrypt(krb5_context context, krb5_key key, 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 @@ krb5_c_encrypt(krb5_context context, const krb5_keyblock *keyblock, 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; } -- 2.26.2