Commit Graph

3145 Commits

Author SHA1 Message Date
alonbl c89d27f755 Don't removed generated external files during distclean
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3562 c6295689-39f2-0310-b995-f0e70906c6a9
2008-09-08 14:04:49 +00:00
aj 29ee5e116c Update trunk for new release.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3559 c6295689-39f2-0310-b995-f0e70906c6a9
2008-08-27 06:19:36 +00:00
aj 5ce2fcdc8c Document recent changes.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3558 c6295689-39f2-0310-b995-f0e70906c6a9
2008-08-20 15:20:23 +00:00
aj 9468d989cf Douglas E. Engert:
The pkcs15-gemsafeV1.c code assumes that the key_ref is always 3. But that is
not always the case. In our case it is 4. The patch tries to determine the
key_ref by looking at what appears to be a table of allocated keys, and picking
the first allocated key. 

In case this is not always true, the patch will also allow for the the
opensc.conf card flag = n to specify the key_ref as the low order 4 bits of the
flag.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3557 c6295689-39f2-0310-b995-f0e70906c6a9
2008-08-20 15:17:59 +00:00
aj 27d00f9265 Add new entersafe driver for ePass 3000 tokens.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3556 c6295689-39f2-0310-b995-f0e70906c6a9
2008-08-20 05:41:20 +00:00
aj 5ef6b5ff7d remove check for label - if you set one with "pkcs15-init -C -l your-label"
this check doesn't work correctly.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3555 c6295689-39f2-0310-b995-f0e70906c6a9
2008-08-12 14:48:54 +00:00
ludovic.rousseau 56ea99d8a0 print_mech_info(): replace printf by fprintf to correctly redirect the
log


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3554 c6295689-39f2-0310-b995-f0e70906c6a9
2008-08-12 09:51:43 +00:00
aj 07247596d6 Apply security fix.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3552 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-31 13:25:16 +00:00
aj 1b1ae308e0 update export script.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3550 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-31 12:43:44 +00:00
aj c528205cde and update the date.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3548 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-31 12:18:13 +00:00
aj 262a630bfb document this change.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3547 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-31 12:17:58 +00:00
aj e243e7f322 make the sign_with_decrypt hack configureable.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3546 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-31 12:17:29 +00:00
aj 29d78fde39 move checks to pkcs15_bind, where we can look at the config.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3545 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-31 12:13:15 +00:00
alonbl f4e8c61c50 Update NEWS
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3544 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-30 14:00:47 +00:00
aj 59dc6f5157 update configure and NEWS file.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3543 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-30 11:57:40 +00:00
cg2v 973bf9a791 export a GET DATA operation for cardos so opensc-explorer's do_get works
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3540 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-27 15:50:01 +00:00
cg2v 625d14c880 Don't free uninitialized memory if pem_encode fails.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3539 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-27 15:18:59 +00:00
aj 758adbc7ac Chaskiel Grundman:
I found the following patch to opensc-explorer handy when cleaning up 
after some failed keygens (but not all, since you can't delete private
key objects). It switches the card to the admin lifecycle at startup:


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3538 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-21 14:39:37 +00:00
aj 64fd479aa5 Chaskiel Grundman:
Nowhere in pkcs15init/pkcs15-cardos.c is the user pin ever 
requested or presented to the card. 
Since the update acl for the key object uses the user pin, the GENERATE 
KEY operation fails when it isn't logged in.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3537 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-21 14:35:21 +00:00
martin 2599fa795d Do not delete .exports files on make clean
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3536 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-02 10:15:09 +00:00
alonbl 4fc6c498ed Make PC/SC work on Windows again
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3535 c6295689-39f2-0310-b995-f0e70906c6a9
2008-07-02 09:55:32 +00:00
alonbl a3796270d4 Detect libtool-1 or libtool-2 at runtime
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3534 c6295689-39f2-0310-b995-f0e70906c6a9
2008-06-11 10:14:43 +00:00
alonbl 7534621a89 Revert pic changeset
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3533 c6295689-39f2-0310-b995-f0e70906c6a9
2008-06-09 08:32:42 +00:00
alonbl c18dbe5669 More aclocal->m4
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3532 c6295689-39f2-0310-b995-f0e70906c6a9
2008-06-09 08:31:38 +00:00
ludovic.rousseau 38f3ae2518 upgrade from http://autoconf-archive.cryp.to/acx_pthread.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3531 c6295689-39f2-0310-b995-f0e70906c6a9
2008-06-09 08:10:11 +00:00
alonbl 555dcd912e Revert autoconf version prereq
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3530 c6295689-39f2-0310-b995-f0e70906c6a9
2008-06-05 20:21:30 +00:00
alonbl a9db36f7bb Rename aclocal->m4 to be more standard
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3529 c6295689-39f2-0310-b995-f0e70906c6a9
2008-06-05 17:06:27 +00:00
alonbl 7d6cf6b694 Prepare for libtool-2
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3528 c6295689-39f2-0310-b995-f0e70906c6a9
2008-06-05 17:03:47 +00:00
alonbl df27108452 No point to maintain static list of available drivers in configuration file, user can always use opensc-tool to see available drivers
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3527 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-26 11:35:56 +00:00
alonbl 47013af374 opensc-explorer double free and cleanups
$ opensc-explorer
OpenSC Explorer version 0.11.4-svn
OpenSC [3F00]> cat
only working EFs may be read
OpenSC [3F00]> cat
only working EFs may be read
opensc-explorer: sc.c:492: sc_file_free: Assertion `sc_file_valid(file)' failed.
Aborted

$ opensc-explorer
OpenSC Explorer version 0.11.4-svn
OpenSC [3F00]> cd ff00
OpenSC [3F00/FF00]> cat
only working EFs may be read
OpenSC [3F00/FF00]> cd ..
opensc-explorer: sc.c:492: sc_file_free: Assertion `sc_file_valid(file)' failed.
Aborted

