From 5372a770eb6ec8baef7cdb5be3dfcf93acdc516e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D1=82=D0=BE=D0=BD=20=D0=A2=D1=80=D0=BE=D1=88?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Mon, 28 Sep 2026 21:43:57 +0300 Subject: [PATCH] fix: keep a hand-edited packet TAR in the SCP80 send (v3.6.21) The plain "Send to Card" path refreshed the whole preset right before sending (spRefreshFromPreset -> cardsApply -> cardsApplyFields) and re-applied the preset's slot TAR - so a TAR typed for a push/link trigger, an applet OTA message or the HTTP OTA admin params was silently replaced by the preset's ISD TAR (the pack buttons for those sources deliberately leave the TAR manual; the help even said so). - spRefreshFromPreset(selId, keepTar): the plain send passes keepTar, so the form's TAR survives; the counter, keys and SPI are still re-read. - selecting a card preset, ramApplyCard and the chain packs still set the TAR; the RAM operations keep the preset's ISD TAR by design. - spParams()/getRamSpParams() normalise the TAR (strip/upper/pad to 6); only the preview padded before, a short TAR went to the server raw. - help EN/RU clarified, cards_counter/ram tests updated, sw simple-v294. 652 frontend / 499 Python green; version 3.6.21. --- frontend/help-ru.html | 4 ++-- frontend/help.html | 4 ++-- frontend/index.html | 34 ++++++++++++++++------------ frontend/sw.js | 2 +- frontend/tests/cards_counter.test.js | 14 +++++++++++- frontend/tests/ram.test.js | 5 ++++ pyproject.toml | 2 +- pysim_simple_server/server.py | 2 +- 8 files changed, 45 insertions(+), 22 deletions(-) diff --git a/frontend/help-ru.html b/frontend/help-ru.html index 99c3812..53109b8 100644 --- a/frontend/help-ru.html +++ b/frontend/help-ru.html @@ -254,7 +254,7 @@

Упаковать в Secured packet отправляет готовый payload на вкладку SCP80 для заполнения SPI/счётчика — там укажите TAR, который слушает SD (обычно TAR OTASD).

PUSH по TS 102 226 §9

-

Подвкладка «Триггер канала/линка» собирает запросы §9 тем же кодировщиком, что и строка PUSH в цепочке RAM/GP, показывает предпросмотр C-APDU, и предлагает «Упаковать в Secured packet» (TAR остаётся ручным: запрос адресован целевому приложению, а не Security Domain) и → Расширенный скрипт (оборачивает каждый APDU в Command TLV 22 и добавляет их в конструктор Expanded Script).

+

Подвкладка «Триггер канала/линка» собирает запросы §9 тем же кодировщиком, что и строка PUSH в цепочке RAM/GP, показывает предпросмотр C-APDU, и предлагает «Упаковать в Secured packet» (TAR остаётся ручным: запрос адресован целевому приложению, а не Security Domain, и введённый TAR сохраняется при отправке) и → Расширенный скрипт (оборачивает каждый APDU в Command TLV 22 и добавляет их в конструктор Expanded Script).