diff options
author | hploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b> | 2007-01-13 02:24:24 +0000 |
---|---|---|
committer | hploetz <hploetz@f711b948-2313-0410-aaa9-d29f33439f0b> | 2007-01-13 02:24:24 +0000 |
commit | 2eac1f6b4472bf75b076a1d5cff77fe01c2e5137 (patch) | |
tree | f1ba8c9558f2498d2b769f466e051a391f3807d6 /TLV_utils.py | |
parent | 83ba3a1d738efbf088397c450fa8ab176b289f3f (diff) |
Fix SFI handling
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@159 f711b948-2313-0410-aaa9-d29f33439f0b
Diffstat (limited to 'TLV_utils.py')
-rw-r--r-- | TLV_utils.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/TLV_utils.py b/TLV_utils.py index 220f431..c4d41db 100644 --- a/TLV_utils.py +++ b/TLV_utils.py @@ -220,6 +220,10 @@ def decode_lcs(value): ) ) +def decode_sfi(value): + if len(value) == 0: return "" + return " 0x%02x" % (ord(value[0]) >> 3) + tags = { None: { 0x01: (lambda a: (len(a) > 0 and ord(a[0]) != 0) and " True" or " False", "Boolean"), @@ -251,7 +255,7 @@ tags = { 0x85: (binary, "Proprietary information"), 0x86: (binary, "Security attributes"), 0x87: (binary, "Identifier of an EF containing an extension of the FCI"), - 0x88: (binary, "Short EF identifier"), + 0x88: (decode_sfi, "Short EF identifier"), 0x8A: (decode_lcs, "Life cycle status byte"), 0xA5: (recurse, "Proprietary information", None), |