Changeset 176
- Timestamp:
- 11/16/09 10:21:56 (9 months ago)
- Files:
-
- pykcs11/trunk/samples/dumpit.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
pykcs11/trunk/samples/dumpit.py
r175 r176 26 26 # Submitter: Sebastien Keim (other recipes) 27 27 # Last Updated: 2002/08/05 28 # Version no: 1.0 28 # Version no: 1.0 29 29 30 30 FILTER=''.join([(len(repr(chr(x)))==3) and chr(x) or '.' for x in range(256)]) … … 79 79 elif o in ("-d", "--decrypt"): 80 80 decrypt = True 81 81 82 82 red = blue = magenta = normal = "" 83 83 if sys.stdout.isatty() and platform.system().lower() != 'windows': … … 152 152 toSign="12345678901234567890" # 20 bytes, SHA1 digest 153 153 print "* Signing with object 0x%08X following data: %s" % (o.value(), toSign) 154 signature = session.sign(o, toSign) 154 signature = session.sign(o, toSign) 155 155 s = ''.join(chr(c) for c in signature).encode('hex') 156 156 sx = eval('0x%s' % s) … … 196 196 else: 197 197 print "ERROR: Private key don't have MODULUS/PUBLIC_EXP" 198 198 199 199 print "Dumping attributes:" 200 200 for q, a in zip(all_attributes, attributes):
