Commit 51ee1422 authored by Herbert Xu's avatar Herbert Xu

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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent b7dcfab4
...@@ -1876,7 +1876,7 @@ static inline void __init drbg_fill_array(struct rng_alg *alg, ...@@ -1876,7 +1876,7 @@ static inline void __init drbg_fill_array(struct rng_alg *alg,
const struct drbg_core *core, int pr) const struct drbg_core *core, int pr)
{ {
int pos = 0; int pos = 0;
static int priority = 100; static int priority = 200;
memcpy(alg->base.cra_name, "stdrng", 6); memcpy(alg->base.cra_name, "stdrng", 6);
if (pr) { if (pr) {
...@@ -1965,3 +1965,4 @@ MODULE_DESCRIPTION("NIST SP800-90A Deterministic Random Bit Generator (DRBG) " ...@@ -1965,3 +1965,4 @@ MODULE_DESCRIPTION("NIST SP800-90A Deterministic Random Bit Generator (DRBG) "
CRYPTO_DRBG_HASH_STRING CRYPTO_DRBG_HASH_STRING
CRYPTO_DRBG_HMAC_STRING CRYPTO_DRBG_HMAC_STRING
CRYPTO_DRBG_CTR_STRING); CRYPTO_DRBG_CTR_STRING);
MODULE_ALIAS_CRYPTO("stdrng");
Markdown is supported
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