fix: send the STK install parameters as entered (v3.6.9)
The RAM install form sent the `STK parameters (hex)` field, which was only regenerated when the toolkit checkbox or the mode select changed - editing the TAR (or any other toolkit field) afterwards was silently dropped. The live install therefore carried the form defaults (TAR B00001, textLen 0, menus 0, MSL 16, channels 0) instead of the entered AF4D01 / MSL 12 / channels 1, and the card rejected the install parameters with 6A80 (TS 102 226 8.2.1.3.2.7: a TAR already assigned on the card). - every `rc-tk-*` field regenerates the hex on input/change; the install recomputes it at send time unless the user hand-edited the hex (`dataset.manual`), so the edit order can no longer drop values; - one pure `stkParamsBuild` serves the RAM form (`buildRcToolkitParams`) and the RAM/GP chain rows (`buildTkParams`) - no drift between them (the chain row also gains the menu-ID <= 7F check); - applet TAR field: empty by default, no placeholder - B0 00 01 is the allocated ADF RFM TAR (TS 101 220 Annex D), not an applet TAR; an empty field is coded as TAR length 00 (the card may take a TAR from the AID only when the AID carries one, PIX hex digits 15-20); - the chain builder's INSTALL/LOAD rows drop the trailing Le (the v3.6.8 server form; a trailing Le made the card execute a phantom command); - tests: stk_params.test.js (the decrypted live parameters, empty-TAR coding, CA wrapper, long-form lengths, rejection cases, form wiring, and the form -> hex path with the real builders) and ram_counter_flow.test.js (the Explore delete persists the consumed counter through the real ramSaveCntr); STK fixtures no longer use B00001. 631 frontend / 496 Python green; version 3.6.9; sw simple-v282.
This commit is contained in:
@@ -31,7 +31,7 @@ from osmocom.tlv import BER_TLV_IE
|
||||
from osmocom.utils import rpad
|
||||
|
||||
|
||||
VERSION = '3.6.8'
|
||||
VERSION = '3.6.9'
|
||||
|
||||
MAX_ENVELOPE_SEGMENTS = 5 # max SMS segments for outgoing C-APDU in ENVELOPE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user