Commit Graph

36 Commits

Author SHA1 Message Date
Anton Logachev 570fc56c47 Remove the SC_SEC_ENV_FILE_REF_PRESENT flag for Rutoken ECP cards
Rutoken ECP cards have no default SE file. Previous cards ignored
MSE with restoring default SE, but new cards don't. This requires
SC_SEC_ENV_FILE_REF_PRESENT to be removed from env flags.
2021-04-29 23:03:32 +02:00
Anton Logachev 03396707f0 card-rtecp: Add Rutoken ECP SC NFC ATR 2020-09-30 01:18:50 +02:00
Frank Morgner ba19a467e4
Rutoken Lite (#1728)
* card-rtecp: Add Rutoken Lite

* avoid seperate rutoken lite driver

* added rutoken lite to minidriver

closes #1722
2019-07-22 13:05:32 +02:00
Dmitriy Fortinskiy 3c1624676d card-rtecp,card-rutoken: Set specific card types 2019-07-02 12:13:57 +02:00
Dmitriy Fortinskiy 60a2cf16c7 card-rtecp: Fix list_files on T0 cards
Rutoken ECP SC over T0 expects Get Response after SW1=61 which
is not called with zero le.
2019-07-02 12:13:57 +02:00
Dmitriy Fortinskiy aff2059ec1 card-rtecp: Fix SELECT FILE 2019-04-17 16:38:49 +02:00
Dmitriy Fortinskiy fe4dae4d31 card-rtecp: Add Rutoken ECP SC ATR 2019-04-17 16:38:49 +02:00
Frank Morgner a899a46b09 replaced SC_TEST_RET with LOG_TEST_RET 2018-12-06 09:26:42 +01:00
Frank Morgner 00a150f74c replaced SC_FUNC_RETURN with LOG_FUNC_RETURN 2018-12-06 09:26:42 +01:00
Frank Morgner 24b50a4277 replace sc_debug with sc_log 2018-12-06 09:26:42 +01:00
Priit Laes 45f407c021 Mark driver-specific global sc_atr_table structures as const
As most of the drivers do not modify these, we can mark them as const.
Two drivers that we cannot convert are dnie and masktech.

section                 size
.data                  35232 ->   25472
.data.rel.ro           36928 ->   46688
2018-08-22 22:50:30 +02:00
Frank Morgner 8fe377e93b fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes.
2018-08-14 15:50:13 +02:00
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