Commit Graph

98 Commits

Author SHA1 Message Date
aj ad79822134 convert to utf-8.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3085 c6295689-39f2-0310-b995-f0e70906c6a9
2006-12-19 21:32:31 +00:00
ludovic.rousseau bd753c4967 use the OPENSC_DEBUG environment variable to overwite the configuration
variable debug in opensc.conf


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3043 c6295689-39f2-0310-b995-f0e70906c6a9
2006-10-30 07:37:44 +00:00
aj ec38927731 check for environment variable first on windows, too.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2978 c6295689-39f2-0310-b995-f0e70906c6a9
2006-06-26 21:03:11 +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
aj 156e3a574d maybe it would be good to check he return value?
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2908 c6295689-39f2-0310-b995-f0e70906c6a9
2006-04-26 10:05:21 +00:00
martin 0a9912233d Fix for a segfaul. Patch provided by Albert Solana Berengu
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2857 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-23 13:40:03 +00:00
nils 8410084f0e fix warnings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2851 c6295689-39f2-0310-b995-f0e70906c6a9
2006-02-17 21:06:31 +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
aj d501480a29 move renames.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2824 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-23 21:44:37 +00:00
nils 9f943aa2b4 don't segfault if no config file could be found (win); thanks to Nicolas Justin <nicolas.justin@idealx.com>
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2806 c6295689-39f2-0310-b995-f0e70906c6a9
2006-01-04 18:52:52 +00:00
aj 7e15333537 add paranoia: what if scconf_find_bloicks returns NULL?
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2709 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-05 21:35:31 +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 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 55418c5ac3 log dlerror message when dlopen failed
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2596 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-16 20:31:06 +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
sth ca3be84ffb Fix warning on Windows compiler
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2591 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-15 05:41:29 +00:00
nils d0f1b085e9 fix function pointers
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2571 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-11 20:40:58 +00:00
aj ff62b88e1c big configure update.
use pkg-config for openct, openssl, pcsc.
do not compilke libp11. do not compile sslengines.
remove scdl. use libltdl instead.
use libassuan.m4 macro for m4 detection.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2528 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-01 14:01:58 +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
aj 52d3262e90 apply improved profile handling code.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2270 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-23 23:10:50 +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 8c9895c896 - Add support for getting location of the configuration
file from Windows registry (HKCU/HKLM)
- Handle OPENSC_CONF environment variable on unix
- Add configuration option "profile_dir" to bypass
  build time setting for pkcs15 initialization profiles
  directory

Patch by Andreas Jellinghaus, with minor enhancements
from me.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2231 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-07 14:00:31 +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 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 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
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
aet 16b1b6e5a2 - Add experimental multi-slot support for CT-API
and CT-BCS 1.0 enhancements. (Bernhard Froehlich <ted@convey.de>)
- Enable CT-API for win32


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2111 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-29 10:49:48 +00:00
nils 4c391a21ac dump version info in the log
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2053 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-03 17:47:25 +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 b1d4e36529 cleanup
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2047 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-27 14:33:56 +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
aet 55e170e0ac - Build / warning fixes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2014 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-15 13:53:36 +00:00
nils f2157e90ba don't close stdout/stderr
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2005 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-13 09:48:54 +00:00
nils 5feb1f133f close files when the context is destroyed
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2001 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-12 20:41:04 +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 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
nils 9953d0b21d fix some compiler warnings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1905 c6295689-39f2-0310-b995-f0e70906c6a9
2004-09-20 09:47:35 +00:00
nils d6c98f7ae2 add support to force pcsc to use a certain protocol
patch supplied by Martin Paljak <martin@paljak.pri.ee>


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1890 c6295689-39f2-0310-b995-f0e70906c6a9
2004-08-19 08:55:15 +00:00
nils e618b1ff28 move the emv driver to the end of list
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1888 c6295689-39f2-0310-b995-f0e70906c6a9
2004-08-19 08:39:18 +00:00
aj 52c1b2d700 Very basic and untested oberthur driver. Could possibly work,
as only non-essential parts stripped (or at least that was the plan).

Written by Viktor Tarasov of idealx.

All bugs by Andreas Jellinghaus, please don't blame anyone else.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1793 c6295689-39f2-0310-b995-f0e70906c6a9
2004-06-16 20:59:59 +00:00
okir 8a4a5f0331 - Added support for JCOP/BlueZ cards, contributed by Chaskiel M Grundman
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1696 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-29 12:28:37 +00:00
aet b706b298c9 - Revert parts of the previous patch, use void *func
instead of struct sc_reader_driver *(*func(void);
  as _sc_driver_entry is used for both, reader and
  card driver lists.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1684 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-18 19:13:13 +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 85fa4ed0da - Matched Cyberflex patch from Martin Buechler. Created a new
driver named cyberflex which shares a lot of code with the original
  flex driver. This is a lot cleaner than having to create if/else
  monsters.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1661 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-08 10:54:55 +00:00
aet 4f30699b0d - Avoid breaking source compatibility, add char *errmsg to scconf_context
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1656 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-03 14:09:15 +00:00