Commit Graph

3105 Commits

Author SHA1 Message Date
ludovic.rousseau 232a26b62d C_Initialize(): log the value of the pInitArgs argument
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3515 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-20 09:41:44 +00:00
alonbl 0d71a75b1a Fixup configure help strings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3514 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-14 18:34:32 +00:00
ludovic.rousseau d7bb718e24 C_Finalize(): do not unload the module since the application may try to
make PKCS#11 calls again


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3513 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-12 09:41:48 +00:00
alonbl e14cf57ad1 Better handle openct reader replug, revert last change in pkcs11-pin
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3512 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-10 09:55:01 +00:00
alonbl a40cf036bb Fix sc_pkcs15_verify_pin() to handle OpenCT hotplug correctly
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3511 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-09 22:22:41 +00:00
ludovic.rousseau 91177e51ec Use size_t instead of int when needed, plus some other minor changes
Patch bug.1 included in Ticket #176


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3510 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-05 13:00:01 +00:00
ludovic.rousseau 8624796f37 use type size_t instead of int since the 3rd argument of
sc_format_asn1_entry() is void *
using int will fail on a 64-bits platform

Closes Ticket #176


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3509 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-05 09:51:39 +00:00
alonbl 96b0f4a670 Verify PIN support Plug&Play
If card was reset or reader reconnected, verify can restart
transaction, as upper level will not cache PIN in this case.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3508 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-02 17:56:52 +00:00
alonbl e237574742 Plug&Play support
This is not the best solution, but focus on smallest code change.

Changes:

1. Add detect_readers() to reader opts, this adds new readers to the end
   of the readers list until list is full.

2. Add sc_ctx_detect_readers() that calls readers' detect_readers().

3. Fixup pcsc_lock() so that it reconnect to the card and report proper
   error so caller may be notified if session was lost.

4. Allow context to be created without readers.

5. Call sc_ctx_detect_readers() from PKCS#11 C_GetSlotList with NULL_PTR.

6. Allow no reader at detect_card, as reader my be removed.

7. Since I broke ABI, I updated the external module version requirement
   to match OpenSC version. In the future a separate version should be
   maintained for each interface, this should be unrelated to the package
   version.

Alon

---

svn merge -r 3480:3505 https://www.opensc-project.org/svn/opensc/branches/alonbl/pnp

M    src/tools/opensc-tool.c
M    src/pkcs11/pkcs11-global.c
M    src/pkcs11/slot.c
M    src/libopensc/reader-pcsc.c
M    src/libopensc/internal-winscard.h
M    src/libopensc/ctx.c
M    src/libopensc/reader-ctapi.c
M    src/libopensc/libopensc.exports
M    src/libopensc/reader-openct.c
M    src/libopensc/opensc.h


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3506 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-29 17:01:19 +00:00
alonbl c862f88ce7 SIGSEGV print_tags_recursive - fix
Patch opensc-0.11.4.trunk-r3502-fix-segv_print_tags_asn1.diff (for trunk
trunk revision 3502) is draft.


Example 1 (SIGSEGV):

OpenSC Explorer version 0.11.4-svn
OpenSC [3F00]> cd ff00
OpenSC [3F00/FF00]> asn1 0001
Printing tags for buffer of length 512
[Switching to Thread -1211906368 (LWP 25131)]

By Aktiv Co. Aleksey Samsonov



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3504 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-29 06:11:34 +00:00
alonbl 6c740b907e More MSVC fixups by Douglas E. Engert
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3503 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-29 06:09:00 +00:00
ludovic.rousseau e928d5565c convert C++ in C comment
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3502 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:57:03 +00:00
ludovic.rousseau 932cc41f30 convert C++ comment in C comment
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3501 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:45:28 +00:00
ludovic.rousseau 7201fc7ace convert a C++ comment in C comment
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3500 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:44:07 +00:00
ludovic.rousseau 63b55ea0aa rutoken_new_file(): initialize sec_attr
pkcs15-rutoken.c:372: warning: 'sec_attr' may be used uninitialized in
this function


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3499 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:42:22 +00:00
ludovic.rousseau 0b239489fc completely initialize the sc_pkcs11_framework_ops structure (using NULL
for undefined callbacks)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3498 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:36:07 +00:00
ludovic.rousseau 040ac682d8 completely initialize the struct fmap fields
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3497 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:33:26 +00:00
ludovic.rousseau c1311c8c6a card.c:756: warning: unused variable 'j'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3496 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:24:57 +00:00
ludovic.rousseau ab99cc50bd convert C++ comment in C comment (ISO C90)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3495 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-28 07:23:03 +00:00
alonbl 514d471f0e Use O_BINARY at rutoken
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3492 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-25 12:49:11 +00:00
alonbl 597bcd7635 Cleanup some Windows issues with open
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3491 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-25 11:51:03 +00:00
alonbl 104ff0ed66 rutoken: Some MSVC fixups, by Aktiv Co. Aleksey Samsonov
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3490 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-24 16:34:08 +00:00
alonbl 8110595fb6 Add PATH comment for Windows users
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3489 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-24 06:32:28 +00:00
alonbl 886d6ac3ca Add --force to autoreconf
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3479 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-18 20:37:55 +00:00
alonbl 8d7bce4de2 ruToken fixups
http://www.opensc-project.org/pipermail/opensc-devel/2008-April/011057.html

