summaryrefslogtreecommitdiffstats
path: root/cryptodev_main.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-02-19 20:10:30 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-02-19 20:10:30 +0100
commit119103e0e156be1b4a9cae5b6e5855b561292caa (patch)
tree9f6c48e9b60e8f5f08abdb86914c25c8c1d697ae /cryptodev_main.c
parent28bde7b11127a67908909922ab9248e114f0232e (diff)
downloadcryptodev-linux-119103e0e156be1b4a9cae5b6e5855b561292caa.tar.gz
cryptodev-linux-119103e0e156be1b4a9cae5b6e5855b561292caa.tar.xz
cryptodev-linux-119103e0e156be1b4a9cae5b6e5855b561292caa.zip
Corrected bug in IV setting for ciphers.
Diffstat (limited to 'cryptodev_main.c')
-rw-r--r--cryptodev_main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/cryptodev_main.c b/cryptodev_main.c
index 139bb26..c065065 100644
--- a/cryptodev_main.c
+++ b/cryptodev_main.c
@@ -357,7 +357,7 @@ crypto_get_session_by_sid(struct fcrypt *fcr, uint32_t sid)
static int
crypto_run(struct fcrypt *fcr, struct crypt_op *cop)
{
- char *data, ivp[EALG_MAX_BLOCK_LEN];
+ char *data;
char __user *src, __user *dst;
struct scatterlist sg;
struct csession *ses_ptr;
@@ -411,8 +411,7 @@ crypto_run(struct fcrypt *fcr, struct crypt_op *cop)
ivsize = ses_ptr->cdata.ivsize;
if (cop->iv) {
- copy_from_user(ivp, cop->iv, ivsize);
- cryptodev_cipher_set_iv(&ses_ptr->cdata, ivp, ivsize);
+ cryptodev_cipher_set_iv(&ses_ptr->cdata, cop->iv, ivsize);
}
}