Commit Graph

122 Commits

Author SHA1 Message Date
hploetz 2a0caea3c7 Incorporate some information from tr-03110-eac-1.0.pdf
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@241 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-10 00:46:55 +00:00
hploetz 9a1a0ccdce sre is deprecated in python 2.5
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@238 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-09 19:31:05 +00:00
hploetz 38bc6d9efc Can now display displayed portrait and displayed signature or usual mark
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@236 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-09 06:40:04 +00:00
hploetz da589e2c77 Regression: read_com and friends were broken
Make decode_tag_list output more educational


git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@235 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-09 05:17:30 +00:00
hploetz f5a1777099 fixes in mrz parsing for uncommon cases
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@234 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-09 05:01:08 +00:00
hploetz 6916b45f11 Reading from and saving to filesets works
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@230 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-08 05:33:29 +00:00
hploetz 09ab2cbff7 Picture loading working
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@229 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-08 04:54:41 +00:00
hploetz 3fa2f88419 Tool to read full passport information. Call without arguments to try without bac, or with mrz1 mrz2 or mrz2 to try with bac
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@224 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-08 00:55:16 +00:00
hploetz d7aa71ca8d Centralize pycsc windows import hack
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@222 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-08 00:14:22 +00:00
hploetz 94fbb4190c Passport parse code
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@221 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-08 00:10:11 +00:00
hploetz 7d2f9b4da5 API change: let read_binary_file return two values
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@220 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-08 00:09:55 +00:00
hploetz 84e812ebf7 Honor generic_card.DEBUG
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@219 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-07 22:28:43 +00:00
hploetz bda175ccb2 fix mrz2 checksum calculation
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@218 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-07 21:15:33 +00:00
hploetz 19b862ae24 Start passport parsing code
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@217 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-07 21:04:20 +00:00
hploetz f6f29a90a9 Have a stab at parsing biometric data
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@216 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-05 02:33:28 +00:00
hploetz a024e73aa6 MTCOS_Card_RFID is better than RFID_Card. (TODO: Find better API for such cases)
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@214 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-05 02:32:43 +00:00
hploetz e4fa619d41 load_response and pretend_application commands
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@213 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-05 02:31:17 +00:00
hploetz b56cd37306 Change output of ultralight cat to the customary 4 bytes per line
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@209 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-02 06:58:48 +00:00
hploetz a5e9ead166 Differentiate 1k and 4k mifare classic
Add one SW
Forgot one docstring


git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@208 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-02 06:48:23 +00:00
hploetz 62a06241c0 API change: substitute new PURPOSE_GET_RESPONSE for PURPOSE_RETRY to match the actual semantics, add a different value for PURPOSE_RETRY to match the description
Refactor READ BINARY functionality out of iso_7816_4 into a building block
Implement READ BINARY (and "cat" command) for RFID storage cards using the new building block


git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@207 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-02 06:14:18 +00:00
hploetz a810933abc Add RFID_Card class. (I just discovered that section 3.2.2 of PC/SC 2.01 specifies handling of contactless storage cards such as mifare through an emulated APDU interface.)
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@204 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-01 20:40:24 +00:00
hploetz a1b12fe941 Allow arbitrary parameters for select_application
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@203 f711b948-2313-0410-aaa9-d29f33439f0b
2007-06-01 20:37:41 +00:00
hploetz 10a9dab1ef Allow SELECT APPLICATION and READ BINARY with given Le
Add resolve_symbolic_name convenience function
Add get_atr function
Implement STOP_ATRS functionality to stop ISO_7816_4_Card from accepting all cards, blacklist contactless storage cards


git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@192 f711b948-2313-0410-aaa9-d29f33439f0b
2007-05-30 16:47:43 +00:00
hploetz 758223149b Make passport_application work with windows
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@191 f711b948-2313-0410-aaa9-d29f33439f0b
2007-05-08 09:50:47 +00:00
hploetz 47662ab48e Get working under Windows with http://cheeseshop.python.org/pypi/PyCSC/0.3 (with Python 2.5 for Windows)
Note: you additionally need pycrypto, the source of which you'll get from http://cheeseshop.python.org/pypi/pycrypto/2.0.1
  Compilation of pycrypto can work with cygwin in two steps: python setup.py build -c mingw32 and python setup.py install --skip-build


git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@190 f711b948-2313-0410-aaa9-d29f33439f0b
2007-05-08 09:23:25 +00:00
hploetz a94d4d8a32 easier to type alias
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@189 f711b948-2313-0410-aaa9-d29f33439f0b
2007-05-08 09:19:11 +00:00
hploetz 47f7e768c1 Add config parameter to TCOS_Security_Environment._mac (was forgotten during refactoring)
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@188 f711b948-2313-0410-aaa9-d29f33439f0b
2007-04-10 00:51:40 +00:00
hploetz 98f1dbe110 API change: DRIVER_NAME now is a (merged) list
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@187 f711b948-2313-0410-aaa9-d29f33439f0b
2007-03-18 23:38:24 +00:00
hploetz 6aaff0ef86 Fix length for passports
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@184 f711b948-2313-0410-aaa9-d29f33439f0b
2007-02-15 21:19:18 +00:00
hploetz e9a4d97dc8 decode_mrz
override check_sw


