]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: rng - RNGs must return 0 in success case
authorStephan Mueller <smueller@chronox.de>
Fri, 6 Mar 2015 07:26:31 +0000 (08:26 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 9 Mar 2015 10:06:18 +0000 (21:06 +1100)
commit416ca1ab162d44dee3795d4e6f1c58dec1ffb7b5
tree6b0a069f9fdfa36c3741164564ea163f9cb69820
parentba3907df5b487914025ca3d8b5e765290faee4c2
crypto: rng - RNGs must return 0 in success case

Change the RNGs to always return 0 in success case.

This patch ensures that seqiv.c works with RNGs other than krng. seqiv
expects that any return code other than 0 is an error. Without the
patch, rfc4106(gcm(aes)) will not work when using a DRBG or an ANSI
X9.31 RNG.

Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ansi_cprng.c
crypto/drbg.c
include/crypto/rng.h