Commit Graph

83 Commits

Author SHA1 Message Date
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 64f9578202 apdu.sensitive is not in use since [2868]
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3751 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 09:31:07 +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
alonbl 0a809dd5cb Complete rewrite of OpenSC build system.
1.  Build system now supports MinGW (Windows) compilation using msys and cross compilation.
2.  Ability to explicitly disable and enable dependencies of the package.
3.  openct, pcsc and nsplugins features are disabled by default.
4.  Modified pcsc driver to use pcsc dynamically, no compile time dependency is required.
5.  --enable-pcsc-lite configuration option renamed to --enable-pcsc.
6.  Install opensc.conf file (as opensc.conf.new if opensc.conf exists).
7.  Add--enable-doc configuration option, allow installing documentation into target.
8.  Add --disable-man configuration option, allow msys mingw32 users to
    build from svn without extra dependencies.
9.  Add export files to each library in order to export only required symbols.
    Windows native build may use these files instead of scanning objects' symbols.
10. Add opensc-tool --info to display some general information about the build.
11. Create compatibility library to be linked against library instread of recompiling the
    same source files in different places.
12. Add different win32 version resource to each class of outputs.
13. Make xsl-stylesheets location selectable.
14. Some win32 fixups.
15. Some warning fixups.
16. Many other autoconf/automake cleanups.

Alon Bar-Lev

svn diff -r 3315:3399 https://www.opensc-project.org/svn/opensc/branches/alonbl/mingw

