Changeset 183
- Timestamp:
- 01/28/10 17:35:16 (1 month ago)
- Files:
-
- pykcs11/trunk/samples/getinfo.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
pykcs11/trunk/samples/getinfo.py
r180 r183 38 38 39 39 def getSlotInfo(self, slot): 40 print "Slot n.:", slot 40 41 i = self.pkcs11.getSlotInfo(slot) 41 print "Slot n.:", slot42 42 self.colorize(" slotDescription:", i.slotDescription.strip()) 43 43 self.colorize(" manufacturerID:", i.manufacturerID.strip()) … … 47 47 48 48 def getTokenInfo(self, slot): 49 print " TokenInfo" 49 50 t = self.pkcs11.getTokenInfo(slot) 50 print " TokenInfo"51 51 self.colorize(" label:", t.label.strip()) 52 52 self.colorize(" manufacturerID:", t.manufacturerID.strip()) … … 69 69 70 70 def getMechanismInfo(self, slot): 71 print " Mechanism list: " 71 72 m = self.pkcs11.getMechanismList(slot) 72 print " Mechanism list: "73 73 for x in m: 74 74 self.colorize(" ", x) … … 91 91 92 92 def getSessionInfo(self, slot, pin=None): 93 print " SessionInfo" 93 94 session = self.pkcs11.openSession(slot) 94 95 s = session.getSessionInfo() … … 98 99 session.login(pin) 99 100 100 print " SessionInfo"101 101 self.colorize(" slotID:", s.slotID) 102 102 self.colorize(" state:", s.state2text())
