patch-cryptlib_c 788 B

12345678910111213141516171819202122232425
  1. --- cryptodev-linux-1.8.orig/cryptlib.c 2015-11-28 02:07:11.000000000 +0100
  2. +++ cryptodev-linux-1.8/cryptlib.c 2016-12-13 02:21:39.899840926 +0100
  3. @@ -36,6 +36,7 @@
  4. #include <crypto/aead.h>
  5. #include <linux/rtnetlink.h>
  6. #include <crypto/authenc.h>
  7. +#include <crypto/skcipher.h>
  8. #include "cryptodev_int.h"
  9. @@ -131,11 +132,13 @@ int cryptodev_cipher_init(struct cipher_
  10. uint8_t *keyp, size_t keylen, int stream, int aead)
  11. {
  12. int ret;
  13. + struct crypto_skcipher *tfm;
  14. if (aead == 0) {
  15. struct ablkcipher_alg *alg;
  16. - out->async.s = crypto_alloc_ablkcipher(alg_name, 0, 0);
  17. + tfm = crypto_alloc_skcipher(alg_name, 0, 0);
  18. + out->async.s->base = tfm->base;
  19. if (unlikely(IS_ERR(out->async.s))) {
  20. ddebug(1, "Failed to load cipher %s", alg_name);
  21. return -EINVAL;