Eric Biggers <[email protected]> wrote: > > @@ -638,7 +637,7 @@ static int crypto_gcm_create_common(struct > crypto_template *tmpl, > goto err_free_inst; > > err = -EINVAL; > - if (ghash->digestsize != 16) > + if (strcmp(ghash->base.cra_name, "ghash") != 0) > goto err_drop_ghash;
We should keep both tests because the self-tests can be compiled out so there is no guarantee that something claiming to be ghash actually is ghash. Cheers, -- Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
