Commit Graph

20 Commits

Author SHA1 Message Date
aj d22a2483c0 Header file cleanup.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4081 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-04 08:14:36 +00:00
aj 119c7751c7 Improved chaining for large APDU commands,
by Mats Andersson and Douglas E. Engert.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3997 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-05 06:14:19 +00:00
martin d006b1845e libopensc:
- Remove slot abstraction from internal API and all reader drivers. CT-API (from where it all comes from) readers with multiple slots (if still found) can be presented as separate readers, OpenCT should remove the slot abstraction, PC/SC never knew about it. None of the tools knew how to use slots.
 - Add sc_cancel (translates to SCardCancel)
 - Re-implement sc_wait_for_event; support a blocking call.
 - Replace the "int reader" API with "* sc_reader_t" style; add "Get reader by name" functionality.
 - Remove "action" parameter from sc_disconnect_card() (was not used)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3931 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-24 15:25:08 +00:00
martin cd9e666926 SC_ERROR_MEMORY_FAILURE signals EEPROM failures on card. Failures to allocate memory on host result in SC_ERROR_OUT_OF_MEMORY.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3927 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-24 12:38:34 +00:00
martin 615b181471 Revert [3752]
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3773 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-12 09:26:05 +00:00
martin 99e84ae82a Fix spelling
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3753 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 10:07:55 +00:00
martin ab2ed07b78 Fix APDU sanity check.
By Emanuele Pucciarelli,  http://itacns.corp.it/hg/itacns/file/adc0b2ceec86/patches/010-apdu.patch


git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3752 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 10:06:53 +00:00
martin d672fde449 Remove sc_error and sc_ctx_suppress_errors_* in favor of sc_debug/fprintf
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3721 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 08:46:59 +00:00
aj 43b7391a94 fix typo, found by Gürer Özen.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3260 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-28 20:35:06 +00:00
aj f9b30e48c4 fix typos, patch by Gürer Özen
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3257 c6295689-39f2-0310-b995-f0e70906c6a9
2007-08-22 18:38:02 +00:00
nils 8135be4166 bugfix: avoid recursion
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3167 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-13 09:30:53 +00:00
nils 0ccd6daf8d improve get_response logic: try to read at least as much bytes
as indicated in the 0x61xx response.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3109 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-09 19:41:05 +00:00
aj dad82e19d7 only the first apdu (command) tells us how many bytes we need to get.
we need to keep this value and call get_response as often as needed
to get them part by part.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3093 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-29 09:44:13 +00:00
aj 8fe04d5a86 revert bogus change.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2926 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-01 10:10:35 +00:00
aj ab0066b0d7 fix printf size_t problem with "%lu" and (unsigned long) cast.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2923 c6295689-39f2-0310-b995-f0e70906c6a9
2006-05-01 10:02:50 +00:00
aj 2327835416 fix a memory leak.
don't access buffer beyond length.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2912 c6295689-39f2-0310-b995-f0e70906c6a9
2006-04-26 10:07:20 +00:00
nils 383602b6fe - move logging to the reader driver
- log APDUs only if DEBUG is defined (sensitive APDUs should
  never be logged and we cannot know whether a APDU is sensitive
  or not => enable APDU logging only in a non-production debug
  build)
- remove OPENSC_DONT_LOG_SENSITIVE configure option as it's 
  needed anymore 


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2868 c6295689-39f2-0310-b995-f0e70906c6a9
2006-03-03 22:56:41 +00:00
nils ca2a5e11fd - move APDU encoding to the reader layer
- remove APDU masquerading code, it shouldn't be necessary
  anymore


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2831 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-05 19:00:01 +00:00
nils 85aaa4466d fix typo
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2830 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-03 21:24:11 +00:00
nils fe3e93b625 summary: -complete rewrite of the APDU/transmission handling
code (should now support extended APDUs and is
          hopefully better documented. Note: support for
          the T0 ENVELOPE command is still missing due to
          a lack of test cards).
         -add new APDU case constants SC_APDU_CASE_2 etc.
          which let OpenSC decides, based on the card
          capabilities, whether to use short or extended
          APDUs.
         -add new capability SC_CARD_CAP_RSA_2048 for
          cards supporting 2048 bit RSA operations (note:
          this is more a preliminary hack)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2795 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-28 20:01:43 +00:00