Commit Graph

3328 Commits

Author SHA1 Message Date
martin 30ab50600b Merged [3783:3794/trunk]
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3795 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-25 20:22:11 +00:00
martin 56fb57603b Merge [3758:3783/trunk]
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3785 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-22 09:18:16 +00:00
martin 95a5ab0654 Re-implement PIN cache on PKCS#15 layer; remove it from PKCS#11. Re-name and log PKCS#15 options to better reflect the purpose.
Data objects and PKCS#15 init are left broken currently.



git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3784 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-22 08:59:59 +00:00
martin 4196e9f156 PC/SC: Log enabled options.
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3774 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-13 08:29:29 +00:00
martin 615b181471 Revert [3752]
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3773 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-12 09:26:05 +00:00
martin ea37069272 Merged r3749:3758 from trunk
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3759 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-05 20:10:07 +00:00
martin 91815f380a PC/SC: better separation between OpenSC and PC/SC types.
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3758 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-05 19:59:05 +00:00
martin 64916e01b5 Accidental sc_error removed.
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3756 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 17:04:32 +00:00
martin 9c7eb8122a Add support for Portugese eID on IAS and Gemsafe cards, by João Poupino.
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3755 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 14:41:14 +00:00
martin a8dc97e0dc Cardos security env patch for Italian CNI card.
By Emanuele Pucciarelli, http://itacns.corp.it/hg/itacns/file/adc0b2ceec86/patches/115-cardos-secenv.patch


git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3754 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 10:13:45 +00:00
martin 99e84ae82a Fix spelling
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3753 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 10:07:55 +00:00
martin ab2ed07b78 Fix APDU sanity check.
By Emanuele Pucciarelli,  http://itacns.corp.it/hg/itacns/file/adc0b2ceec86/patches/010-apdu.patch


git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3752 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 10:06:53 +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 9da39d8462 Merged r3719:3749 from trunk
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3750 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-03 07:48:28 +00:00
martin 9a95a40e81 Implement pinpad support as used by Portugal eID, by João Poupino
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3744 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-25 19:29:38 +00:00
martin 6fd2220311 Bump the version number
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3742 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-20 10:57:11 +00:00
martin 75cee4ff8e PC/SC: Fix display detection and clean up
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3738 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-15 12:33:35 +00:00
martin e350239b37 Fix debug file closing.
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3737 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-15 12:29:17 +00:00
martin 46a4b5b70e EstEID: Fix compiler warnings, add support for PIN retries related PKCS#11 token flags, add a version number for debugging.
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3736 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-15 07:59:20 +00:00
martin b6f9345ea1 Improve EMV and default driver
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3735 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-15 07:51:50 +00:00
martin 0f4092f12d Fix "log.h:64:4: warning: backslash and newline separated by space"
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3734 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-15 07:50:46 +00:00
martin 6155ae366a Add back needed debug level check. Thanks to Aleksey Samsonov
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3733 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 12:04:24 +00:00
martin 831d1a539e PKCS#11: Fix a crash in C_GetMechanismList if pulCount is NULL
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3732 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 10:12:24 +00:00
martin a614dff522 PKCS#11: Implement more token flags that describe available PIN retries.
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3731 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 10:05:40 +00:00
martin f6d4da7919 PC/SC: Improve core and pinpad code
* Make opensc-tool -l display pinpad capabilities, if available
 * Detect reader capabilities when a reader is found, not when a connection to a card is opened
 * Fix unpadded PIN block parameters to not be rejected by the latest free CCID driver
 * When locking the card and it has been reset by some other application (or re-attached), clear cache and lock again
 * Enable pinpad detection by default


