]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: skcipher - Allow givencrypt to be NULL
authorHerbert Xu <herbert@gondor.apana.org.au>
Sun, 21 Jun 2015 11:11:41 +0000 (19:11 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 22 Jun 2015 07:49:16 +0000 (15:49 +0800)
commiteeff66a93e9502e9006d34ee19f5e2bfd4c4bc1c
treea451df51aba5981cfe1b855e3ad95ec05c37f765
parent1e688a3f6ff6c5d5b09e236d15d42b2104b76aae
crypto: skcipher - Allow givencrypt to be NULL

Currently for skcipher IV generators they must provide givencrypt
as that is the whole point.  We are currently replacing skcipher
IV generators with explicit IV generators.  In order to maintain
backwards compatibility, we need to allow the IV generators to
still function as a normal skcipher when the RNG Is not present
(e.g., in the initramfs during boot).  IOW everything but givencrypt
and givdecrypt will still work but those two will fail.

Therefore this patch assigns a default givencrypt that simply
returns an error should it be NULL.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ablkcipher.c