diff --git a/CLAUDE.md b/CLAUDE.md index 5b259a3..beafbcd 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -53,7 +53,7 @@ python3 -m pytest tests/test_pki.py::test_sorted_ascending -v # single test | SETTINGS OVERRIDE | `ConfigError`, `load_settings_overrides()`, `_OVERRIDABLE_SETTINGS` | | PKI | `CertInfo`, `_load_current_certs()`, `load_expiring_certs()`, `load_all_certs()`, `_parse_index_line()`, `get_email()` | | PASSWORD | `generate_password()` | -| EASYRSA | `EasyRSAError`, `revoke_issued()`, `build_client_full()`, `gen_crl()`, `copy_crl()`, `is_ca_key_encrypted()`, `resolve_ca_passphrase()` | +| EASYRSA | `EasyRSAError`, `_easyrsa_diagnostics()`, `issued_cert_path()`, `has_issued_cert()`, `revoke_issued()`, `build_client_full()`, `gen_crl()`, `copy_crl()`, `is_ca_key_encrypted()`, `resolve_ca_passphrase()` | | CONFIG | `build_ovpn()` → `vpn-configs/__/CONFIG_NAME` | | CRYPTGEON | `CryptgeonError`, `create_note()` | | MAILER | `build_mime_message()`, `send_email()` | @@ -66,6 +66,7 @@ python3 -m pytest tests/test_pki.py::test_sorted_ascending -v # single test ## Re-issue workflow +0. `has_issued_cert()` gates steps 1–2: if `/issued/.crt` is absent, both are **skipped** with a warning and the workflow goes straight to step 3. EasyRSA reads the serial out of the `.crt` itself, so `revoke-issued` can only fail on such a CN — and there is nothing to add to the CRL either. This happens when an `index.txt` is carried over from an older EasyRSA install without the `issued/` files: the index still lists V-status certs whose `.crt` never came along. `--revoke` / the TUI `r` key deliberately do *not* skip — an explicit revoke request should fail loudly rather than silently no-op 1. `revoke-issued ` — archives old key + CSR to `pki/revoked/` 2. CRL regenerated and copied to `CRL_DEST_PATH` immediately after the revoke succeeds — the old cert is already revoked at this point, so the published CRL would otherwise be stale until a separate manual regen. Not fatal: a failure here is reported but the workflow continues to step 3 (a new cert is more urgent than a fresh CRL, and "Regenerate CRL" / `--gen-crl` remain available to retry) 3. `build-client-full --passout=pass:` — generates new key + cert @@ -86,6 +87,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 > `.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 `