git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3730 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 09:48:56 +00:00
martin a64cdc1d8e sc_error removal missing bits
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3729 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 09:35:15 +00:00
martin 7df1c600f1 Remove empty files: emv.c, emv.h
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3728 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 09:15:58 +00:00
martin 1aed8cdec4 PKCS#15-emu: remove dead code
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3727 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 09:08:16 +00:00
martin cd5aff8ea0 PC/SC: More return codes are handled.
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3726 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 09:03:33 +00:00
martin 446fe0f18d PKCS#11: Spec does not allow CKR_DEVICE_ERROR from C_Initialize
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3725 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 08:59:58 +00:00
martin 847e0ade96 PKCS#11: translate SC_ERROR_CARD_UNRESPONSIVE
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3724 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 08:56:39 +00:00
martin 17593afa60 Fix iconv handle leak
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3723 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 08:53:38 +00:00
martin 6a48771ce1 Implement CKA_ALWAYS_AUTHENTICATE
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3722 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 08:51:53 +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
martin d3201511c7 r3717:3719 from trunk
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3720 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-12 11:46:00 +00:00
martin 89e18e51dd Branch for next major release changes.
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3717 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-06 15:56:08 +00:00
aj 886fa8931f trunk is now post release.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3716 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-29 07:03:59 +00:00
aj a495162259 Prepare for new release
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3714 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-29 07:02:37 +00:00
aj 5f185e3079 Weitao Sun: no one can create more than 15 files
under 5015 df. I increase it from 15 to 48, and all are OK.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3713 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-23 08:56:41 +00:00
aj 61b8f0a35d Latest version from scute svn with this change:
Stef Walter: Make all constants UL that should be.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3712 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-23 08:30:43 +00:00
aj 0c2fe83c3b Aktiv Co./Aleksey Samsonov:
fix a bug in rutoken driver.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3711 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-22 12:24:33 +00:00
aj 16f045bf0c Douglas E. Engert: major update for the PIV smartcard.
The major issue is with getting the length of an object or the cert
contained in an object. The PIV card does not have a directory on the card,
So the previous version tried to put off as long as possible the reading
of objects for performance so as to avoid having to read objects that would
not be used. The first standard, NIST 800-73, set maximum sizes for objects.
800-73-2 removed this for certificates.

A certificate object can contain a certificate which might be compressed.
The only way to get the length of the compressed certificate is to decompress
it. Thus the decompressed certificate could be larger then the container object,
so even if the PIV card had a directory, one would still need to decompress
the certificate to find its length.

OpenSC sc_read_binary will use the length obtained by using
sc_select_file(...,&file_out), and thus the lengths must be determined
in sc_select_file.

Change are to card-piv.c and pkcs15-piv.c and include:
  * The old cache code which was not working was removed.
  * New cache code was added which caches all object read from the card
  * If an object has a cert, the cert is decompressed and also cached.
  * As part of reading an object the first 8 bytes are read
    and this is then used to allocate a large buffer to read in the
    object.
  * If pkcs15 or pkcs11 asks about a certificate, the cert object
    will be read, and the cert decompressed, to get the actual length.
  * If piv_select_file is called with the file_out != NULL the object
    will be read to get the length If called with NULL it will not be read.
  * The enumeration of the objects now starts with 0.
  * sc_ctx_suppress_errors_on and off are used to avoid file not found
    messages which are are a by product of not having a directory.
  * "Unsigned Card Holder Unique Identifier" object in card-piv and pkcs15-piv.c
     had conflicting paths, as NIST 800-72-1 had two tables with different
     paths. The enumtag for it in card-piv.c was also wrong.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3710 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-22 10:09:21 +00:00
aj d9cd831b4f Douglas E. Engert: The pkcs15-gemsafeV1.c does not detect of the
card present is in fact a gemsafeV1 card, and thus it can end up
issuing commands to the wrong cards.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3709 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-22 10:06:32 +00:00
jps 8529b7ba3e Add support for JCOP31 v2.4.1 with the modified muscle applet[1].
This add support for 2048bit key and extended APDU.

[1] http://www.opensc-project.org/pipermail/opensc-user/2009-June/003147.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3708 c6295689-39f2-0310-b995-f0e70906c6a9
2009-07-02 13:59:38 +00:00
aj e8b1f540bd Kalev Lember: fix onepin-opensc-pkcs11.dll manifest embedding
with Microsoft compilers.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3707 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 10:08:17 +00:00
aj a3b0d6ae84 Aktiv Co. / Aleksey Samsonov:
use generic code instead of identical funciton
(now that the generic code was fixed).


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3706 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:26:55 +00:00
aj a2032f5e83 Aktiv Co. / Aleksey Samsonov:
use generic set_security_env code, remove duplicate code.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3705 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:25:47 +00:00
aj 3cf4707b1a Aktiv Co. / Aleksey Samsonov:
Remove dead code.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3704 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:23:16 +00:00
aj 2a0b63e0ad Aktiv Co. / Aleksey Samsonov:
Add assert() calls to check constant buffer size.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3703 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:22:24 +00:00
aj 25ab286fed Aktiv Co. / Aleksey Samsonov:
Check buffer length (*outlen)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3702 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:20:37 +00:00