Commit Graph

4769 Commits

Author SHA1 Message Date
martin e5bee33260 OpenPGP: add indication of 2048 RSA agorithm for OpenPGP 2.0 cards
Signed-off-by: Peter Marschall <peter@adpm.de>

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5469 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-23 17:30:36 +00:00
martin 223f704b83 OpenPGP: fix top-level DOs according to spec
Added:
* 00c4: new top-level DO in 2.0
        can also be found inside constructed DOs 006E/0073 in 2.0 & 1.1
* 0101: new optional top-level DO starting in 1.1
        for private use
        max 254 bytes;
        access: read - always; write - verify CHV2
* 0102: new optional top-level DO starting in 1.1
        for private use
        max 254 bytes;
        access: read - always; write - verify CHV3
* 5f52: new top-level DO in 2.0
        can also be found inside constructed DOs 006E in 2.0
* 7f21: new optional top-level DO in 2.0
        use: card holder certificate (e.g. X.509) for the AUT key in the card
Removed:
* 0073: never a top-level DO, but part of top-level constructed DO 006E
Changed:
* 005e: not a constructed DO, but a simple/primitive DO

Note:
Trying to read non-existent top-level DOs or top-level DOs that weren't defined
in a spec version later than the current card's version does not hurt.
They are returned as empty.

Signed-off-by: Peter Marschall <peter@adpm.de>

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5468 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-23 17:29:09 +00:00
vtarasov d139c2281b pkcs15init: move the key type specific code to the dedicated procedure
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5467 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-22 11:42:53 +00:00
ludovic.rousseau a7596cc72b Fix compiler warning
opensc-explorer.c: In function 'main':
opensc-explorer.c:1602: warning: declaration of 'argv' shadows a parameter


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5466 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-22 11:35:42 +00:00
vtarasov dd30eb1905 pkcs11-tool: import GOST key; key to import in DER or PEM format
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5465 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-22 10:52:44 +00:00
ludovic.rousseau 8183732da8 Fix compiler warning and potential bug
pkcs15-piv.c:129: warning: 'fbyte' may be used uninitialized in this function


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5464 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-22 10:21:59 +00:00
ludovic.rousseau c9fae6f6a1 Fix typo in comment
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5463 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-22 10:19:35 +00:00
ludovic.rousseau 7124273dee Fix a bug and a compiler warning
pkcs15-actalis.c: In function 'sc_pkcs15emu_actalis_init':
pkcs15-actalis.c:232: warning: dereferencing type-punned pointer will
break strict-aliasing rules

Never cast a pointer between types of different sizes. On 64-bit Unix
(LP64) int is 32 bits long and long is 64 bits long.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5462 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-22 10:16:36 +00:00
ludovic.rousseau 38e420bec3 Fix compiler warning
card-piv.c: In function 'piv_write_binary':
card-piv.c:1364: warning: signed and unsigned type in conditional expression

