Peter Marschall
9c9317d11b
opensc-explorer: centralize usage
...
* extend cmds struct by a new element args for a description of the arguments
* use args in help texts
* new function usage() for centralited dispaly of usage info
* harmonize argument strings for usage / help texts
* re-sort cmd list shown in help texts
* add function "help" to cwallow asking for for help
* space-police
Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
Peter Marschall
8780ddb2e1
opensc-tool: no unnecessary spaces around "DF"
...
Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
Peter Marschall
9abb398750
opensc-tool: update EF structure names
...
Use EF structure names that are more sensible & grammatically more correct.
Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
Peter Marschall
78838812fb
opensc-explorer: convert do_info() to using tables
...
* use ID<->name tables instead of arrays of strings where
the index was treated like some "magic" constant.
With the new mapping tables, the meaning is obvious.
* fix a bug with ac_ops_df[]: before the conversion, it was a list
of pointers to strings but was in one case treated like it was a mapping table.
With the conversion to a mapping table, and the adaption of other code parts
this bug got fixed "automagically" ;-)
* use common code to cleanly print ACLs for DFs & EFs
* harmonize EF structure names to the ones used in ISO 7816-4
Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
Peter Marschall
4939432304
OpenPGP: unlink blob from blob tree in pgp_free_blob()
...
Remove links pointing to the blob to be deleted from other blobs in the
blob tree structure, so that removing a subordinate blob does not hurt
its parent or siblings.
Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:30:46 +02:00
Peter Marschall
da5a223e26
OpenPGP: use pgp_new_blob() to setup MF blob
...
Use the standard way to create blobs, pgp_new_blob(), also for the MF.
Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:30:46 +02:00
Peter Marschall
4ddec5d384
OpenPGP: add DO info entries for MF
...
For consistency, add DO info entries for the MF 3F00.
Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:30:46 +02:00
Peter Marschall
961a27c921
OpenPGP: update pgp_list_files()
...
* fail if buffer passed as parameter is too small
* only list readable objects
Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:30:46 +02:00
Peter Marschall
2e7406922f
OpenPGP: re-factor gpg_new_blob()
...
* get file as parameter & fail if it is NULL
* allow parent to be NULL
* do not rely on DO info to be passed as parameter,
search it yourself using the global DO info list for the card.
* infer file type automatically from DO info matching the file ID.
Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:30:46 +02:00
Peter Marschall
b6ee0e3d75
OpenPGP: immediately quit on allocation errors in init
...
Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:30:46 +02:00
Peter Marschall
e3fca4ac11
OpenPGP: remove DO info entry for DO FF
...
DO FF is a "catch-all" DO that returns all the infos contained in the other
DOs in one hierarchy.
It is hence duplicate and not necessary.
Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:30:46 +02:00
Peter Marschall
01e63424f5
OpenPGP: fix algorithms & key lengths calculation
...
Also include forgotten DO C3 in keylength calculation.
It contains the parameters for the authentication key.
Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:30:46 +02:00
vtarasov
9863072845
pkcs11: framework-pkcs15: OpenSC specific 'non-repudiation' cryptoki attribute ...
...
In PKCS#11 there is no CKA_ attribute dedicated to the NON-REPUDIATION flag.
We need this flag in PKCS#15/libopensc to make dinstinction between 'signature' and 'qualified signature' key slots.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5567 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-10 16:46:41 +00:00
vtarasov
a7607b8f30
pkcs11: framework-pkcs15: when storing private key, set the key usage from the object attributes
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5566 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-10 16:41:04 +00:00
jps
93cc9bef1a
For CardOS 4.3B and 4.4, the Verify Retry Counter Package
...
can be loaded at ADMINISTRATION life cycle phase to change
the behavior of the VERIFY command in regard to return codes.
When that package is loaded, the return code of the VERIFY
will be ISO7816-4 compliant (63Cx with x being the value of
the remaining retry counter when required verification has failed).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5565 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-10 09:14:02 +00:00
Ludovic Rousseau
00d9a5d7ac
Merge remote branch 'upstream/master'
2011-06-10 11:06:36 +02:00
andre
93baf137c3
libopensc: Fix for drivers returning an error if a challenge of length zero was requested. Actually nothing is done when obtaining such a challenge, thus nothing could fail.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5564 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-09 10:59:04 +00:00
andre
8a5961e970
pkcs11-tool.c: At least CKS_RO_PUBLIC_SESSION is needed.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5563 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-08 08:50:42 +00:00
jps
c5c2366a0b
Revert 5558
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5562 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-08 07:58:51 +00:00
andre
a28bacf02c
libopensc: Reveal another Belpic hack introduced in r2117.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5561 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-08 07:35:03 +00:00
martin
7cc559ec39
MacInstaller: when building OpenSC.tokend, refresh remote branches before trying to switch.
...
Old checkout is used by build slaves, where new branches might not be visible
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5560 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-07 13:13:43 +00:00
martin
203eb871d6
MacInstaller: when building the engine on 10.6, extent the pkg-config search path with freshly built libp11 location instead of replacing the path.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5559 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-07 13:06:41 +00:00
Ludovic Rousseau
3920417e94
Merge remote branch 'upstream/master'
2011-06-07 15:02:54 +02:00
jps
b422872813
For CardOS 4.3B and 4.4, the Verify Retry Counter Package
...
can be loaded at ADMINISTRATION life cycle phase to change
the behavior of the VERIFY command in regard to return codes.
When that package is loaded, the PIN can be created with this
"verifyRC" flag in cardos.profile if the return code must be
ISO7816-4 compliant (63Cx with x being the value of the remaining
retry counter when required verification has failed).
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5558 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-07 12:44:53 +00:00
martin
f2da113f54
MacInstaller: r5550/[ d888b3fd55
] changed ABI, bump OpenSC.tokend branch revision.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5557 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-07 10:49:04 +00:00
Ludovic Rousseau
90272799f0
Fix compiler warning
...
Declare the function static to fix:
pkcs15-lib.c:1069: warning: no previous prototype for 'sc_pkcs15init_encode_prvkey_content'
2011-06-07 10:23:56 +02:00
martin
ffdcad49c5
NEWS: add details to existing lines
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5556 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-07 07:08:08 +00:00
andre
947cdad801
pkcs15.c: In function ‘compare_obj_flags’:
...
pkcs15.c:1115: warning: unused variable ‘data’
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5555 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-07 06:33:01 +00:00
vtarasov
f0ab932031
minidriver: 'PinObject-info' data type is changed for the 'AuthenticatioObject-info' data type
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5554 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-05 17:03:23 +00:00
vtarasov
d5b8a6cd5f
RuToken: 'use uninitialized variable' warning
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5553 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-05 16:53:07 +00:00
vtarasov
226bfaac74
pkcs15: add few attributes to the biometric authentication data type ...
...
to make happy VS compiler
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5552 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-05 16:51:36 +00:00
vtarasov
efc5760646
win32: build also static version the pkcs11 module
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5551 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-05 16:14:11 +00:00
vtarasov
d888b3fd55
pkcs15: use general 'AuthenticationObject' instead of 'PinObject'
...
now the attributes of the previous 'pin-info' data type are included
as the sub-type attributes of the general 'auth-info' data .
It will allow to include support of the 'biometricTemplate' and 'authKey' authentication types.
http://www.opensc-project.org/pipermail/opensc-devel/2011-May/016655.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5550 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-05 15:46:25 +00:00
vtarasov
32d035a9ad
AuthentIC: when returning PIN info set the 'tries-left' data to the 'non-initialized' value
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5549 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-05 15:13:06 +00:00
vtarasov
f45f22ca73
westcos: resolve signed/unsigned comparison warning
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5548 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-05 15:05:58 +00:00
vtarasov
f9b1a1e102
pkcs15: in 'TokenInfo' data the 'serialNumber' attribut is optional
...
If 'serialNumber' attribute is absent in the 'TokenInfo' data,
in the parsed data, this attribute will be set to the value of the card's serial.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5547 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-05 15:01:15 +00:00
andre
a9eba2b205
libopensc: Remove unused parameter 'file_out' in function 'sc_pkcs15_read_file'.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5546 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-05 11:08:36 +00:00
vtarasov
c74d33d0b0
coding style: tiny indent style issue
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5545 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-02 19:43:10 +00:00
vtarasov
f53b952176
doc: pkcs11-tool: precise description of the options to select a slot
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5544 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-02 19:29:15 +00:00
vtarasov
a479c368a6
pkcs11-tool: allow non-interactive change of User/SO PIN
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5543 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-02 19:20:11 +00: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
vtarasov
da0a77b8c0
authentic: spelling of message
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5541 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-02 18:22:42 +00:00
vtarasov
d43e692e98
pkcs11: implement changing of SoPIN
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5540 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-02 18:17:02 +00:00
vtarasov
35bd07ed5e
pkcs11: with 'init-pin-in-SO-session' PIN unblock style, try to set PIN when PUK value is not available
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5539 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-02 18:05:02 +00:00
vtarasov
36a85ffe5b
iso7816: resolve problem 'r5237 breaks support for Belgian eID', thanks to Jean-Pierre.
...
http://www.opensc-project.org/pipermail/opensc-devel/2011-May/016703.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5538 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-02 17:28:37 +00:00
vtarasov
b3cbf5453e
pkcs11: resolve problem 'change 5421 breaks MIT Kerberos login', thanks to Douglas.
...
http://www.opensc-project.org/pipermail/opensc-devel/2011-June/016734.html
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5537 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-02 17:20:10 +00:00
vtarasov
3095f5479f
pkcs11-tool: resolve compiler warning '"OPENSSL_VERSION_NUMBER" is not defined', thanks to Ludovic
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5536 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-02 17:12:12 +00:00
vtarasov
d5679f58af
warning: resolve 'suggest parentheses around operand' compiler warning
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5535 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-02 17:00:36 +00: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
andre
31a56bb374
pkcs11-tool.c: Remove useless parameter 'slot' from a lot of function prototypes.
...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5533 c6295689-39f2-0310-b995-f0e70906c6a9
2011-06-01 18:51:26 +00:00