Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpyllyukko <pyllyukko@maimed.org>2020-01-06 22:22:00 +0300
committerpyllyukko <pyllyukko@maimed.org>2020-01-06 22:22:00 +0300
commit40acdc111d34b7ed040f4cb652f65ca7ed22afd6 (patch)
tree92fc38834cf76e1cd45194152369175ebd76bc47 /include/tests_crypto
parentb48bee581add42afbff3b336392dd0be74f1a7a9 (diff)
Added CRYP-8004
Diffstat (limited to 'include/tests_crypto')
-rw-r--r--include/tests_crypto27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/tests_crypto b/include/tests_crypto
index 44f19cdc..9c40ff47 100644
--- a/include/tests_crypto
+++ b/include/tests_crypto
@@ -195,6 +195,33 @@
#
#################################################################################
#
+ # Test : CRYP-8004
+ # Description : Test for HWRNG & rngd
+ Register --test-no CRYP-8004 --os Linux --weight L --network NO --root-only NO --category security --description "Test for HWRNG & rngd"
+ if [ ${SKIPTEST} -eq 0 ]; then
+ if [ -f ${ROOTDIR}sys/class/misc/hw_random/rng_current ]; then
+ DATA=$(${CAT_BINARY} ${ROOTDIR}sys/class/misc/hw_random/rng_current)
+ if [ "${DATA}" != "none" ]; then
+ LogText "Result: found HW RNG: ${DATA}"
+ if IsRunning "rngd"; then
+ Display --indent 2 --text "- HW RNG & rngd" --result "${STATUS_YES}" --color GREEN
+ LogText "Result: rngd is running"
+ else
+ Display --indent 2 --text "- HW RNG & rngd" --result "${STATUS_NO}" --color YELLOW
+ ReportSuggestion "${TEST_NO}" "Utilize HW RNG by running rngd"
+ fi
+ else
+ Display --indent 2 --text "- HW RNG & rngd" --result "${STATUS_NO}" --color RED
+ LogText "Result: no HW RNG available"
+ fi
+ else
+ Display --indent 2 --text "- HW RNG & rngd" --result "${STATUS_NO}" --color RED
+ LogText "Result: could not find ${ROOTDIR}sys/class/misc/hw_random/rng_current"
+ fi
+ fi
+#
+#################################################################################
+#
WaitForKeyPress