Commit Graph

2625 Commits

Author SHA1 Message Date
Frank Morgner fb9dfc5b71 fixed warnings about possible data loss 2015-09-14 10:52:31 +02:00
Nguyễn Hồng Quân 76b6b483c7 Merge branch 'master' into gnuk 2015-09-13 22:09:59 +08:00
Frank Morgner a906c6d7b8 Merge pull request #530 from NWilson/yubikey-neo-pin
Yubikey NEO pin functions support
2015-09-12 18:51:10 +02:00
Frank Morgner 5944915e0e Merge pull request #549 from frankmorgner/547
fixed bad string comparison
2015-09-11 12:47:04 +02:00
Frank Morgner 0f2b9a4a4e Merge pull request #543 from frankmorgner/appveyor
Use AppVeyor as good as we can
2015-09-10 16:40:58 +02:00
Frank Morgner 819a6686c9 use _WIN32 instead of WIN32 2015-09-10 15:23:18 +02:00
Frank Morgner 17c0ffc17e Merge pull request #520 from frankmorgner/vendor-product
added call back for getting vendor/product id
2015-09-10 09:41:07 +02:00
Frank Morgner 6e3f94b3c9 fixed bad string comparison
fixes #547
2015-09-10 08:31:30 +02:00
Andreas Schwier 72e25db360 sc-hsm: Add status info support for SmartCard-HSM V2.0 2015-09-03 21:49:24 +02:00
Frank Morgner b2508b6c59 removed workaround for HP USB Smart Card Keyboard
Has been fixed by the CCID driver
https://lists.alioth.debian.org/pipermail/pcsclite-cvs-commit/2011-March/005218.html
2015-09-02 10:49:12 +02:00
Frank Morgner cf2a9cbbb0 added call back for getting vendor/product id
implementation taken from
83142d4cae
2015-09-02 10:47:29 +02:00
Frank Morgner 29b85b43c0 Merge pull request #483 from adminmt/master
Update ATR and ATR mask for MaskTech smartcards
2015-09-02 10:41:06 +02:00
Andreas Kemnade c9efb2f643 make file cache dir configurable
in cases where you use pam_pkcs11, HOME might not be set
so paths based on $HOME are not usable, so that the combination
of home and caching does not work. Having the paths configurable
(together with a good setting of access rights)
resolves that problem.
2015-09-02 10:34:35 +02:00
Nguyễn Hồng Quân a64bbc55aa [OpenPGP] Fix building without OpenSSL. 2015-08-31 22:24:16 +08:00
Nguyễn Hồng Quân 70890a8f61 Merge branch 'master' into gnuk
Conflicts:
	src/libopensc/card-openpgp.c
	src/tools/openpgp-tool.c
2015-08-31 21:55:14 +08:00
Frank Morgner fc02cb1093 added documentation for sc_get_max_recv/send_size 2015-08-26 22:02:35 +02:00
Frank Morgner 2d9802308f reactivate handling of `0` for max_recv/send_size
The special value still needs to be handled for commands that are issued
during card initialization. This especially concerns T=0 cards that need
to use iso_get_response.

fixes #533
regression of 85b79a3332
2015-08-26 02:55:35 +02:00
Nicholas Wilson 2897e6fb5c Leniently interpret the ISO7816 return codes in card-piv.c
This adds support for the Yubikey NEO. I'm not sure whether it breaks
the specification, or follows some other version of the spec, but in my
testing it returns SW1=0x63, SW2=0x0N for N PIN tries remaining.
Ignoring the top nibble seems a harmless change to the behaviour to
support this device.
2015-08-25 15:53:32 +01:00
Nicholas Wilson 5a11d0e2fd Add support for C_GetTokenInfo pin status flags for ISO7816 cards
This is already supported for a couple of the card drivers, but
since it's a general feature of ISO7816 it should go in iso7816.c,
rather than the current situation where identical code for this is
copy and pasted in each driver.

However, some cards apparently don't support this feature and count
it as a failed PIN attempt, so I've added a flag for now to indicate
whether the card supports this feature. It future, it could be moved
to blacklist cards rather than whitelist them, subject to more testing.
2015-08-25 15:53:27 +01:00
adminmt 56c376489f ATR update card-masktech.c, customactions.cpp
changed atqb + mask of MaskTech smart card (a) and (c)
removed MaskTech smart card (d)
added atr mask to MaskTech smart card (a) and (b)
2015-08-24 12:51:54 +02:00
Viktor Tarasov ff2d88a724 libopensc: uncomplete changes in c48afdbf breaks windows builds 2015-08-16 20:18:29 +02:00
Frank Morgner 2e21163273 cardos: probe for transceive length 2015-08-11 23:08:41 +02:00
Frank Morgner 85b79a3332 don't always overwrite max_send_size/max_recv_size
If the reader announces extended length support, but the card driver
leaves max_send_size/max_recv_size at `0`, max_send_size/max_recv_size
previously would have been overwritten with the reader's size though the
card might not have set SC_CARD_CAP_APDU_EXT. This commit fixes this
behavior.

