Commit Graph

87 Commits

Author SHA1 Message Date
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
okir ff9a45569a - scconf_parse and scconf_parse_string now return an error message if
something went wrong


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1655 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-03 12:07:01 +00:00
aet d12b21f633 - Remove all references to usbtoken, use OpenCT instead
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1639 c6295689-39f2-0310-b995-f0e70906c6a9
2003-11-25 11:17:02 +00:00
okir 0f32616c20 - added initial support for openpgp card driver
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1580 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-30 17:04:22 +00:00
aet e62eea5351 - Minor cleanups and a warning fix
- sc_release_context: free ctx->preferred_language if set


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1565 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-22 18:16:21 +00:00
okir 931a1dd28a - added error/debug message support to ui.c
- sc_error/sc_debug now use the new ui code
- added language support


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1559 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-22 06:49:59 +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
aet 345914e9e2 Rename HAVE_PCSCLITE to HAVE_PCSC, which is more correct.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1466 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-26 08:15:15 +00:00
aet 597877eb49 Move #include <windows.h> to winconfig.h in
order to minimize win32 specific code sections.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1411 c6295689-39f2-0310-b995-f0e70906c6a9
2003-09-03 18:18:57 +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
aet 5835e752b5 Cleanups
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1401 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-29 16:26:59 +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