v3.12.0: the card preset carries the card's CAT (USAT) release
The release selector lives in the preset rather than a global chip: presets already travel with the card (ICCID auto-selection, export/import), and the operations that will consume the release are preset-aware. - presets.py: the optional `release` field (4-18; empty = unspecified) joins PRESET_FIELDS; a value outside 4-18 is refused on save/import; the store schema version is 5. - catrelease.py: DEFAULT_RELEASE = 12 and preset_release() - the effective release is the preset's own value, else Rel-12 (the safe level for cards whose release is not known; an unset release never filters anything away). The PWA mirrors both (CAT_RELEASE_DEFAULT + presetRelease()), drift-guarded. - Cards tab: the editor's header row gains a compact CAT release select (unspecified / pre-Rel-6 stored as 5 / Rel-6 ... Rel-18); the empty option names the Rel-12 default and the tooltip explains the guard; the field is collected, cleared and restored with the other form fields. - Nothing filters yet: the Simulator's event parameters (stage 3) will use the effective release. - docs/api.md + help EN/RU updated; sw cache simple-v368.
This commit is contained in:
+7
-1
@@ -245,6 +245,12 @@ stored for later use (nothing consumes them yet). PIN/PUK must be **4–8
|
||||
decimal digits** when set (empty is fine; anything else is refused with `400`
|
||||
naming the field); the ADM key is 4–16 hex digits (a decimal PIN is fine).
|
||||
|
||||
**CAT (USAT) release.** The optional `release` field (4–18) names the release
|
||||
the card implements; the release guard hides CAT items introduced after it
|
||||
(the Simulator's event parameters, see `catrelease`). Empty means unspecified
|
||||
and resolves to Rel-12 (`catrelease.DEFAULT_RELEASE`) — an unset release never
|
||||
filters anything away.
|
||||
|
||||
**Counters.** The store is the source of truth for the SCP80 counters, one per
|
||||
keyset ("a dedicated counter shall be associated to each key version",
|
||||
Annex A.1 — the spec's wording). The operations below accept a `preset_id` and **persist the
|
||||
@@ -256,7 +262,7 @@ is not defined in preset '…' - add it in the Cards tab"}`), and so is a
|
||||
KIc/KID number mismatch. The Cards tab's export/import uses this API; the
|
||||
import also accepts presets exported by the older localStorage-based builds.
|
||||
|
||||
- `GET /api/presets` — `{"path": "…", "count": 2, "version": 4, "presets": [{…}]}`
|
||||
- `GET /api/presets` — `{"path": "…", "count": 2, "version": 5, "presets": [{…}]}`
|
||||
(card-free: it answers while a long card operation runs).
|
||||
- `POST /api/presets` — body = the preset fields (`keysets` included); returns
|
||||
`{"ok": true, "preset": {…}}`. A duplicate ICCID (digits, spaced or raw EF
|
||||
|
||||
Reference in New Issue
Block a user