summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Mueller <smueller@chronox.de>2014-07-06 02:25:04 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2014-07-08 21:18:24 +0800
commit2af71eb6a0c83c1331cb2e546bd598272dc3d305 (patch)
treeb0332537e08d5967eb63a55db323e1a1b7495618
parent9409c96a23124905cf026c6ec26f58ff4f81f9aa (diff)
downloadlinux-crypto-2af71eb6a0c83c1331cb2e546bd598272dc3d305.tar.gz
linux-crypto-2af71eb6a0c83c1331cb2e546bd598272dc3d305.zip
crypto: drbg - Select correct DRBG core for stdrng
When the DRBG is initialized, the core is looked up using the DRBG name. The name that can be used for the lookup is registered in cra_driver_name. The cra_name value contains stdrng. Thus, the lookup code must use crypto_tfm_alg_driver_name to obtain the precise DRBG name and select the correct DRBG. Signed-off-by: Stephan Mueller <smueller@chronox.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/drbg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/drbg.c b/crypto/drbg.c
index dba5ed2f..2a7860f7 100644
--- a/crypto/drbg.c
+++ b/crypto/drbg.c
@@ -1761,7 +1761,7 @@ static int drbg_kcapi_init(struct crypto_tfm *tfm)
bool pr = false;
int coreref = 0;
- drbg_convert_tfm_core(crypto_tfm_alg_name(tfm), &coreref, &pr);
+ drbg_convert_tfm_core(crypto_tfm_alg_driver_name(tfm), &coreref, &pr);
/*
* when personalization string is needed, the caller must call reset
* and provide the personalization string as seed information