feat: add list clients menu option (#1382)

## Summary

- Add new "List existing users" option to management menu (option 2)
- Displays all client certificates with status (Valid/Revoked),
expiration date, and days remaining
- Reads expiry directly from certificate files using openssl for
accurate 4-digit year dates
- Output sorted by expiration date (oldest first)
- Updates test MENU_OPTION values to match new menu numbering

Example output:
```
=== Existing Clients ===

Found 2 certificate(s)

   Name                      Status     Expiry       Remaining
   ----                      ------     ------       ---------
   user1                     Valid      2035-12-11   3649 days
   user2                     Revoked    unknown      unknown
```

Closes #567
Closes #563
Closes #587
This commit is contained in:
Stanislas
2025-12-13 19:17:30 +01:00
committed by GitHub
parent 90f2313ff3
commit 190e49ec33
3 changed files with 142 additions and 14 deletions

View File

@@ -59,7 +59,8 @@ The first time you run it, you'll have to follow the assistant and answer a few
When OpenVPN is installed, you can run the script again, and you will get the choice to:
- Add a client
- Remove a client
- List client certificates
- Revoke a client
- Renew certificates (client or server)
- Uninstall OpenVPN