_M   .
D    configure.in
_M   src
_M   src/openssh
M    src/openssh/Makefile.am
_M   src/tools
M    src/tools/rutoken-tool.c
M    src/tools/opensc-tool.c
M    src/tools/cardos-info.c
M    src/tools/pkcs15-crypt.c
M    src/tools/pkcs15-init.c
M    src/tools/piv-tool.c
M    src/tools/netkey-tool.c
M    src/tools/eidenv.c
M    src/tools/cryptoflex-tool.c
M    src/tools/util.c
M    src/tools/pkcs11-tool.c
M    src/tools/pkcs15-tool.c
M    src/tools/util.h
M    src/tools/opensc-explorer.c
M    src/tools/Makefile.am
_M   src/pkcs11
M    src/pkcs11/pkcs11-global.c
M    src/pkcs11/framework-pkcs15.c
M    src/pkcs11/mechanism.c
M    src/pkcs11/pkcs11-display.c
M    src/pkcs11/pkcs11-object.c
A    src/pkcs11/opensc-pkcs11.exports
M    src/pkcs11/sc-pkcs11.h
M    src/pkcs11/pkcs11-spy.c
M    src/pkcs11/openssl.c
M    src/pkcs11/Makefile.am
A    src/pkcs11/pkcs11-spy.exports
_M   src/tests
_M   src/tests/regression
M    src/tests/regression/Makefile.am
M    src/tests/sc-test.c
M    src/tests/pintest.c
M    src/tests/Makefile.am
_M   src/include
_M   src/include/opensc
M    src/include/opensc/Makefile.am
A    src/include/opensc/svnignore
M    src/include/Makefile.am
_M   src/signer
_M   src/signer/npinclude
M    src/signer/npinclude/Makefile.am
M    src/signer/Makefile.am
A    src/signer/signer.exports
_M   src/common
A    src/common/compat_dummy.c
D    src/common/getopt.txt
D    src/common/strlcpy.c
D    src/common/LICENSE
A    src/common/compat_getopt.txt
A    src/common/compat_strlcpy.c
A    src/common/LICENSE.compat_getopt
A    src/common/compat_getopt.c
D    src/common/strlcpy.h
D    src/common/ChangeLog
D    src/common/getpass.c
D    src/common/my_getopt.c
A    src/common/compat_strlcpy.h
A    src/common/compat_getpass.c
A    src/common/compat_getopt.h
A    src/common/ChangeLog.compat_getopt
D    src/common/README.strlcpy
D    src/common/my_getopt.h
A    src/common/compat_getpass.h
A    src/common/README.compat_strlcpy
D    src/common/strlcpy.3
A    src/common/README.compat_getopt
D    src/common/getopt.3
D    src/common/README.my_getopt
A    src/common/compat_strlcpy.3
A    src/common/compat_getopt.3
M    src/common/Makefile.am
M    src/Makefile.am
_M   src/pkcs15init
M    src/pkcs15init/pkcs15-oberthur.c
M    src/pkcs15init/profile.c
M    src/pkcs15init/pkcs15-lib.c
M    src/pkcs15init/pkcs15-rutoken.c
A    src/pkcs15init/pkcs15init.exports
M    src/pkcs15init/pkcs15-gpk.c
M    src/pkcs15init/Makefile.am
_M   src/scconf
M    src/scconf/Makefile.am
M    src/scconf/parse.c
A    src/scconf/scconf.exports
_M   src/libopensc
M    src/libopensc/card-rutoken.c
M    src/libopensc/compression.c
M    src/libopensc/sc.c
M    src/libopensc/card-piv.c
M    src/libopensc/pkcs15-openpgp.c
M    src/libopensc/pkcs15-postecert.c
M    src/libopensc/pkcs15-tcos.c
M    src/libopensc/opensc-config.in
M    src/libopensc/reader-pcsc.c
A    src/libopensc/internal-winscard.h
M    src/libopensc/ctx.c
A    src/libopensc/libopensc.exports
M    src/libopensc/pkcs15-piv.c
M    src/libopensc/pkcs15-infocamere.c
M    src/libopensc/internal.h
M    src/libopensc/pkcs15-actalis.c
M    src/libopensc/pkcs15-starcert.c
M    src/libopensc/card-oberthur.c
M    src/libopensc/pkcs15-atrust-acos.c
M    src/libopensc/p15card-helper.c
D    src/libopensc/part10.h
M    src/libopensc/ui.c
M    src/libopensc/card-gpk.c
M    src/libopensc/pkcs15-wrap.c
M    src/libopensc/pkcs15-gemsafeGPK.c
M    src/libopensc/log.c
M    src/libopensc/pkcs15-esteid.c
M    src/libopensc/pkcs15-prkey-rutoken.c
M    src/libopensc/log.h
M    src/libopensc/Makefile.am
M    src/libopensc/reader-openct.c
_M   aclocal
M    aclocal/Makefile.am
_M   win32
M    win32/Makefile.am
A    win32/versioninfo.rc.in
A    win32/ltrc.inc
A    configure.ac
_M   doc
_M   doc/tools
M    doc/tools/pkcs15-profile.xml
D    doc/changelog.sh
D    doc/export-wiki.xsl
_M   doc/api
_M   doc/api/file
M    doc/api/man.xsl
_M   doc/api/asn1
_M   doc/api/apps
_M   doc/api/init
_M   doc/api/types
_M   doc/api/card
M    doc/api/html.xsl
_M   doc/api/misc
_M   doc/api/util
M    doc/Makefile.am
D    doc/export-wiki.sh
AM   doc/nonpersistent
A    doc/nonpersistent/export-wiki.xsl
A    doc/nonpersistent/Makefile.am
A    doc/nonpersistent/export-wiki.sh
A    doc/nonpersistent/svn2cl.xsl
D    doc/generate-man.sh
D    doc/svn2cl.xsl
M    Makefile.am
A    svnignore
_M   etc
M    etc/opensc.conf.in
M    etc/Makefile.am
D    man
_M   solaris
M    solaris/Makefile



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3405 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-06 16:06:59 +00:00
aj 4acfe6b096 fix compiler/sparse warnings.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3177 c6295689-39f2-0310-b995-f0e70906c6a9
2007-06-21 10:07:01 +00:00
nils a8908b8548 252 bytes work as well
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3170 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-13 15:43:22 +00:00
nils 37157f38ee bugfix: try to read at most 248 bytes
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3168 c6295689-39f2-0310-b995-f0e70906c6a9
2007-05-13 09:31:46 +00:00
nils 2e1c80f3fe use EVP api
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3102 c6295689-39f2-0310-b995-f0e70906c6a9
2007-01-06 13:23:52 +00:00
nils 1376a07cfa fix APDU case
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2764 c6295689-39f2-0310-b995-f0e70906c6a9
2005-12-12 20:38:19 +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 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 f6c95792fe let src/libopensc/ compile with -Wall -W -Wno-unused-parameter -Werror
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2546 c6295689-39f2-0310-b995-f0e70906c6a9
2005-09-07 08:33:55 +00:00
nils 260723da53 cleanup
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2513 c6295689-39f2-0310-b995-f0e70906c6a9
2005-08-23 21:16:55 +00:00
nils 315b961d9a add support for gpk16k gemsafe cards, Douglas E. Engert et al
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2310 c6295689-39f2-0310-b995-f0e70906c6a9
2005-04-16 10:40:00 +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 32b417cbf3 - First stab towards standardized card types
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2172 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-10 10:07:13 +00:00
aet 73aa989875 - Unify a bit the output of commands like opensc-tool -D
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2166 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-09 14:47:46 +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 0b773d6612 - Cleanup
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2154 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-07 11:40:58 +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 bd0f86f69c - Unify all card drivers ATR matching code to use _sc_match_atr_hex,
untested as of yet.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2134 c6295689-39f2-0310-b995-f0e70906c6a9
2005-02-04 20:29:35 +00:00
nils 786878c396 implement serial number support for gpk 16k cards
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@2022 c6295689-39f2-0310-b995-f0e70906c6a9
2004-12-15 19:59:59 +00:00
okir 7bb64d0fcf - fixed GPK16K key gen, as suggested by Chaskiel
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1715 c6295689-39f2-0310-b995-f0e70906c6a9
2004-01-07 10:11:22 +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 bca2a9f233 - added GPK on-board keygen (based on code by Chaskiel)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1678 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-16 14:32:16 +00:00
okir dcce086a0e - Fix the "get_info failed" error; based on a patch by Ludovic Rousseau.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1653 c6295689-39f2-0310-b995-f0e70906c6a9
2003-12-03 11:11:14 +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
okir c323d0a082 - the previous patch was bad; fixed it
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1516 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-14 09:02:51 +00:00
okir 106351eb5c - some commands used the wrong APDU case
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1498 c6295689-39f2-0310-b995-f0e70906c6a9
2003-10-11 12:41:28 +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 70c3d91b23 - added missing intialization of apdu struct
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1395 c6295689-39f2-0310-b995-f0e70906c6a9
2003-08-28 12:50:51 +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
okir 53b5c2b389 - fixed VERIFY handling
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1317 c6295689-39f2-0310-b995-f0e70906c6a9
2003-07-30 11:07:25 +00:00
okir 127f94ad37 - added pinpad support for OpenCT
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1215 c6295689-39f2-0310-b995-f0e70906c6a9
2003-06-23 12:56:36 +00:00
okir 48a61e95c0 - added card name to struct sc_card to allow upper level apps to identify
card type more precisely


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1173 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-28 20:52:33 +00:00
sth e9e7db89c7 Fix of the previous Win32 patch related to the assumed absence of OPENSSL_cleanse(): this function does is present on OpenSSL 0.9.7 but not on the beta4 version
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1093 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-08 10:42:36 +00:00
sth 782f5d39e6 Fix for Win32 where there's no OPENSSL_cleanse()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1086 c6295689-39f2-0310-b995-f0e70906c6a9
2003-05-02 14:33:02 +00:00
aj 131719b8c6 - add robert to Authors as contributor of bug fixes
- configure code finally working.
   engine is detected and path to libcrypto.a is also set.
 - roberts fix for reader-usbtoken.c
 - card-gpk.c migraton to DES_ routines with #define for 0.9.6 openssl.
 - man pages: do not ship pkcs15-profile.5 (.in is in the tarfile)
 - assuan: replace "strcpy(stpcpy(.., ..), ..)" with
   "strcat(strcpy(.., ..), ..)" which looks good, but nobody uses
   assuan I guess ?
 - declaration of sc_pkcs15init_set_lifecycle kills a warning
 - #include <openssl/bn.h> kills a warning (or compile problem?)
 - removed unused txt[256]; from p15_eid (kills a warning)
 - now "ln -s" the signer plugin to the plugin directory.
 - moved key_out direction to the beginning of a function (kills
   a warning or compile error)
 - changed pkcs11-tool option "quiet" to "verbose" to conform to
   other tools.
 - made algo argument to wrap_unwrap a "const" (kills several warnings)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1063 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-22 17:00:38 +00:00