By Aktiv Co. Aleksey Samsonov
And some more Cleanups 



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3526 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-26 10:46:16 +00:00
ludovic.rousseau 4fd85ce0cf print_generic() & print_print(): size is a CK_ULONG (unsigned) so compare
using "!= (CK_LONG)(-1)" instead of "> 0"


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3525 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-26 08:30:39 +00:00
ludovic.rousseau 4d1218b64f completely initialize pkcs11_secret_key_ops structure with NULL pointers
secretkey.c:225: warning: missing initializer
secretkey.c:225: warning: (near initialization for 'pkcs11_secret_key_ops.destroy_object')


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3524 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-22 12:37:57 +00:00
ludovic.rousseau 96064e195c add missing prototype for sc_pkcs15emu_rutoken_init_ex()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3523 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-22 12:30:37 +00:00
ludovic.rousseau bdaf49b0c8 add missing prototype for sc_pkcs15emu_tcos_init_ex()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3522 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-22 12:30:16 +00:00
ludovic.rousseau 82314eaa56 do not use system as a variable name. system() is also a function
card-akis.c:400: warning: declaration of 'system' shadows a global declaration
/usr/include/stdlib.h:730: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3521 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-22 12:26:08 +00:00
ludovic.rousseau 99a16c66db remove two unused variables
reader-pcsc.c:739: warning: unused variable 'rv'
reader-pcsc.c:862: warning: unused variable 'again'


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3520 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-22 12:23:25 +00:00
ludovic.rousseau ca2da1bd67 Avoid variable name space collision
reader-pcsc.c:396: warning: declaration of 'priv' shadows a previous local
reader-pcsc.c:367: warning: shadowed declaration is here
reader-pcsc.c:909: warning: declaration of 'reader' shadows a previous local
reader-pcsc.c:901: warning: shadowed declaration is here 


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3519 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-22 12:22:23 +00:00
ludovic.rousseau f2b103547f add a prototype for compat_dummy()
compat_dummy.c:2: warning: no previous prototype for 'compat_dummy'


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3518 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-22 12:14:39 +00:00
ludovic.rousseau fb7c59e7aa use #ifdef instead of #if
pkcs15-cardos.c:547:5: warning: "SET_SM_BYTES" is not defined
pkcs15-cardos.c:585:5: warning: "SET_SM_BYTES" is not defined


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3517 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-22 12:13:19 +00:00
ludovic.rousseau 28c0c6283d print_ptr_in(): change log format
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3516 c6295689-39f2-0310-b995-f0e70906c6a9
2008-05-20 09:47:27 +00:00
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