diff --git a/CLAUDE.md b/CLAUDE.md index a9e5f43..190bb1e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -31,6 +31,7 @@ Edit the `SETTINGS` block at the top of `openvpncertupdate.py` before first run. | `--send-email` | Force email delivery | | `--no-send-email` | Skip email; print URL to stdout | | `--show-eml` | Print base64-encoded `.eml` to stdout (implies `--no-send-email` unless `--send-email` also given) | +| `--config PATH` | External `.conf` file overriding `SETTINGS` (overrides `CONFIG_PATH`; missing file here is an error) | ## Tests @@ -45,9 +46,10 @@ python3 -m pytest tests/test_pki.py::test_sorted_ascending -v # single test | Section | Key symbols | |---|---| | SETTINGS | all-caps constants | +| SETTINGS OVERRIDE | `ConfigError`, `load_settings_overrides()`, `_OVERRIDABLE_SETTINGS` | | PKI | `CertInfo`, `load_expiring_certs()`, `load_all_certs()`, `_parse_index_line()` | | PASSWORD | `generate_password()` | -| EASYRSA | `EasyRSAError`, `revoke_issued()`, `build_client_full()`, `gen_crl()`, `copy_crl()` | +| EASYRSA | `EasyRSAError`, `revoke_issued()`, `build_client_full()`, `gen_crl()`, `copy_crl()`, `is_ca_key_encrypted()`, `resolve_ca_passphrase()` | | METADATA | `load_metadata()`, `save_email()`, `get_email()` | | CONFIG | `build_ovpn()` → `vpn-configs/__/CONFIG_NAME` | | CRYPTGEON | `CryptgeonError`, `create_note()` | @@ -78,9 +80,11 @@ python3 -m pytest tests/test_pki.py::test_sorted_ascending -v # single test ## Key constraints +- External config file (`load_settings_overrides()`, run once in `main()` right after arg parsing, before dispatch): resolution order is `--config PATH` > `CONFIG_PATH` setting > `.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 `