okir 7dd987d6cd - fixed some compiler warnings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1028 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-16 16:01:22 +00:00
okir 91b7b3c7a6 - suppress "not supported" error messages from sc_card_ctl
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1004 c6295689-39f2-0310-b995-f0e70906c6a9
2003-04-14 08:17:53 +00:00
okir c816a1f461 - use OPENSSL_cleanse instead of memset to zap DES key (Nils Larsch)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@952 c6295689-39f2-0310-b995-f0e70906c6a9
2003-03-12 10:20:46 +00:00
sth 9631ef3636 removed const in sc_card_driver (caused win32 crash)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@918 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-20 12:51:07 +00:00
okir 4ffba35b5e - fixed change/unblock pin for GPK
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@910 c6295689-39f2-0310-b995-f0e70906c6a9
2003-02-16 20:25:41 +00:00
okir e69517941f - added SC_CARD_CAP_RNG
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@864 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-15 13:20:02 +00:00
okir 4749a40e5b - prevent segfault in opensc-explorer create command
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@847 c6295689-39f2-0310-b995-f0e70906c6a9
2003-01-09 07:31:58 +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
okir 3168c8ea26 - added new cardctl SC_CARDCTL_GET_DEFAULT_KEY to get default transport keys
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@741 c6295689-39f2-0310-b995-f0e70906c6a9
2002-12-04 09:26:40 +00:00
okir 45892e686f - detect when a GPK card is already personalized
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@704 c6295689-39f2-0310-b995-f0e70906c6a9
2002-11-08 13:50:33 +00:00
okir ac43fede31 - GemSafe cards have a directory 0200 with an AIDF file in it, and
will return a 0x6F file info block when selecting this DF. Try
  to parse it, as far as we understand it.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@701 c6295689-39f2-0310-b995-f0e70906c6a9
2002-11-08 12:10:55 +00:00