Skip to content

Commit

Permalink
crypto: drbg - Add stdrng alias and increase priority
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
herbertx committed Jun 4, 2015
1 parent b7dcfab commit 51ee142
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crypto/drbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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");

0 comments on commit 51ee142

Please sign in to comment.