aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2010-12-06 20:00:27 +0100
committerSylvain Munaut <tnt@246tNt.com>2010-12-06 20:00:27 +0100
commit6576ce18868baab6aca98d0d23997228c389a791 (patch)
treebcd516994cfaf10e81beee62f63adbc0910f4bca
parent6dc5145663b4bc53e775c0bbe5c4d6fef16c56cf (diff)
Add command to submit the CHV (pin code)
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rwxr-xr-xpySim.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pySim.py b/pySim.py
index 9bd3a2c..75e93ad 100755
--- a/pySim.py
+++ b/pySim.py
@@ -416,6 +416,11 @@ class SimCardCommands(object):
def reset_card(self):
return self._tp.reset_card()
+
+ def verify_chv(self, chv_no, code):
+ fc = rpad(b2h(code), 16)
+ return self.send_apdu('a02000' + ('%02x' % chv_no) + '08' + fc)
+
# }}}