Commit Graph

29 Commits

Author SHA1 Message Date
Frank Morgner a899a46b09 replaced SC_TEST_RET with LOG_TEST_RET 2018-12-06 09:26:42 +01:00
Frank Morgner 24b50a4277 replace sc_debug with sc_log 2018-12-06 09:26:42 +01:00
Viktor Tarasov bd84e18f45 coverity-scan: supplement to #710 2016-03-15 19:10:52 +01:00
Viktor Tarasov 260b7711b9 coverity-scan: OVERRUN in ctbs.c
Fix #710
2016-03-15 17:40:15 +01:00
Frank Morgner 98d7578113 ctbcs.c: fixed out of bounds write 2015-11-01 11:33:40 +01:00
Olaf Kirch f42a1c2563 Replace outdated address okir@lst.de -> okir@suse.de
Signed-off-by: Olaf Kirch <okir@suse.de>
2015-10-05 14:07:28 +02:00
Frank Morgner 64417c271e fixed out of bounds access 2015-10-04 13:19:29 +02:00
Frank Morgner 69320f9d54 Checks for out of bounds write 2015-09-17 22:24:33 +02:00
Frank Morgner bcb5fc15e5 honour HAVE_CONFIG_H 2015-04-22 23:55:33 +02:00
vletoux 8ea328ff7f Minor code quality improvements.
Basically checks that the memory allocation succeed.

The ctbcs.c change improve the readability
because count = 0 and len > 254 does not add any value.

VTA: added few coding style changes
2015-04-05 13:15:57 +02:00
Frank Morgner 8d902d1ed3 fixed out of bounds read/write/access 2015-02-04 09:24:50 +01:00
Frank Morgner 87b2403673 fixed out of bounds access/write 2015-01-28 07:00:02 +01:00
Frank Morgner 5d6c4b391d Merge pull request #253 from github-frankmorgner/remove-deadcode
card-asepcos: removed dead code
card-authentic: removed dead code
card-belpic: removed dead code
card-epass2003: removed dead code
card-flex: removed dead code
card-gpk: removed dead code
card-oberthur: removed dead code
card-piv: removed dead code
card-setcos: removed dead code
ctbcs: removed dead code
cwa14890: removed dead code
muscle: removed dead code
pkcs15-atrust-acos: removed dead code
pkcs15-gemsafeV1: removed dead code
pkcs15-skey: removed dead code
reader-ctapi: removed dead code
framework-pkcs15: removed dead code
pkcs11-object: removed dead code
pkcs15-asepcos: removed dead code
pkcs15-cardos: removed dead code
pkcs15-jcop: removed dead code
pkcs15-lib: removed dead code
pkcs15-oberthur: removed dead code
parse: removed dead code
sclex: removed dead code
sm-card-authentic: removed dead code
sm-card-iasecc: removed dead code
sm-cwa14890: removed dead code
sm-global-platform: removed dead code
sc-test: removed dead code
pkcs11-tool: removed dead code
pkcs15-tool: removed dead code
2014-09-07 21:22:43 +02:00
martin 073ad7a4c4 Fix #223: implement ctbcs_build_modify_verification_apdu.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4396 c6295689-39f2-0310-b995-f0e70906c6a9
2010-06-01 12:28:30 +00:00
aj 6545b42c02 cleanup of the debug code:
* reduce to a few, supported functions.
* change all functions to take the debug level as parameter.
* use symbolic names for the debug levels.
* fix tools to pass "verbose"/"opt_debug" as ctx->debug.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4118 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-15 12:17:13 +00:00
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
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 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
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 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
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 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
aet d4f2e2363f - Cleanup
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2099 c6295689-39f2-0310-b995-f0e70906c6a9
2005-01-24 19:46:57 +00:00
nils f0224d3a4b disable unused functions
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2032 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-21 13:56:41 +00:00
nils 9bdd1f675c bugfix: fix segfaults when using a pin-pad for pin verification
thanks to Joachim Bauch <jojo@struktur.de>


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1895 c6295689-39f2-0310-b995-f0e70906c6a9
2004-08-25 20:45:32 +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 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
aet b1eff66867 C++ warning fixes (assuan excluded)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@863 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-14 19:55:45 +00:00
okir 9acca0e724 - Implemented new PIN verify/change/unblock framework. All PIN operations
are routed through sc_pin_cmd(), which builds the APDU and either passes
  it to the card directly, or to the card reader along with a request to
  read the PIN(s) from the reader's keypad.

  Currently, entering PIN in the standard way (i.e. via the application)
  should still work - I have verified GPK and eToken; Cryptoflex verify
  should work as well. Anything else needs additional testing, and support
  for keypad input in particular (I cannot test this at the moment for
  lack of a suitable reader).


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@811 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-23 18:47:27 +00:00