Skip to content

Commit 2ad9afb

Browse files
klassertdavem330
authored andcommitted
ah: Remove obsolete code
ah4 and ah6 are converted to ahash now, so we can remove the code for the obsolete hash algorithm. Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 8631e9b commit 2ad9afb

1 file changed

Lines changed: 3 additions & 26 deletions

File tree

‎include/net/ah.h‎

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,21 @@
11
#ifndef _NET_AH_H
22
#define _NET_AH_H
33

4-
#include <linux/crypto.h>
5-
#include <net/xfrm.h>
4+
#include <linux/skbuff.h>
65

76
/* This is the maximum truncated ICV length that we know of. */
87
#define MAX_AH_AUTH_LEN 12
98

9+
struct crypto_ahash;
10+
1011
struct ah_data
1112
{
12-
u8 *work_icv;
1313
int icv_full_len;
1414
int icv_trunc_len;
1515

16-
struct crypto_hash *tfm;
1716
struct crypto_ahash *ahash;
1817
};
1918

20-
static inline int ah_mac_digest(struct ah_data *ahp, struct sk_buff *skb,
21-
u8 *auth_data)
22-
{
23-
struct hash_desc desc;
24-
int err;
25-
26-
desc.tfm = ahp->tfm;
27-
desc.flags = 0;
28-
29-
memset(auth_data, 0, ahp->icv_trunc_len);
30-
err = crypto_hash_init(&desc);
31-
if (unlikely(err))
32-
goto out;
33-
err = skb_icv_walk(skb, &desc, 0, skb->len, crypto_hash_update);
34-
if (unlikely(err))
35-
goto out;
36-
err = crypto_hash_final(&desc, ahp->work_icv);
37-
38-
out:
39-
return err;
40-
}
41-
4219
struct ip_auth_hdr;
4320

4421
static inline struct ip_auth_hdr *ip_auth_hdr(const struct sk_buff *skb)

0 commit comments

Comments
 (0)