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:
authormboelen <michael@cisofy.com>2016-04-13 20:49:30 +0300
committermboelen <michael@cisofy.com>2016-04-13 20:49:30 +0300
commit015287e963b12e52fd4f4ac7a0b51966debe48a4 (patch)
treeecaa4e984767a15c90ef6f5d614e0448ff606aa9 /include/tests_crypto
parentf4a1ee8ac2da429b4e4ac1fbc77f845cdcd3c1f7 (diff)
[CRYP-7902] Added support for multiple profiles
Diffstat (limited to 'include/tests_crypto')
-rw-r--r--include/tests_crypto14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/tests_crypto b/include/tests_crypto
index 560bf3ff..be6b9c07 100644
--- a/include/tests_crypto
+++ b/include/tests_crypto
@@ -32,8 +32,18 @@
Register --test-no CRYP-7902 --preqs-met ${PREQS_MET} --weight L --network NO --description "Check expire date of SSL certificates"
if [ ${SKIPTEST} -eq 0 ]; then
FOUNDPROBLEM=0
- # Check profile for paths to check
- sSSL_PATHS=`grep "^ssl:certificates:" ${PROFILE} | cut -d ':' -f3`
+
+ # Check profiles for paths to check
+ for PROFILE in ${PROFILES}; do
+ PATHS=`grep "^ssl:certificates:" ${PROFILE} | cut -d ':' -f3`
+ if [ ! "${PATHS}" = "" ]; then
+ LogText "Added paths (from profile: ${PROFILE}): ${PATHS}"
+ sSSL_PATHS="${PATHS} ${sSSL_PATHS}"
+ fi
+ done
+ sSSL_PATHS=`echo ${sSSL_PATHS} | sed 's/^ //' | tr " " "\n" | sort | uniq | tr "\n" " "`
+ LogText "Result after sorting: ${sSSL_PATHS}"
+
for I in ${sSSL_PATHS}; do
if [ -d ${I} ]; then
FileIsReadable ${I}