Commit aeac5382 authored by Lindsay's avatar Lindsay
Browse files

Update previously missed spots for client cert common name 30 char limit in fuctions.sh

parent 7568bd9a
Pipeline #1113 passed with stage
in 19 seconds
......@@ -41,7 +41,7 @@ if [ $COUNT -eq 0 ]; then
else
#There was something entered so lets validate OVPN_COMMONNAME
if [ $COUNT -gt 3 ] && [ $COUNT -lt 31 ]; then
#We have between 4 and 12 characters in the variable, lets validate they are valid
#We have between 4 and 30 characters in the variable, lets validate they are valid
if [[ $OVPN_COMMONNAME =~ ^[0-9A-Za-z_]+$ ]]; then
COMMONNAME_VALID=1 #Yay! winner winner, chicken dinner
fi
......@@ -55,7 +55,7 @@ fi
#If the COMMONNAME_VALID variable was not set to 1 above then we go into this loop to try again
while [[ $COMMONNAME_VALID != 1 ]]; do
echo ""
echo "The certificate name can only consist of (4-15) upper or lowercase letters or numbers and _"
echo "The certificate name can only consist of (4-30) upper or lowercase letters or numbers and _"
read -p "You entered [$OVPN_COMMONNAME]. Please try again: " OVPN_COMMONNAME
COUNT=($(echo -n $OVPN_COMMONNAME | wc -m))
......@@ -64,8 +64,8 @@ while [[ $COMMONNAME_VALID != 1 ]]; do
COMMONNAME_VALID=0
else
#There was something entered so lets validate the ORGNICK
if [ $COUNT -gt 3 ] && [ $COUNT -lt 16 ]; then
#We have between 4 and 12 characters in the variable, lets validate they are valid letters
if [ $COUNT -gt 3 ] && [ $COUNT -lt 31 ]; then
#We have between 4 and 30 characters in the variable, lets validate they are valid letters
if [[ $OVPN_COMMONNAME =~ ^[0-9A-Za-z_]+$ ]]; then
COMMONNAME_VALID=1 #Yay! winner winner, chicken dinner
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment