diff options
author | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2015-10-25 13:21:06 +0100 |
---|---|---|
committer | Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> | 2015-10-25 13:21:06 +0100 |
commit | 81cf65ff6fa1af7199001a61ce126e57b64ce98a (patch) | |
tree | 71cce1dd8b8fd1e68ff8786dafd58fd2bec0b804 /crypto/ansi_cprng.c | |
parent | 02352a56e21d0f215000c4cbb474c2cac5309661 (diff) | |
download | kernel_samsung_smdk4412-81cf65ff6fa1af7199001a61ce126e57b64ce98a.zip kernel_samsung_smdk4412-81cf65ff6fa1af7199001a61ce126e57b64ce98a.tar.gz kernel_samsung_smdk4412-81cf65ff6fa1af7199001a61ce126e57b64ce98a.tar.bz2 |
crypto merged
Diffstat (limited to 'crypto/ansi_cprng.c')
-rw-r--r-- | crypto/ansi_cprng.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/crypto/ansi_cprng.c b/crypto/ansi_cprng.c index e8213b9..ffa0245 100644 --- a/crypto/ansi_cprng.c +++ b/crypto/ansi_cprng.c @@ -126,10 +126,6 @@ static int _get_more_prng_bytes(struct prng_context *ctx, int cont_test) output = ctx->rand_data; break; case 2: -#ifdef CONFIG_CRYPTO_FIPS - if (unlikely(in_fips_err())) - return -EINVAL; -#endif /* * First check that we didn't produce the same * random data that we did last time around through this @@ -137,9 +133,8 @@ static int _get_more_prng_bytes(struct prng_context *ctx, int cont_test) if (!memcmp(ctx->rand_data, ctx->last_rand_data, DEFAULT_BLK_SZ)) { if (cont_test) { -#ifdef CONFIG_CRYPTO_FIPS - set_in_fips_err(); -#endif + panic("cprng %p Failed repetition check!\n", + ctx); } printk(KERN_ERR @@ -377,11 +372,6 @@ static int cprng_reset(struct crypto_rng *tfm, u8 *seed, unsigned int slen) if (slen < DEFAULT_PRNG_KSZ + DEFAULT_BLK_SZ) return -EINVAL; -#ifdef CONFIG_CRYPTO_FIPS - if (!memcmp(key, seed, DEFAULT_PRNG_KSZ)) - return -EINVAL; -#endif - if (slen >= (2 * DEFAULT_BLK_SZ + DEFAULT_PRNG_KSZ)) dt = key + DEFAULT_PRNG_KSZ; @@ -418,11 +408,6 @@ static int fips_cprng_get_random(struct crypto_rng *tfm, u8 *rdata, { struct prng_context *prng = crypto_rng_ctx(tfm); -#ifdef CONFIG_CRYPTO_FIPS - if (unlikely(in_fips_err())) - return -EINVAL; -#endif - return get_prng_bytes(rdata, dlen, prng, 1); } |