By Aktiv Co. Aleksey Samsonov



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3478 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-18 14:08:23 +00:00
alonbl e19d6a93ed Make sure we generate opensc.conf every time
There is no dependency for autoconf variables, and
we provide the opensc.conf for Windows MSCVER build.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3477 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-17 10:05:50 +00:00
alonbl a160f0ebf7 common/main.c is part of getopt package
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3476 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-16 04:42:31 +00:00
alonbl 5d218007c3 Fix last reference to VERSION and not PACKAGE_VERSION
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3475 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-16 04:32:56 +00:00
alonbl 715a794db9 Add PKCS11-Spy to installer
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3474 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-13 17:57:44 +00:00
alonbl d1f6df897e Add simple Windows installer script for OpenSC
As nobody want to maintain UI installer, at least
provide an installation script.

The opensc-install.bat should be run from the
installed location.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3473 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-13 17:51:20 +00:00
alonbl 606052c901 Add --get-conf-entry, --set-conf-entry to opensc-tool
Although not perfect, will enable installer/users
to perform some simple tasks against configuration file.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3472 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-12 21:54:02 +00:00
alonbl 865f6e9c70 More fixups to maintainer-clean
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3471 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-11 12:52:46 +00:00
alonbl c50280cb28 afxres.h is not needed
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3470 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-10 12:21:18 +00:00
alonbl f503c3482f No need for Makefile.mak in win32 anymore
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3469 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-08 19:16:48 +00:00
alonbl d84077749b Distribute autoconf generated files for MSVC build
Construct resource files and winconfig.h using autoconf
substitutions.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3468 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-08 18:36:42 +00:00
alonbl 9dff29af2d Typeo
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3467 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-08 17:56:27 +00:00
alonbl 5f567f7a3c More MSVC build additions
(1) use the exports for opensc-pkcs11.dll, onepin-opensc-pkcs11.dll,
      and pkcs11-spy.dll

  (2) don't link common.lib with scconf.lib, to avoid duplicate messages
      later.

  (3) add piv-tool to openssl_programs.

By Douglas E. Engert



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3466 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-07 21:35:11 +00:00
alonbl f9347111db Support OPENSC_FEATURES for MSC build
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3465 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-07 21:28:37 +00:00
alonbl 54c1c735f3 Attached are the latest mode to OpenSC svn 3462 to use the Makefile.mak
files to build on Windows.

I got rutoken to compile, and took out the #ifdef's I had in last week.
The rutoken programmer declared some variables in the middle of a block
rather then having all the declare statements at the beginning of a block
as is normally done in C. The Microsoft compile treats this as an error.
(Actual many errors.)

The makedef.pl is no longer needed, as the exports files can be used.
Note that in the original Makefile.mak files only opensc.def and
pkcs15init.def were created.

winconfig.h has a number of changes. As discussed last week this could
be created by autoconf. I also noted that the Active State Perl that
was required for the makedef.pl has a psed command that could be used
like sed to update winconfig.h.  I did not attempt to do this.



  win32/Make.rules.mak - Use ENABLE_OPENSSL and ENABLE_ZLIB

  src/tools/Makefile.mak - add the rutoken.tool.exe

  src/tools/eidenv.c - use PACKAGE_VERSION

  src/pkcs11/Makefile.mak - reorder the objest to match the list in the
           Makefile.am. Makes it easier to read.

  src/include/winconfig.h - The windows version of the config.h
           Changes based on discussions on the list last week.

  src/common/Makefile.mak - renamed modules.

  src/pkcs15init/Makefile.mak - reordered, and added back the rutoken modules
           replaced the use of makdef.pl to sue the exports file.

  src/scconf/Makefile.mak - reordered objects.

  src/libopensc/card-rutoken.c -
           error. Moved the declares to the beginning of blocks.

  src/libopensc/Makefile.mak - reorder names, and add rutoken.
           Use the libopensc.exports file.

  src/libopensc/pkcs15-prkey-rutoken.c - more moving of declare statements.

By Douglas E. Engert

http://www.opensc-project.org/pipermail/opensc-devel/2008-April/011011.html



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3464 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-07 19:42:43 +00:00
alonbl 66d819a3a6 ruToken C fixups
http://www.opensc-project.org/pipermail/opensc-devel/2008-April/011011.html

By Douglas E. Engert



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3463 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-07 19:25:21 +00:00
alonbl 6e65efb257 Some more build cleanups
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3462 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-04 20:38:20 +00:00
alonbl 376139d1f1 Fix future issue with distcheck
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3461 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-04 19:21:59 +00:00
alonbl 6f22611438 Fix some duplicate symbols with Windows header files.
Thanks to Douglas E. Engert.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3460 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-04 16:46:50 +00:00
alonbl e4eeba26cd Fix MSVC compiler error
http://www.opensc-project.org/pipermail/opensc-devel/2008-April/010997.html

Thanks to Douglas E. Engert


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3459 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-04 16:21:08 +00:00
alonbl ac0c291f9c Fixup WINAPI location
By: Douglas E. Engert

 (2) Change the typdefs for the SC_*_t routines.
  The WINAPI had to be moved. For example from:
    typedef PCSC_API LONG (*SCardEstablishContext_t)...
  to:
    typedef LONG (PCSC_API *SCardEstablishContext_t)...



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3458 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-04 06:05:38 +00:00
alonbl 317ad765c5 Solve some Windows conflicts
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3457 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-04 05:39:34 +00:00
alonbl 94d884922c Fix default PC/SC provider for darwin, thanks to Martin Paljak
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3456 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-02 19:48:12 +00:00
alonbl 0e2c664d34 Rename PC/SC library into PC/SC provider.
Sync symbols between configuration and source.
Put default provider in opensc.conf, opensc-tool.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3455 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-02 05:44:12 +00:00
alonbl 65a427e419 Ignore -svn component so distcheck will pass for svn versions
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3454 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-01 20:41:07 +00:00
alonbl 47c7cf2bbe Readd -svn version suffix, removed at revision 3446
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3453 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-01 20:32:28 +00:00