document --list/--list-all in CLAUDE.md
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,8 @@ python3 openvpncertupdate.py --create CN --email user@example.com
|
|||||||
python3 openvpncertupdate.py --reissue CN [--email user@example.com]
|
python3 openvpncertupdate.py --reissue CN [--email user@example.com]
|
||||||
python3 openvpncertupdate.py --revoke CN
|
python3 openvpncertupdate.py --revoke CN
|
||||||
python3 openvpncertupdate.py --gen-crl
|
python3 openvpncertupdate.py --gen-crl
|
||||||
|
python3 openvpncertupdate.py --list
|
||||||
|
python3 openvpncertupdate.py --list-all
|
||||||
```
|
```
|
||||||
|
|
||||||
Edit the `SETTINGS` block at the top of `openvpncertupdate.py` before first run.
|
Edit the `SETTINGS` block at the top of `openvpncertupdate.py` before first run.
|
||||||
@@ -27,6 +29,8 @@ Edit the `SETTINGS` block at the top of `openvpncertupdate.py` before first run.
|
|||||||
| `--reissue CN` | Revoke + reissue cert (`--email` optional, falls back to stored) |
|
| `--reissue CN` | Revoke + reissue cert (`--email` optional, falls back to stored) |
|
||||||
| `--revoke CN` | Revoke cert and regenerate CRL |
|
| `--revoke CN` | Revoke cert and regenerate CRL |
|
||||||
| `--gen-crl` | Regenerate and copy CRL only |
|
| `--gen-crl` | Regenerate and copy CRL only |
|
||||||
|
| `--list` | List recently-expired/soon-to-expire CNs (per `DAYS_PAST`/`DAYS_AHEAD`) with email; read-only, no CA passphrase needed |
|
||||||
|
| `--list-all` | List all CNs with email; read-only, no CA passphrase needed |
|
||||||
| `--email EMAIL` | Recipient address |
|
| `--email EMAIL` | Recipient address |
|
||||||
| `--send-email` | Force email delivery |
|
| `--send-email` | Force email delivery |
|
||||||
| `--no-send-email` | Skip email; print URL to stdout |
|
| `--no-send-email` | Skip email; print URL to stdout |
|
||||||
@@ -82,7 +86,7 @@ python3 -m pytest tests/test_pki.py::test_sorted_ascending -v # single test
|
|||||||
- External config file (`load_settings_overrides()`, run once in `main()` right after arg parsing, before dispatch): resolution order is `--config PATH` > `CONFIG_PATH` setting > `<this-script-path>.conf` next to the script. The CLI flag or `CONFIG_PATH` make the path explicit — a missing file there is a fatal `ConfigError`; the default `<script>.conf` path is optional and silently skipped if absent. The file is executed as Python (same syntax as the `SETTINGS` block, so only run trusted files) and only names listed in `_OVERRIDABLE_SETTINGS` are applied — `CONFIG_PATH` itself is deliberately not overridable this way
|
- External config file (`load_settings_overrides()`, run once in `main()` right after arg parsing, before dispatch): resolution order is `--config PATH` > `CONFIG_PATH` setting > `<this-script-path>.conf` next to the script. The CLI flag or `CONFIG_PATH` make the path explicit — a missing file there is a fatal `ConfigError`; the default `<script>.conf` path is optional and silently skipped if absent. The file is executed as Python (same syntax as the `SETTINGS` block, so only run trusted files) and only names listed in `_OVERRIDABLE_SETTINGS` are applied — `CONFIG_PATH` itself is deliberately not overridable this way
|
||||||
- Email: set `SMTP_HOST` to use smtplib (SMTP_TLS: `"starttls"`/`"ssl"`/`""`); leave empty to use `MAIL_BINARY`. Auth skipped when `SMTP_USER=""`
|
- Email: set `SMTP_HOST` to use smtplib (SMTP_TLS: `"starttls"`/`"ssl"`/`""`); leave empty to use `MAIL_BINARY`. Auth skipped when `SMTP_USER=""`
|
||||||
- EasyRSA called with `--batch`; `--passin=pass:<passphrase>` omitted when the resolved passphrase is empty
|
- EasyRSA called with `--batch`; `--passin=pass:<passphrase>` omitted when the resolved passphrase is empty
|
||||||
- CA passphrase resolution (`resolve_ca_passphrase()`, run once in `main()` right after arg parsing, before dispatch): `CA_PASSPHRASE=""` → auto-detect via `is_ca_key_encrypted()` (checks `<PKI_DIR>/private/ca.key` PEM header for `ENCRYPTED`) and prompt only if encrypted; `"!empty"` → never check/prompt, passphrase is `""`; `"!ask"` → always prompt, skip detection; any other value → used literally
|
- CA passphrase resolution (`resolve_ca_passphrase()`, run once in `main()` right after arg parsing, before dispatch): `CA_PASSPHRASE=""` → auto-detect via `is_ca_key_encrypted()` (checks `<PKI_DIR>/private/ca.key` PEM header for `ENCRYPTED`) and prompt only if encrypted; `"!empty"` → never check/prompt, passphrase is `""`; `"!ask"` → always prompt, skip detection; any other value → used literally. `--list`/`--list-all` skip this resolution entirely since they only read `index.txt` and never touch the CA
|
||||||
- Cryptgeon: matches the `occulto` browser client — `key=os.urandom(32)` used directly (no derivation) for AES-256-GCM; `contents` = `base64(b"AES-GCM") + "--" + base64(nonce) + "--" + base64(ciphertext)`; `meta` = JSON string `{"type": "text"}`; URL = `<base>/note/<id>#<key.hex()>`
|
- Cryptgeon: matches the `occulto` browser client — `key=os.urandom(32)` used directly (no derivation) for AES-256-GCM; `contents` = `base64(b"AES-GCM") + "--" + base64(nonce) + "--" + base64(ciphertext)`; `meta` = JSON string `{"type": "text"}`; URL = `<base>/note/<id>#<key.hex()>`
|
||||||
- `copy_crl()` does `chmod 644` after copy
|
- `copy_crl()` does `chmod 644` after copy
|
||||||
- Password: pos 1=uppercase, pos 2=lowercase (no j), pos 3-27=alphanumeric, pos 28=lowercase (no j); `oO01lIQ5S2Z8B` banned everywhere
|
- Password: pos 1=uppercase, pos 2=lowercase (no j), pos 3-27=alphanumeric, pos 28=lowercase (no j); `oO01lIQ5S2Z8B` banned everywhere
|
||||||
|
|||||||
Reference in New Issue
Block a user