Commit Graph

971 Commits

Author SHA1 Message Date
viktorTarasov 388d68fb1a Merge pull request #37 from marschap/staging
improvements to opensc-explorer & new tool openpgp-tool

Usefull improvement: probably could be used in automated tests.

I follow Ludovic and attract your attention onto the necessity, in the nearest future, 
to supply the doc/man for the tool newly introduced.
Without it the build of OpenSC package will simply not be possible.
2012-05-26 05:29:24 -07:00
Viktor Tarasov 10e1ad001d pkcs15init: change sc_pkcs15init_bind() prototype
Add new argument 'application-info',
that will allow to select the on-card application to by binded with.

pkcs11: use sc_pkcs15init_bind with 'AID' argument

Prototype of sc_pkcs15init_bind() has been changed to add argument with
AID of the on-card application to be binded with.
2012-05-26 09:36:25 +02:00
Peter Marschall 38be3c1a4a opensc-explorer: better names for some functions 2012-05-20 18:20:24 +02:00
Peter Marschall 1f70902da5 opensc-explorer: add 'echo' command
Add 'echo' command that simply displays its arguments.

With the recently committed script interpreter feature and this echo command,
nice litte scripts can be written, like e.g.

 $ cat opengpg-userinfo
 #!/usr/bin/opensc-explorer
 cd 0065
 echo Name:
 cat 005B
 echo Language:
 cat 5F2D
 echo Gender:
 cat 5F35
 quit
2012-05-20 18:19:48 +02:00
Peter Marschall f8f02dbd65 opensc-explorer: allow acting as script interpreter
Take a filename as argument and interpret the commands in it.
2012-05-20 17:12:14 +02:00
Peter Marschall 69e9861ddd OpenPGP: first go at openpgp-tool 2012-05-20 00:00:14 +02:00
Diego Elio Pettenò e88c08d138 build: allow cross-compilation build by reordering libraries' order.
If the system libraries are set before the locally built libraries,
libtool will pick the system copy of OpenSC instead of the local one,
and that can make cross-builds fail badly.

This patch is already applied in Gentoo for proper building.
2012-05-16 17:18:38 +02:00
Frank Morgner 59b214ec23 opensc-explorer: implemented `pace` 2012-05-03 12:58:45 +02:00
Frank Morgner 7b630962c1 opensc-explorer: `find [<start fid> [<end fid>]]` 2012-05-03 12:58:34 +02:00
Viktor Tarasov cb13633634 remove trailing whitespaces
inspired by
http://www.opensc-project.org/pipermail/opensc-devel/2012-March/017883.html

Change-Id: If170e830d8d9587a31742feffb6fff54cfdf75b4
2012-04-03 00:00:56 +02:00
Alon Bar-Lev df8715849d Remove libltdl: Remove ltld references
http://www.opensc-project.org/pipermail/opensc-devel/2011-December/017490.html
cherry-picked from 'libtool' branch of Alon Barlev's github project git://github.com/alonbl/OpenSC.git
and rebased

Remove libltdl: Remove ltld references
(cherry picked from commit a350326c520c5b0cb185f90946648633f4d0e456)

Remove libltdl: Detect libdl
(cherry picked from commit 51e7de45c11823460e776492dcbd40e60583a7eb)

Remove libltdl: Use libscdl
(cherry picked from commit 09f3eadb8a1a47407c011dcd3d5ce461516f3b87)

Remove libltdl: Cleanup libscdl
(cherry picked from commit 52d5f1be01146079e3a6fad1c88ebb0f577d0a94)

Remove libltdl: Cleanup libscdl usage at Microsoft VC build

Untested, I don't have the environment, Martin, please test.
(cherry picked from commit 7fb18f8d0b0bae6d181981a0c71190440e917c2c)

