pySim.commands: make use of status word interpreter for CHV

Related: OS#6398
Change-Id: I71efe9d6804c4845bb81f1b3b443215dad0ac301
This commit is contained in:
Harald Welte
2024-07-29 12:59:02 +02:00
parent de5de0e9db
commit bff8902ce1

View File

@@ -679,7 +679,7 @@ class SimCardCommands:
raise RuntimeError('Failed to %s chv_no 0x%02X with code 0x%s, %i tries left.' %
(op_name, chv_no, b2h(pin_code).upper(), int(sw[3])))
if sw != '9000':
raise SwMatchError(sw, '9000')
raise SwMatchError(sw, '9000', self._tp.sw_interpreter)
def verify_chv(self, chv_no: int, code: Hexstr) -> ResTuple:
"""Verify a given CHV (Card Holder Verification == PIN)