Commit 7568bd9a authored by Lindsay's avatar Lindsay
Browse files

Update client certificate common name length limit to 30 chars in fuctions.sh

parent cd9fbf94
Pipeline #1112 passed with stage
in 14 seconds
......@@ -26,7 +26,7 @@ function ask_key_questions
{
echo ""
read -p "Common Name of certificate, this should be unique,
using 4 to 15 upper or lowercase letters or numbers and _ ONLY: " OVPN_COMMONNAME
using 4 to 30 upper or lowercase letters or numbers and _ ONLY: " OVPN_COMMONNAME
# OVPN_COMMONNAME <-- This is the variable to return to the other script
# Yes I stole this validation test from the init script so yes it could be optimized
......@@ -40,7 +40,7 @@ if [ $COUNT -eq 0 ]; then
COMMONNAME_VALID=0
else
#There was something entered so lets validate OVPN_COMMONNAME
if [ $COUNT -gt 3 ] && [ $COUNT -lt 16 ]; then
if [ $COUNT -gt 3 ] && [ $COUNT -lt 31 ]; then
#We have between 4 and 12 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
......
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