summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2010-01-03 23:12:19 +0000
committerGreg Hudson <ghudson@mit.edu>2010-01-03 23:12:19 +0000
commitca56ca345f0cd89c0bc1e544158a21b394c2616a (patch)
tree528e842d377e05eaa4af16723a9af399315bd438 /src
parent36bdbec726c7fd6799e08dce44fc010c5bd6ed70 (diff)
downloadkrb5-ca56ca345f0cd89c0bc1e544158a21b394c2616a.tar.gz
krb5-ca56ca345f0cd89c0bc1e544158a21b394c2616a.tar.xz
krb5-ca56ca345f0cd89c0bc1e544158a21b394c2616a.zip
Fix a case where krb5int_aes_decrypt was trying to encrypt a block
instead of decrypting it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23573 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/crypto/builtin/enc_provider/aes.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/crypto/builtin/enc_provider/aes.c b/src/lib/crypto/builtin/enc_provider/aes.c
index 0440f7ad0e..16e3932e78 100644
--- a/src/lib/crypto/builtin/enc_provider/aes.c
+++ b/src/lib/crypto/builtin/enc_provider/aes.c
@@ -193,7 +193,7 @@ krb5int_aes_decrypt(krb5_key key, const krb5_data *ivec, krb5_crypto_iov *data,
nblocks = (input_length + BLOCK_SIZE - 1) / BLOCK_SIZE;
if (nblocks == 1) {
krb5int_c_iov_get_block(tmp, BLOCK_SIZE, data, num_data, &input_pos);
- enc(tmp2, tmp, &ctx);
+ dec(tmp2, tmp, &ctx);
krb5int_c_iov_put_block(data, num_data, tmp2, BLOCK_SIZE, &output_pos);
} else if (nblocks > 1) {
unsigned char blockN2[BLOCK_SIZE]; /* second last */