浏览代码

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>
Stephan Mueller 11 年之前
父节点
当前提交
4f15071879
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      crypto/drbg.c

+ 1 - 1
crypto/drbg.c

@@ -1761,7 +1761,7 @@ static int drbg_kcapi_init(struct crypto_tfm *tfm)
 	bool pr = false;
 	bool pr = false;
 	int coreref = 0;
 	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
 	 * when personalization string is needed, the caller must call reset
 	 * and provide the personalization string as seed information
 	 * and provide the personalization string as seed information