summaryrefslogtreecommitdiff
path: root/crypto/drbg.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2015-06-03 14:49:28 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2015-06-04 15:05:01 +0800
commit51ee14227411c713c428f5ff6a70fae8b2b33daa (patch)
tree46703d57e347c54935e452e45e264340dcf0a39a /crypto/drbg.c
parentb7dcfab4a7cdc3103c7560cd2386036266b2740e (diff)
crypto: drbg - Add stdrng alias and increase priority
This patch adds the stdrng module alias and increases the priority to ensure that it is loaded in preference to other RNGs. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/drbg.c')
-rw-r--r--crypto/drbg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/drbg.c b/crypto/drbg.c
index 92843488af09..04836b4838ef 100644
--- a/crypto/drbg.c
+++ b/crypto/drbg.c
@@ -1876,7 +1876,7 @@ static inline void __init drbg_fill_array(struct rng_alg *alg,
const struct drbg_core *core, int pr)
{
int pos = 0;
- static int priority = 100;
+ static int priority = 200;
memcpy(alg->base.cra_name, "stdrng", 6);
if (pr) {
@@ -1965,3 +1965,4 @@ MODULE_DESCRIPTION("NIST SP800-90A Deterministic Random Bit Generator (DRBG) "
CRYPTO_DRBG_HASH_STRING
CRYPTO_DRBG_HMAC_STRING
CRYPTO_DRBG_CTR_STRING);
+MODULE_ALIAS_CRYPTO("stdrng");