Commit Graph

41 Commits

Author SHA1 Message Date
Frank Morgner f851197129 Merge pull request #565 from frankmorgner/sm-openssl
Build a lightweight version of OpenSC
2015-10-02 15:12:41 +02:00
Frank Morgner ffd85adae7 Decouples SM from OpenSSL 2015-09-24 14:46:30 +02:00
Frank Morgner fe31aceacb Fixes signature of iasecc_read_public_key 2015-09-17 22:24:33 +02:00
Frank Morgner 8a225eb42b Avoids potential NULL pointer deref 2015-09-17 22:24:33 +02:00
Viktor Tarasov 475ce71453 iasecc: fixed resource leak
pkcs15-iasecc: fix memory leakage
iasecc: fix memory leakage
2015-05-08 09:11:20 +02:00
Frank Morgner cbc43eeb88 fixed compiler warning 2015-04-21 01:04:18 +02:00
Viktor Tarasov 3e2d51e0ba iasecc: use PIN PAD with variable PIN length 2015-04-11 16:47:13 +02:00
Viktor Tarasov 95ad11a253 iasecc: special case for 'Gemalto GemPC Pinpad'
issue 424
VTA: this pinpad, the only available, do not accept different values
for min and max PIN lengths in P10 block.
2015-04-04 21:41:28 +02:00
Thomas Calderon 4a4d750e73 iasecc: Fix log output is always displayed
* iasecc_read_public_key function uses SC_SUCCESS instead of log level
  value, hence the log output is always displayed. This uses
  SC_LOG_DEBUG_NORMAL instead.

VTA: updated to use short form of LOG macro
2015-03-31 18:47:11 +02:00
Thomas Calderon 435291f216 iasecc: initial support for Morpho IAS Agent Card
* This commit adds initial support for Morpho French Agent card which is an
    IAS card. Signature operations are working. Since my test card was
    read-only, I was unable to test object management functions.

  * Add missing copy of AID in structure
