Show T=15 as PPS capability, not a transport protocol
T=15 in the ATR is a Protocol-and-Parameter-Selection capability, not a data protocol like T=0/T=1. Previously 'Protocols: T=0, T=15' was misleading. - _decode_atr: exclude T=15 from protocols, set pps=True instead - TCK presence: only-t0 rule now also requires no PPS (T=15 implies TCK) - PWA ATR detail: 'Protocol: T=0' + 'PPS: supported' rows - +1 test with the real UICC ATR (3B 9F 95 80 1F C7 ...) - Bump 1.22.2, SW cache v33->v34
This commit is contained in:
1 parent
6376fb1591
commit
6bdbbea209
7 files changed
+30
-8
No files matched your search
@@ -898,6 +898,19 @@ class TestAtrPps(unittest.TestCase):
|
||||
self.assertEqual(r['historical']['category'], 'status information (life cycle)')
|
||||
self.assertEqual(r['historical']['life_cycle'], 'operational state (activated)')
|
||||
|
||||
def test_atr_t15_is_pps_capability(self):
|
||||
from simtrace2_pysniff.server.decode import _decode_atr
|
||||
# Real UICC ATR: T0=9F (TA1+TD1, 15 hist bytes), TA1=95, TD1=80 (T=0),
|
||||
# TD2=1F (T=15 → PPS capability), TA3=C7 (clock stop + classes A/B/C).
|
||||
r = _decode_atr(bytes.fromhex('3B9F95801FC78031E073FE21136364035B83079000F7'))
|
||||
self.assertEqual(r['protocols'], ['T=0'])
|
||||
self.assertTrue(r['pps'])
|
||||
ta3 = r['interface'][1]
|
||||
self.assertEqual(ta3['name'], 'TA3')
|
||||
self.assertEqual(ta3['clock_stop'], 'no preference')
|
||||
self.assertEqual(ta3['classes'], ['A', 'B', 'C'])
|
||||
self.assertTrue(r['tck_valid'])
|
||||
|
||||
def test_pps(self):
|
||||
from simtrace2_pysniff.server.decode import _decode_pps
|
||||
# FF 10 11 xx: PPS0=10 (T=0, PPS1 present), PPS1=11 (Fi=1,Di=1), PCK=XOR(FF,10,11)=FE
|
||||
|
||||
@@ -224,7 +224,7 @@ class TestImportEndpoint(unittest.TestCase):
|
||||
class TestVersion(unittest.TestCase):
|
||||
def test_package_version(self):
|
||||
from simtrace2_pysniff import __version__
|
||||
self.assertEqual(__version__, '1.22.1')
|
||||
self.assertEqual(__version__, '1.22.2')
|
||||
|
||||
def test_status_includes_version(self):
|
||||
import os
|
||||
|
||||
Reference in new issue
Block a user