count is a size_t and must be casted in an int since the fucntion
returns an int.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5461 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-22 10:10:21 +00:00
ludovic.rousseau 96ff2bbe36 Fix compiler warning
sc.c: In function 'sc_remote_apdu_allocate':
sc.c:725: warning: unused variable 'counter'


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5460 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-22 10:07:24 +00:00
ludovic.rousseau 0dfe6331fa Fix compiler warning
pkcs15-lib.c:167: warning: no previous prototype for 'sc_pkcs15init_empty_callback'


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5459 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-22 10:00:12 +00:00
vtarasov cb39b2dcc9 pkcs11-tool: when doing signature try at first the procedure for the short input data ...
Not all PKCS#11 driver support the C_SignUpdate. 
So, for the short data begin with procedure "C_SignInit & C_Sign".
If no success, try to applicate the procedure "C_SignInit & C_SignUpdate & ... & C_SignFinal".


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5458 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-22 07:13:09 +00:00
vtarasov 7e9f5b2270 pkcs15: in 'compute-signature', when doing 'zero-padding', set properly the new input data length
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5457 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-20 11:24:46 +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
martin 5deeef69c9 MacInstaller: fix distribution style, which accidentially got changed in r5376.
This only affects (corrects) Mac OS X binary packaging.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5453 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-18 05:33:40 +00:00
martin 0dcab4abef NightlyBuilds: trunk shall be 0.12.2
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5452 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-17 17:07:37 +00:00
martin a449ab4d1b Release r5449 as OpenSC 0.12.1
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5450 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-17 16:59:49 +00:00
martin b47263d463 NEWS: add pkcs11-tool change to NEWS file
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5449 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-17 14:04:24 +00:00
martin 6277099a27 pkcs11-tool: correct typos about --login-type option, change id -> ID in help texts.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5448 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-17 13:27:13 +00:00
martin 18baf42780 pkcs11-tool: move --module to the first position in help text and make it mandatory.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5447 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-17 13:27:09 +00:00
vtarasov ce79a61d30 tools: print value of 'BOOLEAN' asn1 type
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5446 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-16 08:32:07 +00:00
vtarasov 38473e1ea6 pkcs15-tool: for PIN object print 'Auth ID'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5445 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-14 18:00:08 +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 65e10c29ad libopensc: add description for the 'remote data' data types
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5443 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-13 15:34:03 +00:00
vtarasov c3294c9f74 suspend commit of SM support until the nearest release
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5442 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-13 14:04:55 +00:00
vtarasov d04dd5c649 configure: add configuration option for support of 'Secure Messaging', desabled by default
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5441 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-13 13:27:25 +00:00
vtarasov c7ed3da502 libopensc: authentIC: use macros; use common CPLC data type
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5440 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-13 12:57:18 +00:00
vtarasov e6a3d92de7 libopensc: SM related errors
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5439 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-13 12:50:24 +00:00
vtarasov 4fbb37ae7e libopensc: 'remote data' related procedures: init, allocate, free
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5438 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-13 12:44:31 +00:00
vtarasov 292d561882 libopensc: move declaration of 'serial number' related data types from 'opensc.h' to 'types.h'...
also define CPLC and 'remote_data' data types.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5437 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-13 12:19:29 +00:00
vtarasov 07e0af59b0 minidriver: in CardAuthenticatePin() the PIN to verify is selected by ROLE_USER, thanks to HOURY William
http://www.opensc-project.org/pipermail/opensc-devel/2011-May/016633.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5436 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-11 16:52:13 +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 16abe7f3a7 pkcs11: Ticket #353: in pkcs15init framework allocate only one slot with uninitialized token ...
aldo, when allocating existing slot to the card, return an error if there is no more free virtual slot.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5434 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-09 17:11:13 +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 1f892af9eb pkcs15init: non-unique ID is forbidden for the public key objects
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5432 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-08 15:53:39 +00:00
vtarasov 81dd8b7775 libopensc: export 'sc_do_log_noframe' instead of internal 'sc_do_log_va'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5431 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-08 08:10:16 +00:00
vtarasov 1176c59370 libopensc: export the wrapper for the internal log function dedicated to minidriver
http://www.opensc-project.org/pipermail/opensc-commits/2011-May/011049.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5430 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-08 08:07:03 +00:00
vtarasov 8e75d971cb asn1: when encoding the OID, make sure that unused part of input data is properly initialized
it's a supplement to r5355. 


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5429 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-08 07:59:16 +00:00
martin 34302525fc MiniDriver: add two exports used by MiniDriver. PKCS#1 related functions could be exported, internal logging should be eventually fixed in MiniDriver instead.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5428 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-05 14:26:27 +00:00
martin e4711a485e WindowsInstaller: don't link against winscard.lib, winscard.dll is loaded on runtime. Link minidriver against correct opensc.lib
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5427 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-05 14:03:36 +00:00
andre 79db564732 piv-tool.c: Leftover from r5412.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5426 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-04 17:17:28 +00:00
andre 85b40a553c pkcs11-tool.c:54: warning: missing initializer
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5425 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-04 16:45:51 +00:00
andre 03b4891c1e pkcs15-pubkey.c:975: warning: missing initializer
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5424 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-04 16:45:01 +00:00
vtarasov 1b7a320f45 doc: pkcs11-tool: precise the usage of 'write-object' argument
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5423 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-04 16:28:34 +00:00
vtarasov fc07974be8 iasecc: pkcs15init: test for the wrong error code was used ...
in 'Delete SDO' procedure to ignore the 'SDO don not exist' error.
Thanks to Gilles Blanc.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5422 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-04 11:41:13 +00:00
vtarasov dc55351767 pkcs11: hide empty slots ...
The list of slots returned by C_GetSlotList() contains:
 - if present, virtual hotplug slot;
 - any slot with token;
 - without token(s), one empty slot per reader;


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5421 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-04 07:17:28 +00:00
vtarasov 822fdc7f38 pkcs15init: pkcs15init emulator for PIV card will not be commited
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5420 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-03 07:55:38 +00:00
vtarasov 0783ffd4c7 iasecc: pkcs15init: when deleting SDO, do not try to overwrite 'non-updateable' SDO attribut
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5419 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-03 07:54:13 +00:00
vtarasov 2aa4673577 iasecc: obsolete syntax of the 'Adele Common' card profile
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5418 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-03 07:50:26 +00:00