Commit Graph

1533 Commits

Author SHA1 Message Date
martin 17b7e1b041 Remove unused variables
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3828 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 11:12:43 +00:00
martin 1a6f8b7468 Remove unused variables
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3827 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 11:12:14 +00:00
martin 684e9b20ba Convert newlines to unix style, remove compiler warnings.
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3826 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 11:10:44 +00:00
martin 3ea5bb7987 Merge [3804:3822/trunk]
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3824 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 09:45:21 +00:00
martin 36f26b6357 Do not duplicate reader name in private structure.
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3812 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-10 10:05:51 +00:00
martin 450e1fc5ae Merge [3794:3803/trunk]
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3804 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-05 18:27:56 +00:00
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 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 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 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 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
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 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
aj 7d282a9e0e Aktiv Co. / Aleksey Samsonov:
Fix for the case when "apdu.resplen < 2" and checked buffer length.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3701 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:19:38 +00:00
aj 265eb5923b Aktiv Co. / Aleksey Samsonov: fix case depending on length.
also no need to null resplen or le (done by sc_format_apdu).


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3700 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:17:19 +00:00
aj be526c840f Move emv driver to the end.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3699 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-28 07:11:16 +00:00
ludovic.rousseau c44b7cbbeb iso7816_set_security_env(): correctly set P1 parameter in case of
SC_SEC_OPERATION_DECIPHER

Thanks to Aleksey Samsonov for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-June/012263.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3698 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-25 08:45:05 +00:00
aj 7931ded481 Add new rutoken_ecp driver by Aktiv Co. / Aleksey Samsonov
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3696 c6295689-39f2-0310-b995-f0e70906c6a9
2009-06-24 15:26:37 +00:00
ludovic.rousseau dab3723c95 sc_pkcs15emu_add_object(): fix a memory leak. thanks to cppcheck(1)
[pkcs15-gemsafeV1.c:419]: (error) Memory leak: obj


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3693 c6295689-39f2-0310-b995-f0e70906c6a9
2009-05-12 14:29:30 +00:00
ludovic.rousseau bb900ff9b8 do not cast calloc() return value
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3692 c6295689-39f2-0310-b995-f0e70906c6a9
2009-05-12 14:27:39 +00:00
martin 09a442adb4 Fix SCardDisconnect reset parameter.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3683 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-17 07:19:03 +00:00
martin 07fce14a6b Move sc_check_sw to opensc.h
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3682 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-15 07:52:04 +00:00
martin 86b4d65c4c Export sc_check_sw, required by external drivers and utilities.
Thanks to Marc Rios Vallès.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3681 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-15 06:18:49 +00:00
martin 6041595895 * Correctly set offsets for PINs for PIN modification operations with pinpads. Thanks to Robert Konklewski.
* Only set messages if the reader has display capabilities.
 * Detect rejected pinpad commands
 * Whitespace fixes


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3679 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-08 10:31:18 +00:00
alonbl bfc69348f7 Actually print SCardControl result, thanks to martin
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3677 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-03 19:54:42 +00:00
alonbl ef4b1e1410 reader-pcsc - minor cleanups in reader features
1. Indent fix.
2. Reorder conditions.
3. Do not print error if SCardControl fails.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3676 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-03 19:17:15 +00:00
aj 4670238556 Entersafe changes by Weitao Sun:
1.Card type FTCOS/PK-01C added. (new)
2.Limit pin length in range [4,16). (bug fix)
3.Can not unblock PIN. (bug fix)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3674 c6295689-39f2-0310-b995-f0e70906c6a9
2009-04-02 10:32:02 +00:00
ludovic.rousseau 117d790aea Do not use msc_crypt_process (OP_PROCESS). This operation is used to do
multipart encryption when, for example, the data is too big to fit in
one APDU. It basically calls the Cipher.update() method until all data
has been processed. However, the Java Card API documentation advises
against using update():

"This method requires temporary storage of intermediate results. In
addition, if the input data length is not block aligned (multiple of
block size) then additional internal storage may be allocated at this
time to store a partial input data block. This may result in additional
resource consumption and/or slow performance.  This method should only
be used if all the input data required for the cipher is not available
in one byte array. If all the input data required for the cipher is
located in a single byte array, use of the doFinal() method to process
all of the input data is recommended."

