From ca56ca345f0cd89c0bc1e544158a21b394c2616a Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Sun, 3 Jan 2010 23:12:19 +0000 Subject: [PATCH] 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 --- src/lib/crypto/builtin/enc_provider/aes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/crypto/builtin/enc_provider/aes.c b/src/lib/crypto/builtin/enc_provider/aes.c index 0440f7ad0..16e3932e7 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 */ -- 2.26.2