summaryrefslogtreecommitdiffstats
path: root/cryptodev_cipher.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-24 13:43:43 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-24 18:38:58 +0200
commitffb3e747f8b50ca18701530d1729a4ee3aa4ae69 (patch)
treeefa9b3552566ce2891c1c105cd9fd5f4c3baa269 /cryptodev_cipher.c
parent4b45720ea1dffc3514c81439c7f93928d05c5521 (diff)
downloadkernel-crypto-ffb3e747f8b50ca18701530d1729a4ee3aa4ae69.tar.gz
kernel-crypto-ffb3e747f8b50ca18701530d1729a4ee3aa4ae69.tar.xz
kernel-crypto-ffb3e747f8b50ca18701530d1729a4ee3aa4ae69.zip
Added a support for reading session data directly from userspace.
Diffstat (limited to 'cryptodev_cipher.c')
-rw-r--r--cryptodev_cipher.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cryptodev_cipher.c b/cryptodev_cipher.c
index fa5aab28942..0dd0db77120 100644
--- a/cryptodev_cipher.c
+++ b/cryptodev_cipher.c
@@ -188,24 +188,24 @@ struct scatterlist sg, sg2;
}
-ssize_t cryptodev_cipher_encrypt( struct cipher_data* cdata, struct scatterlist *sg1, struct scatterlist *sg2, size_t len)
+ssize_t cryptodev_cipher_encrypt( struct cipher_data* cdata, const struct scatterlist *sg1, struct scatterlist *sg2, size_t len)
{
int ret;
INIT_COMPLETION(cdata->async.result->completion);
- ablkcipher_request_set_crypt(cdata->async.request, sg1, sg2,
+ ablkcipher_request_set_crypt(cdata->async.request, (struct scatterlist*)sg1, sg2,
len, cdata->async.iv);
ret = crypto_ablkcipher_encrypt(cdata->async.request);
return waitfor(cdata->async.result,ret);
}
-ssize_t cryptodev_cipher_decrypt( struct cipher_data* cdata, struct scatterlist *sg1, struct scatterlist *sg2, size_t len)
+ssize_t cryptodev_cipher_decrypt( struct cipher_data* cdata, const struct scatterlist *sg1, struct scatterlist *sg2, size_t len)
{
int ret;
INIT_COMPLETION(cdata->async.result->completion);
- ablkcipher_request_set_crypt(cdata->async.request, sg1, sg2,
+ ablkcipher_request_set_crypt(cdata->async.request, (struct scatterlist*)sg1, sg2,
len, cdata->async.iv);
ret = crypto_ablkcipher_decrypt(cdata->async.request);