Browse Source

remove CA expiry date checks

HgO 10 months ago
parent
commit
3886fc317e
1 changed files with 0 additions and 16 deletions
  1. 0 16
      conf/ynh-vpnclient

+ 0 - 16
conf/ynh-vpnclient

@@ -103,22 +103,6 @@ check_config() {
     critical "You need a CA server (you can add it through the web admin)"
   fi
 
-  latest_ca_server_cert_expiry_timestamp=0
-  while ca_server_cert_expiry_date=$(openssl x509 -noout -enddate 2>/dev/null); do
-    ca_server_cert_expiry_date=$(cut -f 2 -d '=' <<< "$ca_server_cert_expiry_date")
-    ca_server_cert_expiry_timestamp=$(date +'%s' -d "$ca_server_cert_expiry_date")
-
-    if [[ "$ca_server_cert_expiry_timestamp" -ge "$latest_ca_server_cert_expiry_timestamp" ]]; then
-      latest_ca_server_cert_expiry_timestamp="$ca_server_cert_expiry_timestamp"
-      latest_ca_server_cert_expiry_date="$ca_server_cert_expiry_date"
-    fi
-  done < /etc/openvpn/keys/ca-server.crt
-
-  today_timestamp=$(date +'%s')
-  if [[ "$latest_ca_server_cert_expiry_timestamp" -ge "$today_timestamp" ]]; then
-    critical "The CA server expired on $latest_ca_server_cert_expiry_date"
-  fi
-
   if [[ ! -e /etc/openvpn/keys/user.crt || ! -e /etc/openvpn/keys/user.key ]]; then
     if [[ -s /etc/openvpn/keys/credentials ]]; then
       login_user=$(sed -n 1p /etc/openvpn/keys/credentials)