Commit Graph

186 Commits

Author SHA1 Message Date
aj b3ad2f9dd2 convert to utf-8.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3084 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-19 21:31:17 +00:00
nils 01f72933af add support to parse the seInfo TokenInfo entry, improve aid support in opensc-explorer
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3045 c6295689-39f2-0310-b995-f0e70906c6a9
2006-10-30 18:51:48 +00:00
nils 5c9c6aaff0 fix docu
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2974 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-19 19:01:39 +00:00
nils 88bae5c923 remove iso logout function, remove dummy logout functions and remove logout call from sc_unlock()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2971 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-17 12:24:04 +00:00
sth 50490acca0 Added support for MuscleCard applet. Thanks to Thomas Harning, David Corcoran of Identity Alliance
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2968 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-07 08:33:37 +00:00
nils 8be396fee3 add function sc_reset() to reset a card; patch supplied by Josep Monés Teixidor <jmt@c3po.es>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2877 c6295689-39f2-0310-b995-f0e70906c6a9
2006-03-22 21:44:09 +00:00
nils beb9d34db0 add some doxygen comments
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2867 c6295689-39f2-0310-b995-f0e70906c6a9
2006-03-03 21:10:02 +00:00
nils d893720f03 add note
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2866 c6295689-39f2-0310-b995-f0e70906c6a9
2006-03-02 18:24:45 +00:00
nils 0bc5cb45fe mark second parameter of sc_disconnect_card() as unused
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2862 c6295689-39f2-0310-b995-f0e70906c6a9
2006-03-01 22:34:54 +00:00
martin e1ef4ec241 Remove the disconnect action from internal reader api
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2861 c6295689-39f2-0310-b995-f0e70906c6a9
2006-03-01 09:45:09 +00:00
nils b051b08584 add initial PIV card support; patch supplied by Douglas E. Engert <deengert@anl.gov>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2842 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-14 22:09:10 +00:00
nils 8e77e87551 sc_mutex_destroy should have a return value
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2832 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-05 19:35:55 +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 5c3aed1189 - remove dependence on a specific threading library
- add two new structures: sc_thread_context_t which let
  the user specify the mutex functions to use and
  sc_context_param_t to specify parameters for the sc_context_t
  creation (including mutex functions) using sc_create_context()
- add new function sc_context_create()  
- remove timestamp code from libopensc


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2829 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-01 22:59:42 +00:00
martin 670c0ee063 Rename: _get_conf_block -> sc_get_conf_block and put it into opensc.h
This way it can be used by OpenSC tokend module.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2828 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-31 15:53:44 +00:00
aj aa2d502ece rename everything namend "etoken" to "cardos" :)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2823 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-23 21:43:01 +00:00
nils de4b5c280f - implement thread-safe path printing function sc_path_print() and use
it src/libopensc/ and src/pkcs15init/
- use size_t for the certlen parameter of sc_pkcs15init_update_certificate()


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2811 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-11 23:41:17 +00:00
nils f18b38fe7f summary: -add more general path concatenation function
sc_concatenate_path() and let sc_append_path use it.
         -add function sc_compare_path_prefix to check whether
          a path starts with a certain sub-path (prefix).
         -add some doxygen docu to some path handling functions


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2801 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-01 23:11:00 +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
nils ca4eba5861 fix ac for file deletion
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2683 c6295689-39f2-0310-b995-f0e70906c6a9
2005-11-17 10:23:35 +00:00
nils f74eaee690 fix GET RESPONSE handling
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2678 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-31 18:44:18 +00:00
nils 43f0118740 summary: - improve support for extended APDUs
- add experimental support for command chaining
         - simplify get_response prototype


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2673 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-30 20:37:03 +00:00
nils 47ee84e72d add functions
void sc_ctx_suppress_errors_on(sc_context_t *ctx);
	void sc_ctx_suppress_errors_off(sc_context_t *ctx);
