Commit Graph

88 Commits

Author SHA1 Message Date
nils 8ba443d1d9 fix parameter type
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2507 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-22 09:22:25 +00:00
martin 7ffd68a9ee Make the pcsc pinpad option work.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2503 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-21 18:44:07 +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
pisi 3eec01945a copypaste ****s. Introduce a common internal function that removes several copypastes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2235 c6295689-39f2-0310-b995-f0e70906c6a9
2005-03-09 11:14:41 +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 91d16e04b0 - Change sc_atr_table->id to type, so the name is synced
between sc_atr_table and sc_card structures.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2174 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-10 10:09:15 +00:00
aet bb7e663fdb - Add comments
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2162 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-09 14:05:19 +00:00
aet ece96aff98 - Add atrmask to sc_atr_table
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2160 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-09 11:33:37 +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
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
nils a37338352a remove obsolete module support in libopensc (scdl should now
be used)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1958 c6295689-39f2-0310-b995-f0e70906c6a9
2004-10-27 06:41:27 +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
aet 603ccec619 - Fixed nightly snapshot generation
- Link keycache.h to src/include/opensc
- Move mutex function declarations to opensc.h


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1525 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-14 21:56:56 +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 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 d635d53771 - support ATR maps in /etc/opensc.conf, e.g.
card_driver flex {
		atr = 11:22:33:44;
		atr = 55:66:77:88;
	}


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@738 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-03 15:40:40 +00:00
jey 21a82c17b8 - Renamed read_tag to sc_asn1_read_tag and made it a
non-static function


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@679 c6295689-39f2-0310-b995-f0e70906c6a9
2002-08-21 10:02:55 +00:00
aet 3dccd63989 - C++ support. Compiles with gcc/g++ for Linux, otherwise
completely untested.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@574 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-19 14:23:31 +00:00
aet 11c937991b Change calling convention for sc_module_close()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@474 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-05 18:10:17 +00:00
jey 22636c2df9 - Added SC_ERROR_FILE_ALREADY_EXISTS
- Changed call convention for reader finish()
- CT-API driver now frees its resources correctly
- Added year 2002 to some of the copyright statements
- sc_pkcs15_decipher() and sc_pkcs15_compute_signature()
  now select only the parent DF of the private key file


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@463 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-05 14:46:44 +00:00
aet d81d10ba90 Upgrade sources to use new headers, part #1
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@458 c6295689-39f2-0310-b995-f0e70906c6a9
2002-04-05 10:44:51 +00:00
aet 8f6ffee6a9 - Minor cleanups to build process
- Add header check for dlfcn.h
- Add internal functions sc_module_{open,close,get_address}
- Use environ instead __environ for scldap_search, should be
  more portable.
- Fix compiler warnings noticed by Tru64 / AIX cc


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@401 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-27 13:13:54 +00:00
jey 59d4e9b7be - Added support for CT-API
- Improved config file loading
- Implemented ATR parsing


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@396 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-26 11:38:40 +00:00
jey f21926af00 - Started to add configuration file support to
libopensc
- Added typedefs for some basic structs (e.g.
  struct sc_card --> sc_card_t)
- Added a second argument to sc_establish_context()
  to identify the calling application
- Renamed sc_destroy_context() to sc_release_context()


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@378 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-24 14:12:38 +00:00
jey ae306cf06f - GPK now reports it's PK abilities correctly
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@286 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-10 11:48:57 +00:00
jey 3416461c4b - Added X.509 algorithm id decoding and encoding to asn1.c
- Implemented a generic ATR matching helper function
- Made signing much smarter (should even work now)
- Added info about supported crypto algorithms to struct sc_card


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@276 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-08 05:59:57 +00:00
jey 4ac49d6e88 - intermediary checkin
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@249 c6295689-39f2-0310-b995-f0e70906c6a9
2002-03-01 11:52:55 +00:00
jey 3fa1b27736 - implemented reader abstraction layer; now it's easier to
add support for e.g. CT-API
- renamed ops_data field to drv_data in struct sc_card
- copied coding style document from Linux kernel


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@221 c6295689-39f2-0310-b995-f0e70906c6a9
2002-02-24 19:32:14 +00:00
jey 262e5c2083 - added error reporting for several new SWs
- added check_sw function to sc_card_operations


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@211 c6295689-39f2-0310-b995-f0e70906c6a9
2002-02-15 23:17:58 +00:00
jey 452b9d4193 - pretty much finished the DER encoder
- added delete and create file support for 'flex cards
- PKCS #15 DF's are now stored more flexibly; this makes
  adding new types of DF's (such as PuKDF's) easier
- added 'get' and 'put' commands to opensc-explorer


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@160 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-13 23:56:13 +00:00
aet 3bcb086df4 Fix typo
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@136 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-05 19:05:29 +00:00
aet a327209319 SCardGetStatusChange/rgReaderStates changes for compatibility
with older and/or modified pcsc-lite releases.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@135 c6295689-39f2-0310-b995-f0e70906c6a9
2002-01-05 19:01:55 +00:00
aet 607271df53 Merges with SCIDI to help integrating build process with it
Remove some gcc specific flags from Makefile.am
Rename some header defines
size_t vs. int fixups
opensc.h: Define inline as null for other compilers than gcc, for now
Port pam_pkcs15 to compile for Solaris and HP-UX, untested
Fix compiler warnings

OpenSC now compiles cleanly for Tru64, AIX and HP-UX.

The only problem is the tools using getopt_long() (GNU extension),
to be fixed later..


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@120 c6295689-39f2-0310-b995-f0e70906c6a9
2001-12-30 21:17:34 +00:00
jey ad2e34cb6c - added preliminary support for EMV cards
- changed a few function prototypes
- implemented access control lists to files
- added sc_read_record() function
- updated the NEWS file


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@111 c6295689-39f2-0310-b995-f0e70906c6a9
2001-12-29 02:07:32 +00:00
jey 695ad01b28 - added preliminary EMV support
- made a few bug fixes relating to select_file operation


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@107 c6295689-39f2-0310-b995-f0e70906c6a9
2001-12-27 17:25:10 +00:00