Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/cryptnox_id_cli/transport/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}.")
Expand Down
11 changes: 0 additions & 11 deletions src/cryptnox_id_cli/transport/pcsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading