From: Herbert Xu Date: Sun, 24 Jan 2016 13:19:11 +0000 (+0800) Subject: ipsec: Use skcipher and ahash when probing algorithms X-Git-Tag: v5.15~13898^2~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17bc197022212a8b439b213b2f23a8603a784e56;p=platform%2Fkernel%2Flinux-starfive.git ipsec: Use skcipher and ahash when probing algorithms This patch removes the last reference to hash and ablkcipher from IPsec and replaces them with ahash and skcipher respectively. For skcipher there is currently no difference at all, while for ahash the current code is actually buggy and would prevent asynchronous algorithms from being discovered. Signed-off-by: Herbert Xu Acked-by: David S. Miller --- diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c index f07224d..250e567 100644 --- a/net/xfrm/xfrm_algo.c +++ b/net/xfrm/xfrm_algo.c @@ -9,6 +9,8 @@ * any later version. */ +#include +#include #include #include #include @@ -782,14 +784,13 @@ void xfrm_probe_algs(void) BUG_ON(in_softirq()); for (i = 0; i < aalg_entries(); i++) { - status = crypto_has_hash(aalg_list[i].name, 0, - CRYPTO_ALG_ASYNC); + status = crypto_has_ahash(aalg_list[i].name, 0, 0); if (aalg_list[i].available != status) aalg_list[i].available = status; } for (i = 0; i < ealg_entries(); i++) { - status = crypto_has_ablkcipher(ealg_list[i].name, 0, 0); + status = crypto_has_skcipher(ealg_list[i].name, 0, 0); if (ealg_list[i].available != status) ealg_list[i].available = status; }