diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-02-19 20:10:30 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-02-19 20:10:30 +0100 |
commit | 119103e0e156be1b4a9cae5b6e5855b561292caa (patch) | |
tree | 9f6c48e9b60e8f5f08abdb86914c25c8c1d697ae /cryptodev_main.c | |
parent | 28bde7b11127a67908909922ab9248e114f0232e (diff) | |
download | cryptodev-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.c | 5 |
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); } } |