summaryrefslogtreecommitdiff
path: root/storage/maria
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-03-26 17:40:52 +0100
committerSergei Golubchik <serg@mariadb.org>2015-04-08 10:58:48 +0200
commit817a63f273a3797bf2cb6317d89fca196c0b0bfc (patch)
tree66a432046e1c6d439e45cb6e3f2f5a5b2eba9f9c /storage/maria
parent2643cc545fe76ee59883497cf50fc64c7be975b2 (diff)
downloadmariadb-git-817a63f273a3797bf2cb6317d89fca196c0b0bfc.tar.gz
pass the correct key length to encryption routines
Diffstat (limited to 'storage/maria')
-rw-r--r--storage/maria/ma_crypt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/storage/maria/ma_crypt.c b/storage/maria/ma_crypt.c
index 23338bc8b15..c471a246bbf 100644
--- a/storage/maria/ma_crypt.c
+++ b/storage/maria/ma_crypt.c
@@ -411,7 +411,6 @@ static int ma_encrypt(MARIA_CRYPT_DATA *crypt_data,
int rc;
uint32 dstlen;
uchar counter[COUNTER_LEN];
- uchar *key= crypt_data->iv;
// create counter block
memcpy(counter + 0, crypt_data->iv + CRYPT_SCHEME_1_IV_LEN, 4);
@@ -420,7 +419,7 @@ static int ma_encrypt(MARIA_CRYPT_DATA *crypt_data,
rc = my_aes_encrypt_dynamic(src, size,
dst, &dstlen,
- key, sizeof(crypt_data->iv),
+ crypt_data->iv, CRYPT_SCHEME_1_IV_LEN,
counter, sizeof(counter),
1);
@@ -447,7 +446,6 @@ static int ma_decrypt(MARIA_CRYPT_DATA *crypt_data,
int rc;
uint32 dstlen;
uchar counter[COUNTER_LEN];
- uchar *key= crypt_data->iv;
// create counter block
memcpy(counter + 0, crypt_data->iv + CRYPT_SCHEME_1_IV_LEN, 4);
@@ -456,7 +454,7 @@ static int ma_decrypt(MARIA_CRYPT_DATA *crypt_data,
rc = my_aes_decrypt_dynamic(src, size,
dst, &dstlen,
- key, sizeof(crypt_data->iv),
+ crypt_data->iv, CRYPT_SCHEME_1_IV_LEN,
counter, sizeof(counter),
1);