• Herbert Xu's avatar
    [IPSEC]: Use digest_null directly for auth · 01a2202c
    Herbert Xu authored
    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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    01a2202c
xfrm_algo.c 14.2 KB