Change-Id: I73c98ccb9365584b12f4b0b97b69316a190b6e45
2012-03-17 20:55:05 +01:00
Ludovic Rousseau 594427e516 Merge pull request #26 from viktorTarasov/staging
merge 'master' into 'staging'
2012-02-22 09:38:37 -08:00
Viktor Tarasov 2b63213e0a pkcs15-init tool: fix for pin auth_type comparison
partial merge of pull request
https://github.com/OpenSC/OpenSC/pull/8

Thanks to 'joelhockey'.
2012-02-22 09:42:30 +01:00
viktorTarasov e6c501f3de Merge pull request #13 from mjrider/master
2 small fixes for storing a private key
2012-02-22 00:20:49 -08:00
Robbert Müller 3248a6b122 Adding default accessflags to the do_store_private_key function in the same way do_generate_key has those accessflags
This seems the right thing to do, when you look at the initial commit which added the flags in do_generate_key and the ticket
http://www.opensc-project.org/opensc/ticket/198

Currently when storing a key, the accessflags are not set
2012-01-10 16:47:27 +01:00
Robbert Müller d97f239468 Setting usage flags for the public key when storing a private key 2012-01-08 13:50:46 +01:00
Martin Paljak 51804601e4 pkcs15-tool: also print the PIN reference in hex.
This eases debugging.
2011-09-16 14:08:39 +03:00
Martin Paljak 10ae35fd57 Add LGPL header with a generic copyright to util.c
Individual copyright should be delegated to individual commits.
2011-09-13 21:50:20 +03:00
Peter Marschall 6c24bd5cff opensc-explorer: silence compiler warnings 2011-06-16 09:30:55 +03:00
Peter Marschall 2faad42325 opensc-explorer: consolidate filename generation
* add new function path_to_filename() that converts a path into
  filename, and returns a static buffer to it
* convert all occurrences where file names get generated
  to using this function

Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
Peter Marschall c03eedde54 opensc-explorer: use util_hex_dump() in do_info()
Use standard function util_hex_dump() in do_info() instead of
enumerating lists of bytes ourselves.

Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
Peter Marschall 12fce0f329 opensc-explorer: replace if..else with ?:
Use the easier to read & shorter expression
  path->type = (is_id) ? SC_PATH_TYPE_FILE_ID : SC_PATH_TYPE_PATH;
nstead of the longer, but equivalent if () .. else construction.

Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
Peter Marschall 52b601ee53 opensc-explorer: re-factor do_apdu()
* allow double-quoted strings besides hexdata in ADPU generation
* detect errors in parameter parsing
* use utility function to print bytes sent,
  fixing an error that only showed parts of the APDU wheni
  it was generated from multiple arguments

Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
Peter Marschall 81aa02d598 opensc-explorer: convert all mapping tables to id2str_t
Use type id2str_t for all mapping tables mapping IDs<->names.

Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
Peter Marschall 1c437c049c opensc-explorer: simplify arg parsing in do_change() & do_unblock()
Simplify argument handling in do_change() and do_unblock(),
making the functions shorter and deasier to understand.,

Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
Peter Marschall 61855ebd22 opensc-explorer: remove unnecessary var's in do_update_*()
The variables "in_str" in do_update_binary() & do_update_record()
do not serve a purpose: use argv[x] directly & remove them.

Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
Peter Marschall 291ec6bf1c opensc-explorer: remove hex2binary()
With the last users gone, there's no need to keep hex2binary().

Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
Peter Marschall 4cc1ab41ff opensc-explorer: detect AID conversion errors in arg_to_path()
Convert arg_to_path() to using the standard sc_hex_to_binary() instead of
the local hex2binary().
While at it, return erros on failed conversions.

Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
Peter Marschall c3ba355531 opensc-explorer: consolidate string parsing in do_update_record()
Update do_update_record() to use parse_string_or_hexdata() instead of the old
hex2binary().
This change allows to use double-quoted strings in the "update_record" command.

Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
Peter Marschall aa7a5ae5f8 opensc-explorer: fix argc checks in do_update_*()
do_update_binary() and do_update_record() expect a fixed number of parameters
each: adapt the checks for argc so that they do the right thing.

Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
Peter Marschall 081bf9fc7e opensc-explorer: consolidate string/hexdata parsing
* add new function parse_string_or_hexdata() that parses
  a double-quoted string or a hex-data string (e.g: AA:BB:CC)
  into a buffer
