diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2011-07-24 14:17:58 +0000 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2011-07-24 14:17:58 +0000 |
commit | 00dd85d8f61db55d6e08d224ed30f077075e9766 (patch) | |
tree | 7cabb1d9085c88122c18b953a731e548953a544b /target/linux/generic/files/crypto/ocf/pasemi | |
parent | 8ecad9c51ad06d4eaa325e5a9f4c42adb4b4eecb (diff) | |
download | mtk-20170518-00dd85d8f61db55d6e08d224ed30f077075e9766.zip mtk-20170518-00dd85d8f61db55d6e08d224ed30f077075e9766.tar.gz mtk-20170518-00dd85d8f61db55d6e08d224ed30f077075e9766.tar.bz2 |
ocf-linux: version bump to 20110720
Fixes problem with TFM allocation in cryptosoft.c
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Hauke:
* remove ubsec_ssb package and take it from ocf-linux
* use patches from ocf-linux package
* refresh all patches
* readd some build fixes for OpenWrt.
* readd CRYPTO_MANAGER dependency
SVN-Revision: 27753
Diffstat (limited to 'target/linux/generic/files/crypto/ocf/pasemi')
-rw-r--r-- | target/linux/generic/files/crypto/ocf/pasemi/pasemi.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/target/linux/generic/files/crypto/ocf/pasemi/pasemi.c b/target/linux/generic/files/crypto/ocf/pasemi/pasemi.c index e259dd3..1b4333c 100644 --- a/target/linux/generic/files/crypto/ocf/pasemi/pasemi.c +++ b/target/linux/generic/files/crypto/ocf/pasemi/pasemi.c @@ -18,10 +18,8 @@ */ #include <linux/version.h> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) -#include <generated/autoconf.h> -#else -#include <linux/autoconf.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) && !defined(AUTOCONF_INCLUDED) +#include <linux/config.h> #endif #include <linux/module.h> #include <linux/init.h> @@ -240,11 +238,6 @@ pasemi_newsession(device_t dev, u_int32_t *sidp, struct cryptoini *cri) if (encini) { ses->ccmd = ccmd; - - /* get an IV */ - /* XXX may read fewer than requested */ - get_random_bytes(ses->civ, sizeof(ses->civ)); - ses->keysz = (encini->cri_klen - 63) / 64; memcpy(ses->key, encini->cri_key, (ses->keysz + 1) * 8); @@ -451,6 +444,8 @@ pasemi_process(device_t dev, struct cryptop *crp, int hint) if (enccrd->crd_flags & CRD_F_ENCRYPT) { if (enccrd->crd_flags & CRD_F_IV_EXPLICIT) memcpy(ivp, enccrd->crd_iv, ivsize); + else + read_random(ivp, ivsize); /* If IV is not present in the buffer already, it has to be copied there */ if ((enccrd->crd_flags & CRD_F_IV_PRESENT) == 0) crypto_copyback(crp->crp_flags, crp->crp_buf, |