From c5b4a68c261153e46e428bdb334cd2e2278cef48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henryk=20Pl=C3=B6tz?= Date: Fri, 7 Jan 2011 16:58:56 +0100 Subject: [PATCH] Further decode access rule --- cards/tcos_card.py | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/cards/tcos_card.py b/cards/tcos_card.py index 5678e89..82da621 100644 --- a/cards/tcos_card.py +++ b/cards/tcos_card.py @@ -696,7 +696,20 @@ class TCOS_Card(ISO_7816_4_Card,building_blocks.Card_with_80_aa): "clear_se": cmd_clear_se, "set_key": cmd_set_key, } - + +TLV_utils.identifier("context_ardo") +TLV_utils.identifier("context_art") + +def decode_access_rule(mask, value): + result = [] + for i in range(3, -1, -1): + if mask & (1<