git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@183 f711b948-2313-0410-aaa9-d29f33439f0b
2007-02-15 21:16:33 +00:00
hploetz 09467b61a1 read_dg, read_sod and read_com commands
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@182 f711b948-2313-0410-aaa9-d29f33439f0b
2007-02-13 13:47:40 +00:00
hploetz f2f8a69d90 Add p2 parameter to open_file
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@181 f711b948-2313-0410-aaa9-d29f33439f0b
2007-02-13 13:43:56 +00:00
hploetz 4ac8a00868 Introduce DEFAULT_CONTEXT
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@180 f711b948-2313-0410-aaa9-d29f33439f0b
2007-02-13 13:23:29 +00:00
hploetz 085df9d25c Fix property overriding for subclasses. Might break things (possible regression point)
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@179 f711b948-2313-0410-aaa9-d29f33439f0b
2007-02-13 13:22:42 +00:00
hploetz 791c175eff Start parsing passport data
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@178 f711b948-2313-0410-aaa9-d29f33439f0b
2007-02-13 02:37:55 +00:00
hploetz d685765fa0 Big change: Replace SW_OK and SW1_RETRY with a more generic check_sw() that gets its data from STATUS_MAP
Small improvements in brutefid, including the ability to brute subdirectories
More fixes for passport secure messaging, using check_sw, can now decrypt error responses ("End of file reached before Le bytes read", etc.)
Add support for tuples/lists in dictionaries in MERGE_DICTS_RECURSIVE in cards/__init__.py


git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@177 f711b948-2313-0410-aaa9-d29f33439f0b
2007-02-13 00:32:04 +00:00
hploetz f01836762b TCOS_Security_Environment: Handle 0x98/0x99 SM object
Passport_Application: Implement secure messaging


git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@176 f711b948-2313-0410-aaa9-d29f33439f0b
2007-02-12 20:09:48 +00:00
hploetz 617a1693b6 Move parse_fancy_apdu from Cyberflex_Shell to utils.C_APDU
Extract actual MAC computation from tcos_card.TCOS_Security_Environment for later overriding in passport_application.Passport_Security_Environment


git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@175 f711b948-2313-0410-aaa9-d29f33439f0b
2007-02-12 16:41:19 +00:00
hploetz 52fb65dc5d crypto_utils: Add generalized operation_on_string
passport_application: Completed BAC authentication and key derivation


git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@174 f711b948-2313-0410-aaa9-d29f33439f0b
2007-02-12 01:51:20 +00:00
hploetz 82cddea7e7 Add support for aliases in application selection
Add skeleton for support of application specific commands that can be dynamically loaded
Pending addition of commands to work with passports


git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@173 f711b948-2313-0410-aaa9-d29f33439f0b
2007-02-10 21:52:06 +00:00
hploetz a4efadb377 Do not make the __init__ method mandatory
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@172 f711b948-2313-0410-aaa9-d29f33439f0b
2007-02-10 21:46:57 +00:00
hploetz a7a36c1dd2 New AIDs, name can be None now
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@167 f711b948-2313-0410-aaa9-d29f33439f0b
2007-01-17 09:14:35 +00:00
hploetz 42cc88fc9f Move select_application to 7816-4
Add vendor registry
Some AIDs
Simplify _decode_df_name


git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@166 f711b948-2313-0410-aaa9-d29f33439f0b
2007-01-16 17:14:37 +00:00
hploetz 8a9b683d99 AIDs
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@165 f711b948-2313-0410-aaa9-d29f33439f0b
2007-01-15 13:34:24 +00:00
hploetz c34c6a084c Fix size determination in building blocks
Create tcos 3.0 class


git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@163 f711b948-2313-0410-aaa9-d29f33439f0b
2007-01-14 14:37:57 +00:00
hploetz 0d21b554e5 Decode recognized AIDs as DF name (find a conceptual flaw en passant and work around it)
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@162 f711b948-2313-0410-aaa9-d29f33439f0b
2007-01-14 14:25:57 +00:00
hploetz 07de9a478d API change: more information in the APPLICATIONS dictionary
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@161 f711b948-2313-0410-aaa9-d29f33439f0b
2007-01-14 13:46:30 +00:00
hploetz b4a825c461 Fix read_record arguments
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@160 f711b948-2313-0410-aaa9-d29f33439f0b
2007-01-13 02:25:09 +00:00
hploetz 2eac1f6b44 Fix SFI handling
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@159 f711b948-2313-0410-aaa9-d29f33439f0b
2007-01-13 02:24:24 +00:00
hploetz 83ba3a1d73 Add SECCOS ATRs, no functionality yet
git-svn-id: svn+ssh://localhost/home/henryk/svn/cyberflex-shell/trunk@158 f711b948-2313-0410-aaa9-d29f33439f0b
2007-01-12 11:28:43 +00:00