Obtaining ssl and ssh parameters

This commit is contained in:
Bob Mottram 2016-09-21 22:42:24 +01:00
parent 5bf98b34f8
commit 4c5ea23ed6
1 changed files with 7 additions and 5 deletions

View File

@ -528,8 +528,10 @@ function update_ciphersuite {
if [ ! -f $project_filename ]; then
project_filename=/usr/bin/${PROJECT_NAME}
fi
SSH_FILENAME=${project_filename}-utils-ssh
SSL_FILENAME=${project_filename}-utils-web
RECOMMENDED_SSL_CIPHERS=$(cat $project_filename | grep 'SSL_CIPHERS=' | head -n 1 | awk -F '=' '{print $2}' | awk -F '"' '{print $2}')
RECOMMENDED_SSL_CIPHERS=$(cat $SSL_FILENAME | grep 'SSL_CIPHERS=' | head -n 1 | awk -F '=' '{print $2}' | awk -F '"' '{print $2}')
if [ ! "$RECOMMENDED_SSL_CIPHERS" ]; then
return
fi
@ -537,7 +539,7 @@ function update_ciphersuite {
return
fi
RECOMMENDED_SSL_PROTOCOLS=$(cat $project_filename | grep 'SSL_PROTOCOLS=' | head -n 1 | awk -F '=' '{print $2}' | awk -F '"' '{print $2}')
RECOMMENDED_SSL_PROTOCOLS=$(cat $SSL_FILENAME | grep 'SSL_PROTOCOLS=' | head -n 1 | awk -F '=' '{print $2}' | awk -F '"' '{print $2}')
if [ ! "$RECOMMENDED_SSL_PROTOCOLS" ]; then
return
fi
@ -545,7 +547,7 @@ function update_ciphersuite {
return
fi
RECOMMENDED_SSH_CIPHERS=$(cat $project_filename | grep 'SSH_CIPHERS=' | head -n 1 | awk -F '=' '{print $2}' | awk -F '"' '{print $2}')
RECOMMENDED_SSH_CIPHERS=$(cat $SSH_FILENAME | grep 'SSH_CIPHERS=' | head -n 1 | awk -F '=' '{print $2}' | awk -F '"' '{print $2}')
if [ ! "$RECOMMENDED_SSH_CIPHERS" ]; then
return
fi
@ -553,7 +555,7 @@ function update_ciphersuite {
return
fi
RECOMMENDED_SSH_MACS=$(cat $project_filename | grep 'SSH_MACS=' | head -n 1 | awk -F '=' '{print $2}' | awk -F '"' '{print $2}')
RECOMMENDED_SSH_MACS=$(cat $SSH_FILENAME | grep 'SSH_MACS=' | head -n 1 | awk -F '=' '{print $2}' | awk -F '"' '{print $2}')
if [ ! "$RECOMMENDED_SSH_MACS" ]; then
return
fi
@ -561,7 +563,7 @@ function update_ciphersuite {
return
fi
RECOMMENDED_SSH_KEX=$(cat $project_filename | grep 'SSH_KEX=' | head -n 1 | awk -F '=' '{print $2}' | awk -F '"' '{print $2}')
RECOMMENDED_SSH_KEX=$(cat $SSH_FILENAME | grep 'SSH_KEX=' | head -n 1 | awk -F '=' '{print $2}' | awk -F '"' '{print $2}')
if [ ! "$RECOMMENDED_SSH_KEX" ]; then
return
fi