X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=crypto%2Fhmac.c;h=0ad39c3749639e227bef876664ce3ff7ed147c2c;hb=e339ad31f59925b48a92ee3947692fdf9758b8c7;hp=7ff2d6a8c7d0b5c58b753140cd579e332e385819;hpb=7f268a2ba7c884a239713696238dd4207a57dd9a;p=linux-2.6-omap-h63xx.git diff --git a/crypto/hmac.c b/crypto/hmac.c index 7ff2d6a8c7d..0ad39c37496 100644 --- a/crypto/hmac.c +++ b/crypto/hmac.c @@ -16,7 +16,7 @@ * */ -#include +#include #include #include #include @@ -238,9 +238,11 @@ static struct crypto_instance *hmac_alloc(struct rtattr **tb) return ERR_CAST(alg); inst = ERR_PTR(-EINVAL); - ds = (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) == - CRYPTO_ALG_TYPE_HASH ? alg->cra_hash.digestsize : - alg->cra_digest.dia_digestsize; + ds = alg->cra_type == &crypto_hash_type ? + alg->cra_hash.digestsize : + alg->cra_type ? + __crypto_shash_alg(alg)->digestsize : + alg->cra_digest.dia_digestsize; if (ds > alg->cra_blocksize) goto out_put_alg;