As the card's JVM was returning an internal exception when using
OP_PROCESS, it was decided to implement an msc_crypt_final_object()
function in OpenSC that uses the msc_object_*() functions to read/write
all the data from the card. This way, it is possible to transmit/receive
"arbitrarily" large data chunks to/from the card and use doFinal(). This
is the fallback method when, for example, using 2048 bit keys and the
card doesn't support extended APDUs.

Thanks to Joao Poupino for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011978.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3673 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-25 14:31:21 +00:00
ludovic.rousseau 7f0476ab2a pcsc_internal_transmit(): do not limit the size of the reception buffer
to 258. This check is no more needed now that pcsc-lite can handle
extended APDU.

Thanks to Joao Poupino for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011978.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3672 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-25 14:22:34 +00:00
ludovic.rousseau 04a5c99f77 Detect the eToken 72K and activate RSA 2048 and extended APDU for it.
Thanks to Joao Poupino for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011978.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3671 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-25 13:55:25 +00:00
ludovic.rousseau e0f3545157 Change MSC_MAX_APDU to make some buffers larger to support extended
APDUs. The change was only from 256 to 512 bytes since it is more than
enough for 2048 bit keys;

Thanks to Joao Poupino for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011978.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3670 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-25 13:50:41 +00:00
ludovic.rousseau 7b07db6b59 msc_get_challenge(): return SC_SUCCESS instead of dataLength in case of
success

Thanks to Joao Poupino for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011978.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3669 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-25 13:47:46 +00:00
ludovic.rousseau 89b2ac778f msc_get_challenge(): use 0x62 instead of 0x72 for GET CHALLENGE as it is
the value used by the Muscle applet (INS_GET_CHALLENGE)

Thanks to João Poupino for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011978.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3668 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-25 13:42:13 +00:00
martin 9862d431e8 Fix typo
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3667 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-21 11:17:14 +00:00
martin 9668f0aa33 Add support for LCD detection on pinpad devices.
* Update IOCTL definitions to PC/SC part 10 v2.02.05 
 * Return SC_SUCCESS instead of 0 if returning SC_ codes.
 * Detect the presence of a display with FEATURE_IFD_PIN_PROPERTIES

Tested with patched CCID driver on OS X, with SPR532 (no display) and OK3821 (with display)

Known CCID reader with a display:

ATMEL_AT91SO.txt:  wLcdLayout: 0x0210
CardMan3821.txt:  wLcdLayout: 0x0210
Kobil_EMV_CAP.txt:  wLcdLayout: 0x0210
Xiring_XI-SIGN.txt:  wLcdLayout: 0x020C
Xiring_XI-SIGN_6000.txt:  wLcdLayout: 0x020C




git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3666 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-21 11:09:12 +00:00
martin 3b0faecbb1 * Display the default CCID message for PIN verification if the reader has a display
* Part 10 -> PC/SC v2


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3665 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-19 17:54:45 +00:00
martin 464a4f6d74 Fix Global Platform PINs with CCID pinpads.
Thanks to François Leblanc for the report:
http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011947.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3664 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-18 10:18:18 +00:00
alonbl cd6adb4e26 Fix Windows PINPAD mingw issue
Thanks to François Leblanc

http://www.opensc-project.org/pipermail/opensc-devel/2009-March/011932.html



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3662 c6295689-39f2-0310-b995-f0e70906c6a9
2009-03-07 21:55:40 +00:00
martin 830ba34b67 Fix native windows build, add iconv support
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3643 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-29 11:47:45 +00:00
alonbl 93998e9561 Optionally load SCardControl132 on apple
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3642 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-28 12:43:30 +00:00
martin aadf4ad037 Fix pinpads on OS X
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3641 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-28 12:28:41 +00:00
alonbl 34a75de5d7 Rutoken updates
By Aktiv Co. Aleksey Samsonov

