From 646a06c9fec2ed2ccb5c9147287e9d6715831181 Mon Sep 17 00:00:00 2001 From: Flavio Ceolin Date: Fri, 22 Sep 2023 14:04:03 -0700 Subject: [PATCH] random: Fix kconfig symbol name s/CSPRING_ENABLED/CSPRNG_ENABLED/g Signed-off-by: Flavio Ceolin --- soc/arm/nxp_imx/rt/Kconfig.defconfig.series | 2 +- soc/arm/nxp_imx/rt5xx/Kconfig.defconfig.series | 2 +- soc/arm/nxp_imx/rt6xx/Kconfig.defconfig.series | 2 +- subsys/jwt/Kconfig | 2 +- subsys/mgmt/osdp/Kconfig | 2 +- subsys/random/Kconfig | 3 +-- tests/crypto/rand32/src/main.c | 4 ++-- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/soc/arm/nxp_imx/rt/Kconfig.defconfig.series b/soc/arm/nxp_imx/rt/Kconfig.defconfig.series index cc9cc9b5480..7a1aac41ce3 100644 --- a/soc/arm/nxp_imx/rt/Kconfig.defconfig.series +++ b/soc/arm/nxp_imx/rt/Kconfig.defconfig.series @@ -113,7 +113,7 @@ endchoice # config MBEDTLS #config TINYCRYPT - default y if CSPRING_ENABLED + default y if CSPRNG_ENABLED depends on ENTROPY_GENERATOR if MBEDTLS diff --git a/soc/arm/nxp_imx/rt5xx/Kconfig.defconfig.series b/soc/arm/nxp_imx/rt5xx/Kconfig.defconfig.series index 9ee952cff78..31b6a2c70db 100644 --- a/soc/arm/nxp_imx/rt5xx/Kconfig.defconfig.series +++ b/soc/arm/nxp_imx/rt5xx/Kconfig.defconfig.series @@ -62,7 +62,7 @@ endif # config MBEDTLS #config TINYCRYPT - default y if CSPRING_ENABLED + default y if CSPRNG_ENABLED depends on ENTROPY_GENERATOR if MBEDTLS diff --git a/soc/arm/nxp_imx/rt6xx/Kconfig.defconfig.series b/soc/arm/nxp_imx/rt6xx/Kconfig.defconfig.series index 40bb1ab7b6a..7bcbc4e8e80 100644 --- a/soc/arm/nxp_imx/rt6xx/Kconfig.defconfig.series +++ b/soc/arm/nxp_imx/rt6xx/Kconfig.defconfig.series @@ -63,7 +63,7 @@ endif # config MBEDTLS #config TINYCRYPT - default y if CSPRING_ENABLED + default y if CSPRNG_ENABLED depends on ENTROPY_GENERATOR if MBEDTLS diff --git a/subsys/jwt/Kconfig b/subsys/jwt/Kconfig index dfbdbc3c889..ef4f93238fe 100644 --- a/subsys/jwt/Kconfig +++ b/subsys/jwt/Kconfig @@ -16,7 +16,7 @@ choice config JWT_SIGN_RSA bool "Use RSA signature (RS-256)" - depends on CSPRING_ENABLED + depends on CSPRNG_ENABLED select MBEDTLS config JWT_SIGN_ECDSA diff --git a/subsys/mgmt/osdp/Kconfig b/subsys/mgmt/osdp/Kconfig index 8fee4185189..2d19d796043 100644 --- a/subsys/mgmt/osdp/Kconfig +++ b/subsys/mgmt/osdp/Kconfig @@ -70,7 +70,7 @@ config OSDP_SKIP_MARK_BYTE config OSDP_SC_ENABLED bool "OSDP Secure Channel" - depends on CSPRING_ENABLED + depends on CSPRNG_ENABLED default y select CRYPTO select CRYPTO_MBEDTLS_SHIM diff --git a/subsys/random/Kconfig b/subsys/random/Kconfig index 6629b0d6b08..b8b6b2135c2 100644 --- a/subsys/random/Kconfig +++ b/subsys/random/Kconfig @@ -72,8 +72,7 @@ endchoice # RNG_GENERATOR_CHOICE # enabling CS generators. ENTROPY_HAS_DRIVER is the flag indicating the # CS entropy source. # -config CSPRING_ENABLED -# bool "Cryptographically secure RNG functions enabled" +config CSPRNG_ENABLED bool default y depends on ENTROPY_HAS_DRIVER diff --git a/tests/crypto/rand32/src/main.c b/tests/crypto/rand32/src/main.c index 7b5a06083f1..7500fb42382 100644 --- a/tests/crypto/rand32/src/main.c +++ b/tests/crypto/rand32/src/main.c @@ -85,7 +85,7 @@ ZTEST(rand32_common, test_rand32) "random numbers returned same value with high probability"); } -#if defined(CONFIG_CSPRING_ENABLED) +#if defined(CONFIG_CSPRNG_ENABLED) printk("Generating bulk fill cryptographically secure random numbers\n"); @@ -109,7 +109,7 @@ ZTEST(rand32_common, test_rand32) printk("Cryptographically secure random number APIs not enabled\n"); -#endif /* CONFIG_CSPRING_ENABLED */ +#endif /* CONFIG_CSPRNG_ENABLED */ } ZTEST_SUITE(rand32_common, NULL, NULL, NULL, NULL, NULL);