bert
2d97002824
API fixup: use defined type instead of struct for exposed structs
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2232 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-08 20:59:35 +00:00
aet
8a8f2cd6bc
- Introduce a new powerful card_atr mechanism to opensc
...
configuration file to handle any configuring related
to certain card / cards using atrmask.
- Rewrite Martin's force_protocol to _sc_check_forced_protocol()
to make it possible to share the code with other reader driver
implementations than pcsc.
- Implement _sc_match_atr_block() to help out with force protocol
and pkcs15 emulation layers, to find information that's not
stored directly to sc_atr_table.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2192 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-22 07:59:42 +00:00
aet
7268799d92
- Fix a long-standing issue for user configured atrs
...
in the configuration file; free allocated memory
from the card_driver structures.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2188 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-14 09:12:44 +00:00
aet
df5e357694
- Whitespace cleanup from me and Martin Paljak
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2181 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-11 20:09:34 +00:00
aet
32b417cbf3
- First stab towards standardized card types
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2172 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-10 10:07:13 +00:00
aet
8d24aa78c4
- Fix for the previous commit
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2165 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-09 14:09:27 +00:00
aet
3d9b32499a
- _sc_match_atr: add support for atrmask field in sc_atr_table
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2164 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-09 14:07:36 +00:00
nils
10569f110e
workaround for broken cashmouse driver
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2156 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-07 22:43:51 +00:00
aet
bd0cb300f8
- Ahm, fixed a typo in the previous commit
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2146 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-06 20:14:38 +00:00
aet
69d2e9014d
- Optimize a few cpu cycles from _sc_match_atr_hex
...
- Replace struct sc_atr_table / _sc_match_atr with
recently introduced _hex variants
- Rewrote _add_atr
- Introduce int type variable to sc_card_t, so that
every other card driver won't have to glue around
with this
- Card driver cleanups, optimize the number of
sc_match_atr called per card driver. Also
always try direct match with _sc_match_atr
first, before relying on eg. historical bytes
information on some card drivers
- Fixed a memory leak from the miocos driver
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2145 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-06 19:40:40 +00:00
aet
cbe2904889
- Introduce _sc_match_atr_hex / struct sc_atr_table_hex.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2130 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-04 15:57:38 +00:00
sth
b59fb4597e
Have the option add a delay before resending an APDU (after a 6CXX response). Is needed for most current belpic cards on fast readers
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2117 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-30 19:20:38 +00:00
nils
14d1f7f6a6
yet another fix
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2107 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-28 21:22:40 +00:00
nils
32e5d3fc81
fix lock/unlock mismatch
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2100 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-24 22:10:55 +00:00
aet
8182177a00
- Early ccid pinpad cleanups, more to follow
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2098 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-24 18:30:55 +00:00
nils
69cd0dbb76
make it configurable whether or not allow logging of sensitive apdu command data at all (to please the Belgian EID guys ;-)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2096 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-24 17:19:08 +00:00
nils
a82a40e977
some cleanup + improved error checking
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2051 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-03 17:20:17 +00:00
nils
4bb760db4d
cleanup
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1960 c6295689-39f2-0310-b995-f0e70906c6a9
2004-10-29 20:08:54 +00:00
nils
3d64764d4d
fix int vs. size_t mismatch
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1926 c6295689-39f2-0310-b995-f0e70906c6a9
2004-10-13 18:54:06 +00:00
nils
f044157553
fix incorrect use of realloc (x = realloc(x, y) doesn't free
...
the x in case of a failure)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1775 c6295689-39f2-0310-b995-f0e70906c6a9
2004-04-21 18:10:58 +00:00
okir
09b2730497
- implement sc_delete_record (Victor Tarasov)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1708 c6295689-39f2-0310-b995-f0e70906c6a9
2004-01-06 13:33:32 +00:00
okir
5dda541b7e
- made apdu_masquerade functionality available to all readers, not just pcsc
...
- added new parameters max_send_size and max_recv_size, roughly corresponding
to the old max_le (SC_APDU_CHOP_SIZE) parameter. You can now set this
chop limit per driver class (pcsc, openct, ctapi), which sets
driver->max_{send,recv}_size. This value is copied to
card->max_{send,recv}_size in sc_connect_card, and can be overridden
by the card driver.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1683 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-18 16:35:28 +00:00
okir
b2074743b2
- reduced sc_lock/unlock debug messages even more
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1677 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-16 14:31:12 +00:00
okir
c072c5e0fe
- added sc_get_data/sc_put_data
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1578 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-30 17:03:41 +00:00
okir
734bceb682
- Error logging changes: replace ctx->log_errors with ctx->suppress_errors,
...
so that we can nest error suppression using suppress_errors++/suppress_errors--
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1518 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-14 09:56:50 +00:00
okir
efb19cafe6
- slightly enhanced debugging output
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1504 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-13 14:34:38 +00:00
aet
5616dba08e
- Stop using unflexible automake conditionals when
...
building PC/SC, OpenCT or USBToken support,
use ifdef's directly in source.
- Because of above, add HAVE_PCSCLITE for winconfig.h
- Remove unnecessary includes for log.h, opensc.h and
errors.h in libopensc sources, they're already taken
care by internal.h.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1406 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-03 09:28:55 +00:00
okir
8fcab2199b
- slightly improved debugging output
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1399 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-29 12:55:17 +00:00
aet
763fc16704
Rename libopensc specific error/debug to sc_error/sc_debug
...
We should have done this ages ago.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1392 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-25 14:21:18 +00:00
okir
9f065e840f
- suppress stupid debug messages for sc_lock/sc_unlock for debug level < 7
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1349 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-11 13:56:07 +00:00
okir
7fc4ad2db0
- fixed error message
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1322 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-31 19:06:43 +00:00
sth
df89427bfb
Bug fix: let sc_transmit_apdu() returns a negative number or 0 (no positive number)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1248 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-11 09:40:49 +00:00
sth
4737789ede
Implemented the get_response card operation, is now explicitely called by sc_transmit_apdu()
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1246 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-10 11:38:02 +00:00
okir
2abc504051
- remove signedness warnings printed by new gcc
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1176 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-30 08:54:42 +00:00
okir
48a61e95c0
- added card name to struct sc_card to allow upper level apps to identify
...
card type more precisely
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1173 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-28 20:52:33 +00:00
okir
f4d1147224
- change debug level for sc_lock/unlock
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1156 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-22 19:34:45 +00:00
okir
296a9cc54b
- fixed the hang with logout()
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1155 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-22 13:59:25 +00:00
sth
fc31b65a88
added sc_logout() functionality
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1153 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-20 08:30:46 +00:00
okir
b68cb1e0b3
- added sc_free_apps to undo sc_enum_apps
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1122 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-15 13:32:17 +00:00
jey
b0d4f06703
- Renamed card->chopsize to max_le, which is more descriptive
...
- Changed a few checks to asserts
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1078 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-28 16:34:38 +00:00
aj
c6efa1e9a1
create card->chopsize, init it with SC_APDU_CHOP_SIZE,
...
allow cards to change that value, and add code to
starcos_init to set chopsize to 80.
chopsize is used with read_binary and friends to chop
the data into small requests, read/write them, and reassemble.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1074 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-27 19:08:23 +00:00
okir
44995d388d
- don't complain about read/write/update binary with a length of 0
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1015 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-16 10:19:20 +00:00
okir
91b7b3c7a6
- suppress "not supported" error messages from sc_card_ctl
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1004 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-14 08:17:53 +00:00
okir
fabb271b6d
- fix sc_transmit_apdu to properly deal with le=00
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@978 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-03 18:19:22 +00:00
sth
faa73e5827
bug fix in sc_connect_card: only the first ATR in a config file was accepted
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@940 c6295689-39f2-0310-b995-f0e70906c6a9
2003-03-04 15:47:05 +00:00
sth
0529d27e3f
buf fix in sc_connect_card
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@928 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-22 21:27:35 +00:00
sth
9631ef3636
removed const in sc_card_driver (caused win32 crash)
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@918 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-20 12:51:07 +00:00
okir
baf8393a8a
- merged mutex patches from Serge Koganovitsch (Zetes)
...
- created new file portability.c and moved the whole mutex stuff
there (so we don't pollute public header files with #ifdef HAVE_XXX anymore)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@858 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-14 11:22:33 +00:00
okir
9acca0e724
- Implemented new PIN verify/change/unblock framework. All PIN operations
...
are routed through sc_pin_cmd(), which builds the APDU and either passes
it to the card directly, or to the card reader along with a request to
read the PIN(s) from the reader's keypad.
Currently, entering PIN in the standard way (i.e. via the application)
should still work - I have verified GPK and eToken; Cryptoflex verify
should work as well. Anything else needs additional testing, and support
for keypad input in particular (I cannot test this at the moment for
lack of a suitable reader).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@811 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-23 18:47:27 +00:00
okir
4c28f0dad8
- prevent buffer overflow
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@802 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-20 14:55:17 +00:00