Additionally card->max_send_size/max_recv_size is always initialized to
a value different from 0 after the card initialization. This removes the
need to check for this special value in all subsequent calls.
2015-08-11 23:08:41 +02:00
Nguyễn Hồng Quân 6409202c2f [OpenPGP] Fix warnings about type conversion. 2015-08-08 14:17:12 +08:00
Andreas Schwier d6774aae40 Fixed wrong APDU case declaration detected after PR #500 2015-08-04 17:51:46 +02:00
Frank Morgner 5e352ea477 Merge pull request #504 from frankmorgner/find_tags
Find tags with GET DATA
2015-08-04 10:32:23 +02:00
Frank Morgner d7d64ee8d4 Merge pull request #494 from frankmorgner/fork
After a fork do not release resources shared with parent
2015-08-04 10:32:01 +02:00
Frank Morgner e95707362f Merge pull request #357 from fancycode/startcos34_dtrust
Added initial support for STARCOS 3.4 (German D-Trust cards).
2015-07-31 15:40:30 +02:00
Frank Morgner c48afdbfcb Merge pull request #500 from frankmorgner/reader_max_data_size
honour PC/SC pt 10 dwMaxAPDUDataSize
2015-07-31 15:35:32 +02:00
Frank Morgner 6bedd70ea3 Merge pull request #499 from frankmorgner/asn1
asn1: fixed parsing "end of content"
2015-07-31 15:35:19 +02:00
Martin Paljak c6c8c6cdb0 Fix dead code:
../../src/libopensc/errors.h:73:37: warning: statement with no effect [-Wunused-value]
 #define SC_ERROR_INVALID_ARGUMENTS  -1300
                                     ^
card-masktech.c:181:48: note: in expansion of macro 'SC_ERROR_INVALID_ARGUMENTS'
  if (crgram_len > SC_MAX_EXT_APDU_BUFFER_SIZE) SC_ERROR_INVALID_ARGUMENTS;
2015-07-30 10:12:04 +03:00
Frank Morgner f71ef838e9 implemented get_data for iso7816
mostly copied over from CardOS implementation
2015-07-30 08:18:07 +02:00
Frank Morgner c92e3b4f98 honour PC/SC pt 10 dwMaxAPDUDataSize
closes #306
2015-07-28 09:49:44 +02:00
Frank Morgner b44c98e4d8 asn1: fixed parsing "end of content"
fixes #190
2015-07-28 09:10:54 +02:00
Frank Morgner ee68165b1d Merge pull request #474 from germanblanco/memory_allocation_5
Fixing part of the memory allocation problems in DNIe module. Issue #472
2015-07-23 13:10:14 +02:00
Frank Morgner 142323af10 Merge pull request #476 from germanblanco/dnie_ui_depends_on_ssl
Empty user-interface.c if there is no SSL support. Related with issue #362
2015-07-23 13:08:46 +02:00
Frank Morgner 7cec500e54 added flags to sc_context_t
- is initialized in sc_context_create with parm->flags
- removes members paranoid_memory and enable_default_driver
2015-07-22 17:30:21 +02:00
Frank Morgner edc839e072 restrict access to card handles after fork
fixes #333
closes #493
2015-07-22 16:46:04 +02:00
German Blanco 317cc302db making the size of e_tx in cwa-dnie.c dynamic 2015-07-10 12:38:22 +02:00
Nguyễn Hồng Quân d0e3d1be3d Fix tab & spaces 2015-07-04 00:21:38 +08:00
Hubitronic 5898eab373 Update card-muscle.c
re-enable opensc.conf flexibility again
2015-06-18 16:28:11 +02:00
German Blanco 030f4d1559 Empty user-interface.c if there is no SSL support. 2015-06-01 08:21:25 +02:00
German Blanco 0d14f3ffee Correct initializing of a variable in card-dnie and revert buffer size change in cwa-dnie. 2015-06-01 07:46:59 +02:00
German Blanco 76517b7d43 Fixing part of the memory allocation problems in DNIe module. 2015-05-26 21:44:13 +02:00
vletoux 01b395e636 card-masktech.c: add 2 more ATR
Fixes #465
2015-05-16 12:09:08 +02:00
drew thomas 5be35fb3f4 muscle: change TyfoneAT historical bytes to 'Tyfone 242R2'
Fixes #467
2015-05-16 11:59:58 +02:00
Andreas Kemnade a09ca246a7 libopensc: initialize value returned by sc_select_file
several places in the code expect sc_select_file to set *file_out to NULL
in case of failure. Adjust the function to behave like this.

Fixes #460
2015-05-13 10:19:38 +02:00
vletoux 492ffe0fd7 iso7816.c: allow file length stored in more than 2 bytes
as indicated in iso7816-4 chapter 7.4.3 table 10

Fixes #459
2015-05-13 10:01:29 +02:00
drew thomas 8b62221abc muscle: add ATR of Tyfone mSD card
Add Tyfone Connected Smart Card ATR to list for MUSCLE support.

SC_CARD_TYPE_MUSCLE_JCOP242_NO_APDU_EXT

Fixes #463
2015-05-13 09:50:21 +02:00
Doug Engert c7af08c68a PIV - read just length of object to get size
card-piv.c tries to read the first 8 bytes of an object to get object size
so it can allocate a buffer. It then reads the whole object. apdu.c has changed
over the years, and apdu.c will keep reading as long as the card returns
status of 61 XX  thus apdu.c will read the whole object while discarding
the extra data and returning to the caller only the first part of the data.
This in effect causes a double read of objects.

This patch sets SC_APDU_FLAGS_NO_GET_RESP to tell apdu to stop doing the
extra get-response commands thus avoiding most of the extra overhead.

This in not an optimal patch as it only works with T=1 cards/readers
but the patch is confined to just card-piv.c.
A better patch is in the works.

Fixes #462
2015-05-13 09:24:46 +02:00