Skip to content
Commit b170a137 authored by Herbert Xu's avatar Herbert Xu
Browse files

crypto: skcipher - Avoid infinite loop when cipher fails selftest



When an skcipher constructed through crypto_givcipher_default fails
its selftest, we'll loop forever trying to construct new skcipher
objects but failing because it already exists.

The crux of the issue is that once a givcipher fails the selftest,
we'll ignore it on the next run through crypto_skcipher_lookup and
attempt to construct a new givcipher.

We should instead return an error to the caller if we find a
givcipher that has failed the test.

Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 3f683d61
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment