Skip to content

Commit

Permalink
[IPSEC]: Use digest_null directly for auth
Browse files Browse the repository at this point in the history
Previously digest_null had no setkey function which meant that
we used hmac(digest_null) for IPsec since IPsec always calls
setkey.  Now that digest_null has a setkey we no longer need to
do that.

In fact when only confidentiality is specified for ESP we already
use digest_null directly.  However, when the null algorithm is
explicitly specified by the user we still opt for hmac(digest_null).

This patch removes this discrepancy.  I have not added a new compat
name for it because by chance it wasn't actualy possible for the user
to specify the name hmac(digest_null) due to a key length check in
xfrm_user (which I found out when testing that compat name :)

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Apr 27, 2008
1 parent 0b80ae4 commit 01a2202
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/xfrm/xfrm_algo.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ static struct xfrm_algo_desc aead_list[] = {

static struct xfrm_algo_desc aalg_list[] = {
{
.name = "hmac(digest_null)",
.compat = "digest_null",
.name = "digest_null",

.uinfo = {
.auth = {
Expand Down

0 comments on commit 01a2202

Please sign in to comment.