diff --git a/CHANGELOG.md b/CHANGELOG.md index d35f653..d660077 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `perso generate-key --create-key-object` - the same dev/eval fallback `import-key` already had. +### Removed + +- `transport.pcsc.list_reader_names()`. Nothing called it; `reader_states()` + returns the same names along with card presence and ATR. + ## [1.0.3] - 2026-08-31 ### Changed diff --git a/src/cryptnox_id_cli/transport/errors.py b/src/cryptnox_id_cli/transport/errors.py index f1f8228..de55952 100644 --- a/src/cryptnox_id_cli/transport/errors.py +++ b/src/cryptnox_id_cli/transport/errors.py @@ -156,7 +156,7 @@ def describe_sw(sw1: int, sw2: int) -> SWInfo: # Family fallbacks. if sw1 == 0x63: return SWInfo(sw, "WARNING", "Operation completed with warning / counter changed.") - if sw1 in (0x62, 0x63): + if sw1 == 0x62: return SWInfo(sw, "WARNING", f"Warning (SW={sw:04X}).") if sw1 in (0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F): return SWInfo(sw, "ERROR", f"Card returned error SW={sw:04X}.") diff --git a/src/cryptnox_id_cli/transport/pcsc.py b/src/cryptnox_id_cli/transport/pcsc.py index 54f2c34..080bc41 100644 --- a/src/cryptnox_id_cli/transport/pcsc.py +++ b/src/cryptnox_id_cli/transport/pcsc.py @@ -95,17 +95,6 @@ def reader_states() -> list[ReaderInfo]: SCardReleaseContext(hcontext) -def list_reader_names() -> list[str]: - try: - from smartcard.System import readers as _readers - except ImportError as exc: # pragma: no cover - raise TransportError(f"pyscard unavailable: {exc}") from exc - try: - return [str(r) for r in _readers()] - except Exception as exc: # pragma: no cover - defensive - raise TransportError(f"Cannot list readers: {exc}") from exc - - def _listing(infos: list[ReaderInfo]) -> str: return ", ".join(f"[{r.index}] {r.name}" for r in infos)