* use parse_string_or_hexdata() wherever strings or hexdata
  gets parsed into a buffer

Signed-off-by: Peter Marschall <peter@adpm.de>
2011-06-11 09:33:30 +02:00
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
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
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 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 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 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
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
vtarasov 185e3f8259 pkcs11-tool: replace 'slot-label' argument with the two new ones -- 'slot-description' and 'token-label'...
the main difference between 'slot-description' and 'token-label' is that 
the first one is unique in any case, 
the second one can be the same for more then one slots.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5528 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-30 14:47:50 +00:00
vtarasov 8931231396 pkcs11-tool: show CKA_VALUE of the GOST public key object
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5527 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-30 13:28:16 +00:00
vtarasov e81c174372 pkcs15-tool: encode GOST public key with the key parameters ...
.. so that it can be used with the OpenSSL tools


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5521 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-29 18:25:04 +00:00
vtarasov 4d2428378d pkcs11-tool: CKA_VALUE of imported GOST key has to be presented in the little endian order
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5518 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-29 17:55:26 +00:00
vtarasov 71b1f55f7c pkcs15-init: use general function to reverse memory buffer
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5517 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-29 17:49:00 +00:00
martin 215c133ba0 libopensc: remove more traces of software token/non-native private key related code.
pkcs15-wrap.c can be removed. Clarified/changed the meaning of "insecure" flag to pkcs15-init tool,
which will be needed to explicitly enforce the creation of a key which does not require a PIN.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5510 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-28 22:14:07 +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
andre 4a2dfa6822 pkcs11-tool.c: In function ‘sign_data’:
pkcs11-tool.c:1253: warning: comparison between signed and unsigned
pkcs11-tool.c: In function ‘write_object’:
pkcs11-tool.c:1777: warning: unused variable ‘type’


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5505 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-27 09:24:09 +00:00
martin 1bb6c706b9 pkcs15-crypt: remove extractable key support. Only native keys (operations on the card) are supported.
This amends r4646 and related commits.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5501 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-24 19:08:43 +00:00
martin 3655d1a1e4 pkcs15-tool: align access flags with the rest of output.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5500 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-24 19:08:05 +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
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
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 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
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
martin 1f2acc5bcb opensc-explorer: use relative addressing in do_asn1
'asn1' takes a file_id as argument. This should be selected relative
to the currently selected DF instead of being treated as an ID.
(compare with 'get' & 'cat' that also take a file_id argument)

Patch from Peter Marschall <peter@adpm.de>

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5417 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-03 05:39:24 +00:00
martin 59e3e659b5 opensc-explorer: more room for commands in 'help'
In the output of the interacive command 'help', leave more room
for the command names so that they do not flow into the descrition.

Patch from Peter Marschall <peter@adpm.de>

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5416 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-03 05:38:59 +00:00
vtarasov 08c9328e62 piv-tool: remove the Oberthur's specific features of the PIV card
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5412 c6295689-39f2-0310-b995-f0e70906c6a9
2011-05-01 18:44:53 +00:00
martin 1cdb3fa971 APDU parsing: switch to Frank Morgner's implementation
Patch by Frank Morgner, proposed in
http://www.opensc-project.org/pipermail/opensc-devel/2011-April/016419.html and
http://www.opensc-project.org/pipermail/opensc-devel/2011-April/016420.html:

* replace partly incorrect extended APU parsing implementation
  with one factored-out in function sc_bytes2apdu() in apdu.c
