Skip to content

Commit

Permalink
xfrm: Define new XFRM netlink auth attribute with specified truncatio…
Browse files Browse the repository at this point in the history
…n bits

The new XFRMA_ALG_AUTH_TRUNC attribute taking a xfrm_algo_auth as
argument allows the installation of authentication algorithms with
a truncation length specified in userspace, i.e. SHA256 with 128 bit
instead of 96 bit truncation.

Signed-off-by: Martin Willi <martin@strongswan.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Martin Willi authored and David S. Miller committed Nov 25, 2009
1 parent a661c41 commit 4e242d1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/linux/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ struct xfrm_algo {
char alg_key[0];
};

struct xfrm_algo_auth {
char alg_name[64];
unsigned int alg_key_len; /* in bits */
unsigned int alg_trunc_len; /* in bits */
char alg_key[0];
};

struct xfrm_algo_aead {
char alg_name[64];
unsigned int alg_key_len; /* in bits */
Expand Down Expand Up @@ -274,6 +281,7 @@ enum xfrm_attr_type_t {
XFRMA_MIGRATE,
XFRMA_ALG_AEAD, /* struct xfrm_algo_aead */
XFRMA_KMADDRESS, /* struct xfrm_user_kmaddress */
XFRMA_ALG_AUTH_TRUNC, /* struct xfrm_algo_auth */
__XFRMA_MAX

#define XFRMA_MAX (__XFRMA_MAX - 1)
Expand Down

0 comments on commit 4e242d1

Please sign in to comment.