[CRYP-7902] Added support for multiple profiles

This commit is contained in:
mboelen 2016-04-13 19:49:30 +02:00
parent f4a1ee8ac2
commit 015287e963
1 changed files with 12 additions and 2 deletions

View File

@ -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}