2015-03-29 12:10:55 +02:00
Viktor Tarasov 08eb700b97 revert or partially revert some of recent commits
b94c163 - invalid, non-tested
11881a6 -- src/libopensc/card-iasecc.c -- return from select has to be ignored,
3a92bf7 -- src/pkcs11/slot.c -- SEGFAULT issue #373
3a92bf7 -- src/tools/piv-tool.c -- confirmed by author
6759c04 -- src/pkcs15init/pkcs15-lib.c -- file instantiation error has to be ignored
2015-02-07 19:31:17 +01:00
Frank Morgner 11881a61b8 removed/fixed dead code 2015-02-05 01:38:41 +01:00
Frank Morgner a3fc62f79f fixed NULL dereference (or warning thereof) 2015-02-05 01:38:40 +01:00
Frank Morgner ac4da89d0d use memmove for overlapping memory 2015-02-05 01:37:53 +01:00
Frank Morgner 6759c04b26 don't ignore errors 2015-01-28 04:45:08 +01:00
Frank Morgner 7a34c204c1 fixed dereference before null check
silence warnings reported by coverity-scan
2015-01-22 20:29:33 +01:00
Thomas Calderon 32d8173b4c IAS-ECC: Improve detection Gemalto cards(Issue #343)
* Improve IAS-ECC card detection using the ATRMask.
    Previous commit was revert since work was not done in topic branch.
2014-12-29 16:09:06 +01:00
Frank Morgner e137396d56 workaround for compiler warnings 2014-12-12 21:45:53 +01:00
Frank Morgner e3649fb7de fixed even more compiler warnings 2013-08-02 15:43:25 +02:00
Viktor Tarasov 60b7e52e06 pkcs15: mandatory 'publicKeyCoefficients' in encode/decode public key procedures
http://www.opensc-project.org/pipermail/opensc-devel/2012-November/018586.html
2012-11-20 22:58:37 +01:00
Viktor Tarasov 7fbca94698 opensc: new card operation 'read-public-key'
In PukDF of PKCS#15 the public key value can be presented by 'direct value', by path or by path and reference.
For the different cards the public key can be stored in EF, internal EF or in card specific SDO (security data objects).
A new card handle allows to read out the public key from the card specific SDOs.
2012-11-09 14:36:14 +01:00
Viktor Tarasov ceef4c0be3 iasecc: remove ostentatious TODO messages 2012-09-24 11:50:56 +02:00
Viktor Tarasov ea5a19e27e iasecc: SM add related procedures 2012-06-08 20:17:35 +02:00
vtarasov f026db6f84 compile warnings: resolve 'comparison between signed and unsigned' compiler warnings
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5534 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-02 16:59:39 +00:00
vtarasov a44ec385bd iasecc: no support for SHA256 in the OpenSSL previous to v0.9.8
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5444 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-13 16:11:06 +00:00
vtarasov cbecf23395 iasecc: when getting data for qualified signature, take the last SHAxx block from the input data ...
... and not from the SHAxx-CTX, to avoid big/little endian uncertainty


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5435 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-10 08:24:27 +00:00
vtarasov 1e025a0ded iasecc: support the digital signature with RSA scheme PKCS#1 SHA-256 ...
in this mode the final digest (SHA-256) step has to be performed by card.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5433 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-09 15:31:02 +00:00
vtarasov c70e0ae982 iasecc: use atr mask to accept the Gemalto's IAS/ECC card without MF
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5411 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-30 17:51:43 +00:00
vtarasov ad478eb9cc iasecc: write 'compulsorily use' data for the new key slot ...
Once written the 'compulsorily use' data cannot be changed. 
Write this data immediately after a new key slot has been created.
It helps to avoid further confusion between 'use new key slot' and 'reuse existing slot'.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5402 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-27 14:06:58 +00:00
vtarasov 6c3b43f636 iasecc: when signing short data sequence with PSO_DST ...
... 'last-hash-step' APDU do not includes the 'pre-hash' and 'counter' data -- only the 'last-data-block'.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5401 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-27 13:56:31 +00:00
vtarasov c9bf9bc22c iasecc: 'DELETE SDO' card ctl ...
to be used by Obertbur's IAS/ECC card.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5398 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-26 17:29:08 +00:00
vtarasov 346490b953 iasecc: 'CREATE SDO' card ctl ...
; static function dedicated to emulate FCP data of application DF when it's not returned by card



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5397 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-26 16:42:48 +00:00
vtarasov 27cd40629e iasecc: Oberthur's card strictly follows specification in 'IO buffer size' ...
Most of the card producers interpret 'send' values in 'IO buffer size' data as "maximum APDU data size" .
The last Oberthur's card strictly follows specification and interpret these values as "maximum APDU command size".


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5392 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-24 17:57:49 +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
ludovic.rousseau 8c0dbf4b02 Fix compiler warning
card-iasecc.c: In function 'iasecc_get_serialnr':
card-iasecc.c:2218: warning: declaration of 'ii' shadows a previous local
card-iasecc.c:2165: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5266 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 16:02:42 +00:00
ludovic.rousseau 0e6b87b135 Fix compiler warning
card-iasecc.c: In function 'iasecc_select_file':
card-iasecc.c:647: warning: declaration of 'rv' shadows a previous local
card-iasecc.c:635: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5265 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 16:01:45 +00:00
ludovic.rousseau 161678d8a6 Fix compiler warning
card-iasecc.c:1529: warning: declaration of 'ffs' shadows a global declaration
/usr/include/string.h:121: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5264 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 16:00:56 +00:00
andre 8ff3d5d647 Fixing misuse of SC_CARD_FLAG_RNG. From opensc.h :
[http://www.opensc-project.org/opensc/browser/trunk/src/libopensc/opensc.h?rev=5190#L88 #define SC_ALGORITHM_RSA_PAD_PKCS1      0x00000002]
[http://www.opensc-project.org/opensc/browser/trunk/src/libopensc/opensc.h?rev=5190#L413 #define SC_CARD_FLAG_RNG                0x00000002]

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5218 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-04 16:23:07 +00:00
vtarasov dc7cde4d79 ias/ecc: do not throw an error when there is SM or Auth.Ext protection
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5214 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-23 08:57:30 +00:00
vtarasov 53dd2ceafa IAS/ECC: remove dead code and '//' coments, resolve some warnings ...
to be continued, thanks to Martin


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5200 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-16 14:05:17 +00:00
vtarasov 57b7a81c3a IAS/ECC: add IAS/ECC card specific files ...
as it was announced in 
http://www.opensc-project.org/pipermail/opensc-devel/2011-January/015756.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5197 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-16 10:55:05 +00:00