create_key_config.sh,build_key-pass.sh: some minor changes on naming 'ta.key' and 'ca.cert'.

This commit is contained in:
Christoph 2022-08-17 16:24:06 +02:00
parent 7ac86350aa
commit 3b8b237c32
2 changed files with 36 additions and 14 deletions

View File

@ -800,6 +800,7 @@ if $_copy_to_user_home_dir ; then
if [[ $? -ne 0 ]] ; then
_failed=true
fi
if [[ -n "$ORG_SHORTCUT" ]]; then
cp -a "${_CA_CERT}" "${_target_dir}/VPN-${ORG_SHORTCUT}-$(basename ${_CA_CERT})" >> $log_file 2>&1
if [[ $? -ne 0 ]] ; then
_failed=true
@ -808,6 +809,16 @@ if $_copy_to_user_home_dir ; then
if [[ $? -ne 0 ]] ; then
_failed=true
fi
else
cp -a "${_CA_CERT}" "${_target_dir}/VPN-${KEY_CN/VPN-/}-$(basename ${_CA_CERT})" >> $log_file 2>&1
if [[ $? -ne 0 ]] ; then
_failed=true
fi
cp -a "${_TA_KEY}" "${_target_dir}/VPN-${KEY_CN/VPN-KEY_CN/VPN-/basename ${_TA_KEY})" >> $log_file 2>&1
if [[ $? -ne 0 ]] ; then
_failed=true
fi
fi
cat << EOF > "${_target_dir}/passwd.txt"
key...............: $(basename "$_CLIENT_KEY")
common name.......: $_CLIENT_CN

View File

@ -695,13 +695,24 @@ cp -a "${_CLIENT_CERT}" "${_target_dir}/" >> $log_file 2>&1
if [[ $? -ne 0 ]] ; then
_failed=true
fi
cp -a "${_CA_CERT}" "${_target_dir}/VPN-${ORG_SHORTCUT}-$(basename ${_CA_CERT})" >> $log_file 2>&1
if [[ $? -ne 0 ]] ; then
if [[ -n "$ORG_SHORTCUT" ]]; then
cp -a "${_CA_CERT}" "${_target_dir}/VPN-${ORG_SHORTCUT}-$(basename ${_CA_CERT})" >> $log_file 2>&1
if [[ $? -ne 0 ]] ; then
_failed=true
fi
cp -a "${_TA_KEY}" "${_target_dir}/VPN-${ORG_SHORTCUT}-$(basename ${_TA_KEY})" >> $log_file 2>&1
if [[ $? -ne 0 ]] ; then
fi
cp -a "${_TA_KEY}" "${_target_dir}/VPN-${ORG_SHORTCUT}-$(basename ${_TA_KEY})" >> $log_file 2>&1
if [[ $? -ne 0 ]] ; then
_failed=true
fi
else
cp -a "${_CA_CERT}" "${_target_dir}/VPN-${KEY_CN/VPN-/}-$(basename ${_CA_CERT})" >> $log_file 2>&1
if [[ $? -ne 0 ]] ; then
_failed=true
fi
cp -a "${_TA_KEY}" "${_target_dir}/VPN-${KEY_CN/VPN-/}-$(basename ${_TA_KEY})" >> $log_file 2>&1
if [[ $? -ne 0 ]] ; then
_failed=true
fi
fi
cat << EOF > "${_target_dir}/passwd.txt"
key...............: $(basename "$_CLIENT_KEY")