* re-factor APDU parsing functions in
  - opensc-explorer
  - opensc-tool
  - piv-tool
  to make use of sc_bytes2apdu()

Thanks to Peter Marschall and Frank Morgner
This fixes #260 and #351.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5394 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-26 07:29:53 +00:00
vtarasov a14bbe7e32 opensc-explorer: DF_NAME type path value should not be appended by the file ID ...
When composing path to file (for ex. to be read), if the type of parent DF is DF_NAME,
the value of the parent path is moved to the aid path member and 
file ID takes place of the path value.

; 'cd ..' command takes into account the parent can be presented by DF_NAME



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5391 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-23 06:32:53 +00:00
vtarasov 78d90c4765 EC support: introduce data type dedicated to EC parameters ...
EC parameters can be presented in a three forms: namedCurve, OID and implicit data.
This new data type will facilitate manipulation of ec-parameters in the OpenSC tools and library.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5386 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-22 13:08:45 +00:00
vtarasov e430fe9d87 pkcs11-tool: add test procedure for EC keys ...
... for a while it includes key generation and data signing.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5383 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-21 16:18:23 +00:00
vtarasov c2a87ae2b1 pkcs11-tool: prepare 'gen_keypair' procedure to generate also the EC keys ...
... 'prime256v1' and 'secp384r1'


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5381 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-21 14:29:51 +00:00
andre 094eb8697c opensc-tool.c: Fixes literal names in 'const id2str_t alg_type_names[]'.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5375 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-19 13:45:30 +00:00
andre 9026ea6f3f pkcs11-tool.c: Avoid warning:
pkcs11-tool.c:1978: warning: ‘getPUBLIC_EXPONENT’ defined but not used

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5374 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-19 13:03:49 +00:00
martin 8f0ba374f3 Add reminders to bytes2apdu style code blocks.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5370 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-19 10:51:27 +00:00
martin 1932ce861f opensc-{explorer,tool}: allow sending extended APDUs
In do_apdu() resp send_apdu/(, flexibilize parsing the APDU string passed
so that extended APDUs are accepted a valid APDUs too.

While at it, fix a bug where more data than available would have been copied,
potentially leading to a SIGSEGV.

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

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5369 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-19 10:51:22 +00:00
martin 9dc233163a opensc-tool: convert print_file() to using tables
Use ID<->name tables in print_file() innstead of arrays of strings where
the index was treated like some "magic" constant. With the new mapping tables,
the meaning is obvious.

While on it, 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" ;-)

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

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5368 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-19 10:51:16 +00:00
martin be5456d3ca opensc-tool: make list_algorithms() table driven
Use easily extensible tables instead of explicit coding to display
algorithm names and options in list_algorithms.

Leverage the new tables to add more RSA hashes.

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

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5367 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-19 10:51:11 +00:00
martin e5a133d00c Fix a crash on Windows, where pkcs15-tool -E would always crash in sc_pkcs15_free_card()
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5366 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-19 10:51:06 +00:00
andre 6409755bea pkcs11-tool.c: Avoid warning:
pkcs11-tool.c:2000: warning: comparison between signed and unsigned


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5363 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-19 09:18:12 +00:00
martin 007d27feeb Introduce sc_ctx_log_to_file to set the debug file of libopensc.
On Windows every DLL has their own file descriptor table, thus specifying
-v from any of the OpenSC tools resulted in a crash when the tool tried to override
ctx->debug_file with stderr.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5359 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-18 10:01:27 +00:00
vtarasov fb97d8b4b4 pkcs15-tool: print title and size of the EC public keys
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5341 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-15 16:34:22 +00:00
vtarasov 99fac2685a piv-tool: increase receive buffer for the 'send-apdu' command
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5340 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-15 16:33:18 +00:00
vtarasov 622570a28e pkcs15-init tool: in keygen parameters use 'curve' name without leading separators
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5335 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-12 17:55:20 +00:00
vtarasov d611dcc9ed piv-tool: add containers discovery
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5334 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-12 17:51:08 +00:00
vtarasov 2fecaa73bd pkcs15init: introduce EC key generation parameters
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5332 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-12 11:36:40 +00:00
martin 577ccdbf26 Fix #337 rutoken-tool is obsolete and can be removed, thus no manpage is needed.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5328 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-11 14:42:55 +00:00
vtarasov 771aeb32af pkcs15-tool: print EC key label
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5326 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-11 13:07:34 +00:00
vtarasov e8f6a3e407 pkcs11-tool: now it's possible to show only the objects of a given type ...
when 'type' option is used with the 'list-objects' actions


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5325 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-11 13:00:57 +00:00
vtarasov b85e1a798f piv-tool: new action to print the key slots properties
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5324 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-11 12:02:47 +00:00
vtarasov eb7bc552b1 piv: no 'usepin' authentication mode in PIV tools
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5323 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-11 11:55:00 +00:00
vtarasov f1dec64630 piv-tool: in 'send-apdu' command increase size of response buffer ...
'GET DATA' apdu can return the code 'data still available'


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5320 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-10 20:08:09 +00:00
vtarasov cfffb7f5dd piv-tool: 'admin' and 'genkey' options need an argument ...
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5311 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-08 12:28:59 +00:00
vtarasov a5d1058157 pkcs15-tool: print GUID for private key
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5310 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-08 10:03:42 +00:00
vtarasov b8b4c74d07 pkcs15-tool: print key reference in a decimal and hexadecimal formats
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5309 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-08 09:57:38 +00:00
vtarasov 17fea1f65f pkcs15-tool: include GUID to the printed certificate info
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5303 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-07 16:43:54 +00:00
martin 19aff30b03 opensc-explorer: use relative addressing in do_cat
'cat' takes a file_id as argument. This should be selected relative
to the currently selected DF instead of being treated as an ID.
(compare with 'get' that also takes a file_id argument)

See http://www.opensc-project.org/pipermail/opensc-devel/2011-March/016172.html

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

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5280 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-31 07:45:19 +00:00
martin 71daf094de opensc-explorer: re-factor do_cat()
* use strlen(..) instead of sizeof(..)-1
  - easier to read
  - avoids errors if string is defined with explicit size
* bring sfi:-related code closer together

See http://www.opensc-project.org/pipermail/opensc-devel/2011-March/016172.html

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

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5279 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-31 07:45:13 +00:00
martin 7939d8b723 opensc-explorer: re-factor print_file()
See http://www.opensc-project.org/pipermail/opensc-devel/2011-March/016172.html

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

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5278 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-31 07:45:08 +00:00
martin f63c85d4cd opensc-explorer: support writing to stdout in 'get'
Treat the value '-' of the second parameter to get special.
If it is given, use stdout as the file to write to.

See http://www.opensc-project.org/pipermail/opensc-devel/2011-March/016172.html

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

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5277 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-31 07:44:59 +00:00
martin 4393f7231e eidenv: update copyright and correct used license to match the rest of OpenSC.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5272 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-29 11:36:39 +00:00
ludovic.rousseau 04154504a1 Fix compiler warning
pkcs15-init.c: In function 'verify_pin':
pkcs15-init.c:2840: warning: declaration of 'r' shadows a previous local
pkcs15-init.c:2836: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5268 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-23 16:12:21 +00:00
martin 4dde0476b1 Fix some of the spelling errors in westcos-tool man page and utility, triggered by lintian
I: opensc: spelling-error-in-manpage usr/share/man/man1/westcos-tool.1.gz authentification authentication
I: opensc: spelling-error-in-binary ./usr/bin/westcos-tool attemps attempts

Make text in westcos-tool manpage more readable, harmonize PIN/PUK capitalization.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5242 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-20 13:17:29 +00:00
martin db66f69658 Fix a typo reported by lintian
I: opensc: spelling-error-in-binary ./usr/bin/pkcs15-init dont don't

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5241 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-20 12:19:11 +00:00
vtarasov 42aee0f4d5 pkcs15-tool: use dedicated function to free the object memory
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5229 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-14 18:01:40 +00:00
andre 10e5a18ec9 pkcs15-tool.c: Avoid compiler warnings:
pkcs15-tool.c:1111: warning: comparison between signed and unsigned
pkcs15-tool.c:1117: warning: comparison between signed and unsigned

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5224 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-07 18:14:31 +00:00
martin 2ea78bf741 Amend r5201: also move libltdl build properties to the right Makefile and other leftovers.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5203 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-17 07:45:36 +00:00
martin ffb46d2573 core: reanimate the sc_dlopen API for dynamic loading
* shift libpkcs11 from src/pkcs11 to src/common as it is not used to implement the OpenSC PKCS#11 module
 * invent a "libscdl" mini library that implements either libltdl based dynamic loading or uses native interfaces
 * drop hard requirement for libltl to build OpenSC
 * native Windows build does not need libltdl any more
 * specify CNGSDK include dir to find cardmod.h. CNGSDK only registers with a handful of compilers

Deals with #323

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5201 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-16 19:02:11 +00:00
dengert 0180a969db Remove dependency on sc_establish_context, and provide appname
via sc_ctx_create_context and ctx_param.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5191 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-09 14:45:51 +00:00
dengert 98aa4cb571 Fix uninitialized variables and warning messages.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5188 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-07 16:23:54 +00:00
andre 8b76cee572 Revert r5137, because size_t is defined as unsigned integer type (without further qualification).
http://www.opengroup.org/onlinepubs/000095399/basedefs/stddef.h.html

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5185 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-06 17:28:30 +00:00
ludovic.rousseau 63c293e963 Fix a compiler warning
opensc-explorer.c:1440:22: warning: conversion specifies type 'unsigned int' but
      the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
                printf("expecting %u, got only %d bytes.\n", len, r);
                                  ~^                         ~~~
                                  %lu


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5137 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-05 17:44:56 +00:00
martin 9afbc55883 pkcs15-tool: check for remaining PIN tries before changing a PIN.
If the card supports it, changing a blocked PIN will result in an error before PIN entry, not when the card re-states that the PIN is already blocked.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5123 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-27 14:25:30 +00:00
vtarasov 04f9c46d15 pkcs15-tool: do not print empty path, print path also when it only has 'aid' member
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5109 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 16:06:29 +00:00
vtarasov 3efe35d246 libopensc: avoid the using of not completely initialized 'sc_path' variables
to be continued...


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5103 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 19:00:52 +00:00
vtarasov 4c183b2b38 pkcs15init: function to finalize profile when binding to the application of the multi-application PKCS#15 card.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5100 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-17 16:28:44 +00:00
vtarasov 4c57c899b3 pkcs15init: add 'aid' argument to prototype of sc_pkcs15init_erase_card() ...
used to indicate application to erase


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5086 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-11 16:50:30 +00:00
vtarasov 0fefb0b078 pkcs15-tool: do not print non-relevant to the 'list-applications' context information
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5074 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 17:13:14 +00:00
vtarasov 5a7f8a2d60 libopensc: initialize 'sc_path' type variables ...
it's needed to initialize the 'aid' member of 'struct sc_path'


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5064 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-09 08:49:15 +00:00
vtarasov a576582701 libioensc: use 'struct sc_atr' instead of 'u8 *atr, size_t atr_len'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5061 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-07 17:18:58 +00:00
vtarasov bbcc780460 pkcs15-tool: in help message move 'list-applications' action to the head of the actions group
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5053 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-07 08:50:41 +00:00
vtarasov 2f0b83eecd pkcs15-tool: new action 'list-applications'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5052 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-06 16:21:15 +00:00
vtarasov b9e25370ab tools: use 'aid' as the name of option to specify the on-card PKCS#15 application
; update documentation;
; debug messages;
; cleanup the authentic card profile.
 


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5050 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-06 14:39:19 +00:00
vtarasov 4d81ffcea6 pkcs15-tool: new 'bind-to-aid' argument ...
to indicate application to bind when more then one on-card application detected


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5046 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-05 15:22:12 +00:00
vtarasov 4914b022d1 pkcs15-tool: new 'bind-to-aid' argument ...
indicate application to bind when multi-application card is used


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5042 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-05 14:29:49 +00:00
vtarasov f2924672d8 pkcs15: add 'aid' parameter to the prototype of the 'bind' functions ...
prepare for the multi-application support


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5041 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-05 14:21:04 +00:00
martin c7422df6b5 opensc-tool: make --list-algorithms know about GOST keys
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5026 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 14:31:15 +00:00
martin 3e18e0838d Fix compiler warning
util.c: In function ‘util_getpass’:
util.c:348: warning: comparison between signed and unsigned

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5018 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 12:55:10 +00:00
martin f10d2908a5 opensc-tool: combined with --verbose, --list-readers will show tha ATR and name of the card, together with extra reader flags
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5017 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 12:55:03 +00:00
martin 16726a55b5 tools: allow to specify an ATR in the --reader option.
This facilitates automated testing on a single machine with several identical readers with inserted cards.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5016 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-02 12:54:57 +00:00
andre 7743f6944a opensc-explorer.c: Fixes usage of size_t variables. According to ANSI C the type of size_t is always an unsigned type.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5010 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-31 00:50:30 +00:00
andre 5481e61dad cardos-tool.c: According to ANSI C the type of size_t is always an unsigned type.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5009 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-31 00:00:00 +00:00
vtarasov 5a9e4b1ca6 pkcs15-tool: minor change of the private key info layout
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5000 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-30 12:29:29 +00:00
andre 02c4f1ec77 pkcs11-tool.c: Avoid compiler warning 'may be used uninitialized in this function'.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4968 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-18 00:44:12 +00:00
andre b7fad04e10 pkcs11-tool.c: Simplifies interface to show_key() and avoids more compiler warnings.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4967 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-17 23:02:03 +00:00
andre 548630971e pkcs11-tool: replaced OPENSSL_NO_EDSA with OPENSSL_NO_ECDSA
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4922 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-06 16:28:26 +00:00
vtarasov e353c1bf2f win32: 'netkey' and 'westcos' tools are OpenSSL dependents
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4919 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-06 15:20:19 +00:00
martin b5f329ba7c tools: EC(DSA) requires OpenSSL >= 0.9.8.
This fixes building for OS X 10.5.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4918 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-06 14:41:15 +00:00
dengert 3cfcb5cdc6 Minor corrections to r4906
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4907 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-03 15:44:29 +00:00
dengert b7f4537031 Test for OPENSSL_NO_EC as some systems build OPENSSL without EC.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4906 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-03 15:15:29 +00:00
dengert c2fe4609a9 Modifications to support EC and ECDSA for
emulated cards. True PKCS#15 cards with EC 
will need additional changes. 

Main changes are in framework-pkcs15.c, mechanism.c,
padding.c, pkcs15-algo.c and pkcs15-sec.c 
where switch statements for key type, and testing
of flags was modified to make it easier to add 
additional key types in the future. 

The code was tested using RSA and ECDSA using a PIV card 
from pkcs11-tool, OpenSSL and Thunderbird with 
modifications to NSS-3.12.7 to get ECDSA to sign e-mail. 

Only named curves are supported for ECDSA, ECDH is still 
needed. pkcs11-tool has only minimal changes need to work 
with the -O option to list EC keys. 

One additional line was added to pkcs15-sec.c which 
should get GOSTR sign to work. 

libp11 and engine do not yet have EC support. 

 --This line, and those below, will be ignored--

M    src/tools/piv-tool.c
M    src/tools/pkcs11-tool.c
M    src/pkcs11/framework-pkcs15.c
M    src/pkcs11/mechanism.c
M    src/pkcs11/pkcs11-object.c
M    src/libopensc/pkcs15-prkey.c
M    src/libopensc/card-piv.c
M    src/libopensc/padding.c
M    src/libopensc/cardctl.h
M    src/libopensc/pkcs15-algo.c
M    src/libopensc/libopensc.exports
M    src/libopensc/pkcs15-piv.c
M    src/libopensc/pkcs15-sec.c


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4904 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-01 20:08:42 +00:00
martin 113dfda494 EstEID: add support for v 3.0 cards with 2048b keys
* Detect different cards based on ATR-s and on card objects
 * Set the card name from the ATR table
 * Conditionally add support for 2048b keys
 * Add workarounds for broken MULTOS and JavaCard cards.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4893 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-29 14:22:01 +00:00
andre fd11c909bd pkcs11-tool: Completing the output of "Mechanism Information Flags".
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4885 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-28 23:46:12 +00:00
andre 146041fcee pkcs11-tool: Correcting the behaviour in the case where C_SignUpdate fails. Quotation from PKCS#11:
"A call to C_SignUpdate which results in an error terminates the current signature operation."

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4884 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-28 22:16:50 +00:00
andre b63a601666 pkcs11-tool: Use attributes MODULUS and PUBLIC_EXPONENT instead of VALUE to retrieve RSA-Public-Key. The first two attributes are valid whereas the latter is not.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4883 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-28 18:09:30 +00:00
andre bcef13cfd2 In login() the flag CKF_LOGIN_REQUIRED is now ignored. This makes the behaviour of login() more predictable. If parameter --login is specified on the command line, then C_Login() is always called.fixes #220
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4875 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-18 14:56:26 +00:00
ludovic.rousseau 07ccc3965e pkcs15-tool.c: In function ‘verify_pin’:
pkcs15-tool.c:976: warning: declaration of ‘r’ shadows a previous local
pkcs15-tool.c:972: warning: shadowed declaration is here


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4867 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 17:05:32 +00:00
ludovic.rousseau 8dd3b98b1d pkcs15-tool.c:150: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:151: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:152: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:153: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:154: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:155: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:156: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:157: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:158: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:159: warning: initialization discards qualifiers from pointer target type
pkcs15-tool.c:160: warning: initialization discards qualifiers from pointer target type


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4866 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 17:04:04 +00:00
ludovic.rousseau 3c12d20bfa piv-tool.c: In function ‘gen_key’:
piv-tool.c:292: warning: declaration of ‘newkey’ shadows a global declaration
piv-tool.c:97: warning: shadowed declaration is here
piv-tool.c: At top level:
piv-tool.c:97: warning: ‘newkey’ defined but not used


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4865 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 17:01:17 +00:00
ludovic.rousseau f841b88e06 opensc-explorer.c:89: warning: function declaration isn’t a prototype
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4860 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-06 16:53:11 +00:00
dengert 641ea4eddd Fix compile warning message.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4852 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-01 15:44:17 +00:00
dengert bd93b97674 Additianl changes to r4805 which made cert->pubkey a pointer to sc_pkcs15_pubkey_t
Thanks to Andre Zepezauer for pointing out most of these. 


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4828 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-25 20:58:02 +00:00
s 150d26d51e fix: opensc-tool: invalid output of access control for EF (add to r4509)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4826 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-23 06:54:56 +00:00
martin fa0e236881 Missed these from r4818
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4820 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-20 12:33:07 +00:00
martin 6a750e6cc0 tools: -v sets ctx->debug only if set more than once. -vv also makes the debug go to stderr.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4818 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-20 07:53:19 +00:00