Commit Graph

24 Commits

Author SHA1 Message Date
Maciej S. Szmigiero 62cbda6cd9 Fix log messages format and parameter issues flagged by GCC
Since "Add GCC format checking attributes to log functions" commit GCC
warns us about problems with format strings and their arguments provided
to OpenSC message logging functions.

This commit fixes all cases where GCC warned about incorrect format on
64-bit Linux, 32-bit and 64-bit mingw builds (with SM and OpenSSL enabled).
Well, almost all since on mingw GCC does not recognize "ll" size specifier
(present at least since Visual Studio 2005, also in mingw own CRT) so these
(few) warnings about it remain.

In most cases format size specifier for size_t type was missing (usually
size was left at default int level, with is different on 64-bit x86).
Some formats had too few / too many arguments.
In some cases pointers were printed as integers.
Some long variables were missing "l" prefix (especially with regard to %x
format).

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2017-03-27 11:05:16 +02:00
konstantinpersidskiy a0870826a2 card-rtecp: Fix rtecp_change_reference_data (#958)
* card-rtecp: Fix rtecp_change_reference_data (resolves #931)

* Replace filthy comment, move assert

* card-rtecp: Fix rtecp_change_reference_data (resolves #931)
2017-02-20 21:36:55 +01:00
Frank Morgner bcb5fc15e5 honour HAVE_CONFIG_H 2015-04-22 23:55:33 +02:00
vtarasov 438cf4b2d4 RuToken-ECP: profile option to allow the reset of User PIN with SoPIN
http://www.opensc-project.org/pipermail/opensc-devel/2011-May/016716.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5542 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-02 19:06:43 +00:00
andre 661cc0dd47 libopensc: Remove the somewhat mysterious flag SC_CARD_CAP_NO_FCI.
It's solely purpose was to get opensc-explorer to work with card-belpic (r2118, r2119).

Relates to #296.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5507 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-27 12:33:52 +00:00
vtarasov d2cc8f1364 ruToken-ECP: error in revert 'compute-signature' result procedure ...
'comute-signature' can be called with length of output data greater then signature size


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5456 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-19 17:00:29 +00:00
vtarasov 30eb1e9897 ruToken-ECP: in compute-signature procedure limit Le to 256 bytes ...
so that the APDU can pass the validity check


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5455 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-19 08:48:57 +00:00
andre b21eeb46b9 libopensc: Removes unused flag SC_CARD_CAP_RSA_2048.
Relates to [http://www.opensc-project.org/opensc/ticket/296#comment:1 #296].

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5308 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-07 18:16:40 +00:00
vtarasov 39f3c2b7c6 rtecp: in non-extended APDUs the 'Le' value cannot be more then 256 bytes ...
after r5186 the SC_MAX_APDU_BUFFER_SIZE has been increased
and so existing defintion of Le value became invalid.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5233 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-14 18:19:07 +00:00
martin d1d64f9dfe AktivRutokenECP: make opensc-tool -n show the actual token name, based on ATR
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5014 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 12:54:44 +00:00
s ed589feda7 add ATR for Rutoken ECP (DS)
Thanks to Aktiv Co. Kirill Mescheryakov for the patch.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4654 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-25 19:24:23 +00:00
aj 6545b42c02 cleanup of the debug code:
* reduce to a few, supported functions.
* change all functions to take the debug level as parameter.
* use symbolic names for the debug levels.
* fix tools to pass "verbose"/"opt_debug" as ctx->debug.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4118 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-15 12:17:13 +00:00
aj d22a2483c0 Header file cleanup.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4081 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-04 08:14:36 +00:00
s b372290e72 correct SEC_ATTR_SIZE name (add prefix)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3863 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-23 11:41:23 +00:00
s 7cbe5e5470 use generic iso7816_select_file code, remove duplicate code
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3861 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-20 13:15:00 +00:00
s 052775325a remove dead code (in compliance with http://www.opensc-project.org/opensc/changeset/3839#file8)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3860 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-20 12:26:04 +00:00
s 5320ca6fd1 Corrected GOSTR3410 public key structure
Working now with GOST R 34.10:
$ pkcs15-init --store-private-key key --key-usage sign,decrypt --auth-id 2 --id 1 --pin "12345678"
$ pkcs15-init --store-certificate my_cert --id 1 --pin "12345678"

But have problem: no CKA_GOSTR3410_PARAMS by retrieve pub_key from certificate, if pub_key object was removed (see parse_x509_cert, asn1_decode_gostr3410_params)


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3859 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-19 15:41:03 +00:00
martin 38ba3ad18d Remove card->finish() functions that do nothing
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3839 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 11:32:12 +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 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 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
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 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