to turn on/off error suppression (to avoid accessing
sc_context_t directly) and use it.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2671 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-30 19:08:06 +00:00
nils fa65fbf285 summary: - add new function sc_format_oid to libopensc
- cleanup libopensc api


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2670 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-30 18:05:30 +00:00
nils 90d1b0cc9c add support for the Italian Incrypto34 smartcard;
patch supplied by Giuseppe AMATO <giuseppe.amato@st.com>


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2661 c6295689-39f2-0310-b995-f0e70906c6a9
2005-10-24 21:58:35 +00:00
nils 6abeaf1f1c add a new function
void sc_mem_clear(void *ptr, size_t len);
to clear a memory buffer. If OpenSSL is used this function
is a wrapper for OPENSSL_cleanse, otherwise memset is currenlty used.

Use this function to clear memory buffers with sensitive content.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2601 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-17 10:44:45 +00:00
nils 5123be2b85 add two new functions
sc_reader_t *sc_ctx_get_reader(sc_context_t *ctx, unsigned int i);
	unsigned int sc_ctx_get_reader_count(sc_context_t *ctx);
to access the reader_count and the sc_reader objects (to avoid accessing
the sc_context members directly).
Use these functions in src/pkcs11 + error checking to avoid accessing
invalid sc_reader objects.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2595 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-16 10:18:55 +00:00
nils 69ffd496b2 the apdu error codes are unsigned => change sc_check_sw and the card ops check_sw
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2467 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-05 17:18:10 +00:00
nils eab657fb52 change sc_bin_to_hex separator parameter from char to int as character constants are integers in c
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2461 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-03 18:43:40 +00:00
sth d0f267468e Added function sc_compare_oid()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2456 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-03 09:00:00 +00:00
nils cbb32e02e1 add initial support for atrust acos cards; patch supplied by Franz Brandl <f.brandl@a-trust.at>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2374 c6295689-39f2-0310-b995-f0e70906c6a9
2005-07-01 08:26:55 +00:00
sth abf3bf9549 If the SC_CARD_CAP_USE_FCI_AC flag is set, sc_pkcs15init_authenticate() will check the file's ACs on the card instead of relying on the ones in the profile file
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2290 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-30 18:25:50 +00:00
sth a6f8354b6e Added another life cycle state
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2289 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-30 18:18:46 +00:00
sth 9029170d16 No unistd.h on Windows
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2280 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-26 19:35:35 +00:00
aj f5b2845340 silence a few warnings.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2274 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-23 23:24:13 +00:00
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 033a0589fe - For completeness sake, add SC_CARD_FLAG_VENDOR_MASK
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2197 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-23 19:09:39 +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 b80890d49c - Increase SC_MAX_READER_DRIVERS / SC_MAX_CARD_DRIVERS
- Some cleanups before future commits


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2191 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-20 08:26:27 +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 c1b0626cdd - Cleanup, typo fix
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2123 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-02 10:21:10 +00:00
sth 8857ff5b1c Work-around for cards that don't return FCI info
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2118 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-01 07:52:40 +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
sth c8d89211eb src/libopensc/card-belpic.c
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2113 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-29 12:10:52 +00:00
nils 3158fa3e05 merge Martin Paljak's ccid pinpad changes from the OPENSC_0_9 branch to the cvs head
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2095 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-24 11:31:11 +00:00
nils 5e5c61cd28 types are unsigned int
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2055 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-07 18:50:04 +00:00
nils 08826acb4d flags/types are unsigned int, the exponent shouldn't be negative and more const
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2040 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-22 09:54:41 +00:00
nils 3d75aeeaff force_protocol cleanup from Martin Paljak <martin@paljak.pri.ee>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2029 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-21 09:54:47 +00:00
nils e583473ceb two patches from Marin Paljak <martin.paljak@gmail.com> :
- remove unnecessary function from the reader ops
- add a field for pinpad support
- cleanup + fix indent in card-mcrd.c


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1948 c6295689-39f2-0310-b995-f0e70906c6a9
2004-10-22 07:29:07 +00:00
nils 3dacb2c626 implement dynamic card/reader support
from Juan Antonio Martinez (with some input from me)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1944 c6295689-39f2-0310-b995-f0e70906c6a9
2004-10-18 08:24:12 +00:00