ah: Remove obsolete code
authorSteffen Klassert <steffen.klassert@secunet.com>
Wed, 7 Oct 2009 22:49:57 +0000 (22:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Oct 2009 04:32:00 +0000 (21:32 -0700)
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>
include/net/ah.h

index 7ac52214ba0f17b1bbcc4bdff73b6457ed2a12a3..7573a7152a721d893fb80cd3356b8af635e43bce 100644 (file)
@@ -1,44 +1,21 @@
 #ifndef _NET_AH_H
 #define _NET_AH_H
 
-#include <linux/crypto.h>
-#include <net/xfrm.h>
+#include <linux/skbuff.h>
 
 /* This is the maximum truncated ICV length that we know of. */
 #define MAX_AH_AUTH_LEN        12
 
+struct crypto_ahash;
+
 struct ah_data
 {
-       u8                      *work_icv;
        int                     icv_full_len;
        int                     icv_trunc_len;
 
-       struct crypto_hash      *tfm;
        struct crypto_ahash     *ahash;
 };
 
-static inline int ah_mac_digest(struct ah_data *ahp, struct sk_buff *skb,
-                               u8 *auth_data)
-{
-       struct hash_desc desc;
-       int err;
-
-       desc.tfm = ahp->tfm;
-       desc.flags = 0;
-
-       memset(auth_data, 0, ahp->icv_trunc_len);
-       err = crypto_hash_init(&desc);
-       if (unlikely(err))
-               goto out;
-       err = skb_icv_walk(skb, &desc, 0, skb->len, crypto_hash_update);
-       if (unlikely(err))
-               goto out;
-       err = crypto_hash_final(&desc, ahp->work_icv);
-
-out:
-       return err;
-}
-
 struct ip_auth_hdr;
 
 static inline struct ip_auth_hdr *ip_auth_hdr(const struct sk_buff *skb)