Commit Graph

5309 Commits

Author SHA1 Message Date
Viktor Tarasov 80788dfcb2 fix LGPL version
f5814595db (commitcomment-3971686)
2013-09-29 20:55:41 +02:00
Viktor Tarasov f641ebd248 fixed errors reported by cppcheck: part 1
partially applied the pull request #182 from Frank Morgner -- updated the common frameworks source files
2013-09-29 20:28:45 +02:00
Tim Taylor 2dee7baae0 Extract public key from cert if no object on card 2013-09-29 19:32:25 +02:00
Frank Morgner a635d44336 fixed initialization of structure 2013-09-29 19:19:17 +02:00
Frank Morgner 7a87d947e7 don't require ushort to be present 2013-09-29 19:19:17 +02:00
Frank Morgner d5e86752de added getpass implementation for non windows
modifies terminal attributes to emulate _getch
2013-09-29 19:19:17 +02:00
Tim Taylor 2741f23641 Set output buffer len variable if padding removed. 2013-09-29 19:14:01 +02:00
Tim Taylor cd1116ac7c Use reader pin pad if available and allowed 2013-09-29 19:08:51 +02:00
Frank Morgner 6e728a89ee verifying the pin is a valid action 2013-09-29 18:53:04 +02:00
Frank Morgner 3d0064e983 don't expect the card to specify the file length in generic tools
if sc_file_t.size == 0 we try to read 1024 bytes by default.
2013-09-29 18:52:48 +02:00
Frank Morgner c023d20e14 removed unused reference to sm_iasecc_rsa_generate 2013-09-29 18:52:38 +02:00
Tim Taylor b731dac518 Reset return code to success if pubkey read from cert. 2013-09-29 18:31:33 +02:00
Ludovic Rousseau 3afe644c0d Fix integration problem with DNIe
card-dnie.c:1481:2: error: too few arguments to function `sc_pkcs1_strip_01_padding'

The prototype of sc_pkcs1_strip_01_padding() changed between the patch
submission and its integration.
2013-08-27 10:58:20 +02:00
Ludovic Rousseau 02727a1406 Merge pull request #168 from germanblanco/opendnie
Adding support for DNIe.
2013-08-27 01:52:55 -07:00
Charles Bancroft 865900e210 Updated load_cert to use the proper key identifier 2013-08-10 22:30:59 +02:00
Viktor Tarasov 12e0ac1aa6 minidriver: add registers file for feitian cards 2013-08-10 22:25:30 +02:00
Viktor Tarasov f5814595db packaging: debian packaging templates 2013-08-07 10:34:13 +02:00
Viktor Tarasov bdd264936c pkcs15: add 'context' parameter to the strip padding procedures
and add debug messages
2013-08-03 21:53:01 +02:00
Viktor Tarasov daa79054c0 CardOS: more debug messages in 'pin-cmd' handler 2013-08-03 21:46:44 +02:00
Frank Morgner d21830344f fixed a ton of compiler warnings 2013-08-03 19:15:55 +02:00
Frank Morgner 07818329ab made sc_apdu_t.data 'const' (which it used to be)
fixes a lot of warnings which pass a const buffer to the APDU's data

Note that a non-const data member is only required for sc_allocate_apdu
sc_free_apdu. They are currently used with an explicit typecast.
However, sc_allocate_apdu and sc_free_apdu both are not used once in the
entire project. One might also simply throw both functions away.
-- Both are thrown away. (VT)
2013-08-03 18:26:04 +02:00
Viktor Tarasov 2c019485e8 Merge branch 'master' of github.com:szikora/OpenSC 2013-08-03 17:56:45 +02:00
Viktor Tarasov 1a972920f0 By default 'default' card driver is disabled ...
'Default' card driver is explicitely enabled for 'opensc-explorer' and 'opensc-tool' tools.
https://github.com/OpenSC/OpenSC/pull/175
2013-08-02 22:01:51 +02:00
Jean-Pierre Szikora de4dd056bf Onepin profile stopped to work after commit 10e1ad001d
Cards formatted with one-pin profile can not be used (for modification
of the data on the card with pkcs15-init -X for example) after this
commit, which prevent the reading of 5015/4946 (containing the
profile).

The part of the code was simply commented out without comment.
Maybe it was used for testing purposes, and not removed for
the commit ?
2013-08-02 16:06:52 +02:00
Frank Morgner e3649fb7de fixed even more compiler warnings 2013-08-02 15:43:25 +02:00
Frank Morgner f597a7e50a enable compiler warnings by default 2013-08-02 15:21:17 +02:00
Frank Morgner a7564d6f1e Use C99 flexible array member
The structures PIN_MODIFY_STRUCTURE and PIN_VERIFY_STRUCTURE now use a
C99 flexible array member when available for abData field.

uint8_t abData[];

See http://lists.alioth.debian.org/pipermail/pcsclite-cvs-commit/2013-May/006191.html
2013-08-02 15:18:07 +02:00
Frank Morgner 32c470469d use enough memory for pin verification/modification structure 2013-08-02 15:00:09 +02:00
Viktor Tarasov 407ffa3388 libopensc: for hex dump in debug messages ...
use dedicated log procedure that uses a static dump buffer

inspired by pull request #164 of Frank Morgner
https://github.com/OpenSC/OpenSC/pull/164
2013-08-02 14:21:02 +02:00
Viktor Tarasov c4c189fec3 make: change make order of SM components
to respect dependencies
2013-08-02 12:29:55 +02:00
Viktor Tarasov f053070e14 libopensc: assertion fails on calling fclose() on a NULL filehandle
From @geoffbeier:
(https://github.com/OpenSC/OpenSC/pull/171#issuecomment-20407132)

So it sounds like the right fix is to:

 * check the return value of sc_ctx_log_to_file() and have sc_do_log_va()
   return if it's anything other than SC_SUCCESS.
 * Inside sc_ctx_log_to_file() make sure to set ctx->debug_file to NULL
   whenever it does call fclose() on it.
 * Inside sc_do_log_va() where it currently calls fclose() check
   if(ctx->debug_file && ctx->debug_file != stdout &&ctx->debug_file != stderr)
2013-08-02 12:22:42 +02:00
Frank Morgner 3567660a1c reader-pcsc.c: fixed implicit pin modification
Allows the application to only initialize pin2 for implicit pin
modification and to leave pin1 untouched.
2013-08-02 11:41:30 +02:00
Frank Morgner eb281b1ada reader-pcsc.c: fixed pin checking when implicitly given 2013-08-02 11:41:29 +02:00
Frank Morgner ff637bd02a initialize sm_ctx with 0s for iso7816 driver 2013-08-02 11:41:29 +02:00
Frank Morgner 6707f92b38 fixed PACE reader capability flag 2013-08-02 11:41:29 +02:00
Jean-Pierre Szikora b1a2c26235 Onepin profile stopped to work after commit 10e1ad001d
Cards formatted with one-pin profile can not be used (for modification
of the data on the card with pkcs15-init -X for example) after this
commit, which prevent the reading of 5015/4946 (containing the
profile).

The part of the code was simply commented out without comment.
Maybe it was used for testing purposes, and not removed for
the commit ?
2013-07-29 11:53:18 +02:00
JP Szikora 3f8f6facf5 Merge branch 'master' of https://github.com/OpenSC/OpenSC 2013-07-29 11:37:03 +02:00
entersafe c02f30a2da Fix a bug when writing public key 2013-07-29 10:13:39 +02:00
German Blanco 140ec71d73 Formatting with spaces and returns in hex dump. 2013-07-28 23:49:41 +02:00
Frank Morgner 1a65ed1ecf use _setmode instead of _set_fmode in windows
now compiles with MinGW-w64
2013-07-10 17:05:17 +02:00
Frank Morgner 9a05414f9a let OpenSC compile without OpenSSL and without SM 2013-07-10 16:22:33 +02:00
Jean-Pierre Szikora ad91449c87 Gives the "Current Maximum Data Field Length" for CardOS card in cardos-tool -i. 2013-06-21 10:46:35 +02:00
Jean-Pierre Szikora ac96e73c8c Merge remote branch 'upstream/master' into cardos5 2013-06-21 10:35:21 +02:00
German Blanco 63ce563d76 Adding support for DNIe. 2013-06-13 17:31:56 +02:00
Andreas Schwier 962cba98db sc-hsm: Fixed bug when changing SO-PIN with opensc-explorer
sc-hsm-tool: Fixed some warnings
2013-06-11 16:55:47 +02:00
Andreas Schwier ae1b96e5b2 sc-hsm-tool: Fixed a crash on Windows when --wrap-key frees memory allocated in opensc.dll 2013-06-11 16:55:47 +02:00
Viktor Tarasov e1da77e253 md: fix length of stripped data in RSADecrypt 2013-05-27 16:25:25 +02:00
viktorTarasov 584e47a9b8 Merge pull request #158 from cbancroft/fix-piv-tool-gen_key
Fixed gen_key to expect the proper PIV Key references.
2013-05-14 00:22:22 -07:00
Martin Paljak f6b0e893b9 card-ias: fix code style to be MS C89 compliant. 2013-05-11 18:39:55 +03:00
Martin Paljak 1b265690e8 Merge pull request #156 from poupas/master
Fixes for the PTEID card
2013-05-11 08:39:26 -07:00