- use PKCS#15 (not builtin PKCS#15 emulator)
- rutoken.profile (add privdata)
- correct using ACL
- correct erase procedure



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3640 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-28 12:10:13 +00:00
alonbl e1d49190c1 Typo
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3638 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-23 09:27:30 +00:00
alonbl 98841d1e61 Finally remove eval stuff from autoconf
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3636 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-23 09:00:11 +00:00
alonbl a5f32a99db Move all private factories into private headers, the iso7816 factory is the only one which is actually exposed
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3634 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-21 13:19:18 +00:00
alonbl 74f6d41dc6 Add sc_get_iso7816_driver as it is required for external drivers
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3633 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-21 13:01:37 +00:00
alonbl 304f227d79 Add SCARD_E_NO_SERVICE to internal-winscard.h
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3632 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-20 08:45:12 +00:00
alonbl fbd51c705e Revert 3630
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3631 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-20 08:42:47 +00:00
alonbl ce5c5f3ae9 Add SCARD_E_NO_SERVICE to internal-winscard.h
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3630 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-19 19:43:19 +00:00
martin 4d5c61d90c Correct PC/SC -> OpenSC error code translation.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3626 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-19 11:57:20 +00:00
martin 5a7515cd7f Recognize SCARD_E_NO_SERIVCE:
{{{
$ /Library/OpenSC/bin/opensc-tool -a
[opensc-tool] reader-pcsc.c:881:pcsc_detect_readers: SCardEstablishContext failed: 0x8010001d
[opensc-tool] reader-pcsc.c:990:pcsc_detect_readers: returning with: Unknown error
No smart card readers found.
}}}


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3625 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-18 23:16:53 +00:00
alonbl c9c6f9f2b2 Correct iconv support
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3621 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-16 17:48:26 +00:00
martin c6f753dc00 Limit virtual OpenCT readers to a sane default of 2 readers/tokens by default.
Most users don't use more than one or two tokens concurrently. This way default configuration (or with no configuration file) works even after you insert a PC/SC reader as OpenCT does not "eat up" all PKCS#11 slots with 5 virtual readers.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3618 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-16 16:12:50 +00:00
martin 6ffec42055 Linux compatible PKCS#11-friendly changes to EstEID PKCS#15 emulation driver to display the name of the cardholder in token label field.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3616 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-15 23:20:48 +00:00
martin 315c0edc6e PC/SC readers have always only one slot per reader.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3615 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-15 21:40:44 +00:00
martin 2e2a998f10 Remove some unused/prehistoric defines.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3614 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-15 21:23:09 +00:00
martin 7e7b94d879 Fix PKCS#15 emulation handling:
* Work as expected without a configuration file
  * "Normalize" the configuration file: show the used default and give examples with opposite values.
 * DWIM:    
  * If there is no config file: try all builtin drivers
  * If there is a configuration file, allow to turn emulation off
  * If there is a configuration file, allow to filter the list of internal drivers                   
 * Introduce a PKCS#15 layer card flag for emulated cards



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3613 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-15 21:08:30 +00:00
martin c64fd881e9 Mac OS X 10.5.6 fixes the ATR padding bug.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3610 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-15 20:01:09 +00:00
alonbl 8828faeccf Allow delete data objects by specifying application-name and label
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3608 c6295689-39f2-0310-b995-f0e70906c6a9
2008-12-28 21:28:53 +00:00
ludovic.rousseau 6e56f8384a #include <wintypes.h> on __APPLE__ to define DWORD, LONG, etc. Windows types
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3603 c6295689-39f2-0310-b995-f0e70906c6a9
2008-12-11 09:18:09 +00:00
alonbl 5617c9d535 Fix bug #86, thanks to ville.skytta
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3601 c6295689-39f2-0310-b995-f0e70906c6a9
2008-12-06 18:49:58 +00:00
martin 1e41d4d267 * Fix issues with pkcs11-tool testing of C_GenerateRandom/C_SeedRandom and OpenSC PKCS#11 implementation of those functions.
Thanks goes to Rickard Bondesson who noticed the issues.

http://www.opensc-project.org/pipermail/opensc-devel/2008-November/011436.html



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3595 c6295689-39f2-0310-b995-f0e70906c6a9
2008-11-24 22:06:27 +00:00
martin 36112bf6e0 typos
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3594 c6295689-39f2-0310-b995-f0e70906c6a9
2008-11-24 21:55:28 +00:00
alonbl d7941bf850 Re-add pcsc-lite compile-time dependency
Win64 changed the SCARDCONTEXT from LONG to ULONG_PTR,
pcsc-lite did not follow this on 64bit platforms.
This breaks the pcsc module.

To solve this we use installed winscard.h in order to get proper
declerations.

