Added CRYP-8004

This commit is contained in:
pyllyukko 2020-01-06 21:22:00 +02:00
parent b48bee581a
commit 40acdc111d
No known key found for this signature in database
GPG Key ID: 6D64E828379852AC
1 changed files with 27 additions and 0 deletions

View File

@ -194,6 +194,33 @@
fi fi
# #
################################################################################# #################################################################################
#
# 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 WaitForKeyPress