[Pcsclite-cvs-commit] r5752 - in /website: default.css matrix.py webpage.template

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Sat May 14 18:26:22 UTC 2011


Author: rousseau
Date: Sat May 14 18:26:18 2011
New Revision: 5752

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5752
Log:
Add a "limitations" field for "No extended APDU" status

Modified:
    website/default.css
    website/matrix.py
    website/webpage.template

Modified: website/default.css
URL: http://svn.debian.org/wsvn/pcsclite/website/default.css?rev=5752&op=diff
==============================================================================
--- website/default.css (original)
+++ website/default.css Sat May 14 18:26:18 2011
@@ -23,6 +23,7 @@
 p{margin:10px;}
 span.note{background:fuchsia;}
 span.features{background:yellow;}
+span.limitations{background:red;}
 span.url{}
 span.release{color:gray;}
 code { background: #ffd; }

Modified: website/matrix.py
URL: http://svn.debian.org/wsvn/pcsclite/website/matrix.py?rev=5752&op=diff
==============================================================================
--- website/matrix.py (original)
+++ website/matrix.py Sat May 14 18:26:18 2011
@@ -38,6 +38,12 @@
     "<": "&lt;",
     }
 
+CCID_CLASS_CHARACTER = 0x00000000
+CCID_CLASS_TPDU = 0x00010000
+CCID_CLASS_SHORT_APDU = 0x00020000
+CCID_CLASS_EXTENDED_APDU = 0x00040000
+CCID_CLASS_EXCHANGE_MASK = 0x00070000
+
 
 def html_escape(text):
     """Produce entities within text."""
@@ -53,6 +59,7 @@
     """
     reader_dict = {}
     reader_dict['features'] = list()
+    reader_dict['limitations'] = list()
 
     for line in lines:
         # remove the \n
@@ -62,6 +69,9 @@
         if (len(l) > 1):
             reader_dict[l[0]] = l[1].strip(" ")
 
+    dwFeatures = int(reader_dict['dwFeatures'], 16)
+    if (dwFeatures & CCID_CLASS_EXCHANGE_MASK) == CCID_CLASS_SHORT_APDU:
+        reader_dict['limitations'].append("No extended APDU")
     return reader_dict
 
 
@@ -395,6 +405,10 @@
             if features:
                 note_layer.write_layer('features', features=features)
 
+            limitations = ", ".join(readers[r]['limitations'])
+            if limitations:
+                note_layer.write_layer('limitations', limitations=limitations)
+
             note = readers[r].get('note', "").split('\n')
             for n in note:
                 note_layer.write_layer('note', contents=n)
@@ -539,7 +553,7 @@
             'dwMaxIFSD', 'dwSynchProtocols', 'dwMechanical',
             'dwFeatures', 'dwMaxCCIDMessageLength', 'bClassGetResponse',
             'bClassEnveloppe', 'wLcdLayout', 'bPINSupport',
-            'bMaxCCIDBusySlots', 'features', 'note', 'release']
+            'bMaxCCIDBusySlots', 'features', 'limitations', 'note', 'release']
 
     for f in fields:
         index = list()

Modified: website/webpage.template
URL: http://svn.debian.org/wsvn/pcsclite/website/webpage.template?rev=5752&op=diff
==============================================================================
--- website/webpage.template (original)
+++ website/webpage.template Sat May 14 18:26:18 2011
@@ -72,6 +72,10 @@
         <p><span class="features">Features: %features%</span></p>
         {/features}
 
+		{limitations}
+        <p><span class="limitations">Limitations: %limitations%</span></p>
+		{/limitations}
+
         {release}
         <p><span class="release">In CCID release: %release%</span></p>
         {/release}




More information about the Pcsclite-cvs-commit mailing list