As mingw32 does not have winscard.h we keep current types. mingw64 and
pcsc-lite system have winscard.h.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3590 c6295689-39f2-0310-b995-f0e70906c6a9
2008-10-27 19:16:28 +00:00
alonbl 4ad85b3d91 Add some more debug information to pcsc
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3589 c6295689-39f2-0310-b995-f0e70906c6a9
2008-10-26 19:13:14 +00:00
alonbl d771870d5c Resolve some conflict with win64
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3588 c6295689-39f2-0310-b995-f0e70906c6a9
2008-10-26 14:48:47 +00:00
ludovic.rousseau d2f428590b use 0x%08lx instead of 0x08%lx
Thanks to Alon Bar-Lev for the patch


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3587 c6295689-39f2-0310-b995-f0e70906c6a9
2008-10-20 15:04:29 +00:00
ludovic.rousseau 4a1e1192a6 display PC/SC error codes as 0x08%lx instead of %lx to make it explicit
they are hex values


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3586 c6295689-39f2-0310-b995-f0e70906c6a9
2008-10-20 07:46:24 +00:00
ludovic.rousseau b4c5c8d539 use SCARD_S_SUCCESS instead of 0
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3585 c6295689-39f2-0310-b995-f0e70906c6a9
2008-10-20 07:27:41 +00:00
alonbl ff4d6dd101 Fix for two apparent C code bugs
By Stanislav Brabec

entersafe_init_pin_info() was declared as int, but defined and used as
void, resulting in a function returning an unused pseudo-random value.

card-gemsafeV1.c uses comparison 'type == "DF"', which is always false,
as it compares pointer to a string with pointer to the string "DF" in
the code.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3563 c6295689-39f2-0310-b995-f0e70906c6a9
2008-09-10 12:44:40 +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 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 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
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
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 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 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
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
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 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 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 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 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 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 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 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 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 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 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 87db3c96c2 More separate srcdir fixups
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3450 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-01 19:04:33 +00:00
alonbl 39abe22798 More separate srcdir fixups
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3449 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-01 17:08:17 +00:00
ludovic.rousseau 7e30721378 use $(srcdir) when needed to be able to build in separate build
directories using: cd foobar ; ../configure srcdir=..

Thanks to Douglas E. Engert for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2008-March/010959.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3445 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-01 12:43:26 +00:00
ludovic.rousseau 9ffe2e159d use "pkcs15.h" instead of <opensc/pkcs15.h> (and similar)
Thanks to Douglas E. Engert for the patch
http://www.opensc-project.org/pipermail/opensc-devel/2008-March/010959.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3444 c6295689-39f2-0310-b995-f0e70906c6a9
2008-04-01 12:35:08 +00:00
alonbl 80a16f686d ruToken cleanups
Move constants out of standard files.
Create ruToken specific interface.
Update symbols.

Thread at:
http://www.opensc-project.org/pipermail/opensc-devel/2008-March/010917.html

Cleanup of:
http://www.opensc-project.org/pipermail/opensc-devel/2007-December/010617.html



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3439 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-26 06:24:37 +00:00
alonbl a88a543940 Fixup compile under cygwin
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3431 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-19 20:30:36 +00:00
ludovic.rousseau 8436f089c5 pkcs15-gemsafeV1.c:478: warning: 'sc_pkcs15emu_add_pubkey' defined but
not used


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3430 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-17 15:17:56 +00:00
ludovic.rousseau 4f53d06c17 change type from int to unsigned int to avoid 2 compiler warnings:
pkcs15-gemsafeV1.c:150: warning: comparison between signed and unsigned
pkcs15-gemsafeV1.c:331: warning: comparison between signed and unsigned


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3429 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-17 15:09:16 +00:00
ludovic.rousseau 2800607c4a rename index -> index_local to avoid a compiler warning
pkcs15-gemsafeV1.c:126: warning: declaration of 'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3428 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-17 15:09:16 +00:00
ludovic.rousseau 875d99e46a use sc_debug/sc_error instead of fprintf(stderr, ...)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3427 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-17 15:09:16 +00:00
ludovic.rousseau a05564447a add ATR for the GemSafeXpresso 16k R3.2
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3426 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-17 15:03:51 +00:00
alonbl f49f765ac6 Fix libtool versioning issues
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3421 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-15 11:05:26 +00:00
alonbl 8ac87f1b1e Remove useless comments
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3414 c6295689-39f2-0310-b995-f0e70906c6a9
2008-03-09 21:24:24 +00:00