Commit Graph

243 Commits

Author SHA1 Message Date
Peter Marschall 9d501766b4 opensc-explorer: extend 'random' to allow writing to a file
Accept a file name as a second argument to the 'random' command
to allow storing the generated random bytes to the file given.

Forbid writing binary data to stdout in interactive mode.
2018-09-24 00:03:13 +02:00
Peter Marschall 7a4a9f1951 opensc-explorer: refactor do_put() slightly
Avoid misunderstandings by renaming a variable that refers to an
input file handle from 'outf' to 'inf'.
2018-09-24 00:03:13 +02:00
Peter Marschall 1245b617d1 opensc-explorer: refactor do_apdu() slightly
* limit buffer to SC_MAX_EXT_APDU_BUFFER_SIZE
* fix buffer length calculation to correctly calculate the available space
* add length checks when parsing passed data into buffer
2018-09-24 00:03:13 +02:00
Peter Marschall 58da74bc32 opensc-explorer: refactor do_put_data() slightly
* increase input buffer size
* avoid magic number
* notify caller on error details when parsing fails
2018-09-24 00:03:13 +02:00
Peter Marschall aed4b00145 opensc-explorer: harmonize display of command arguments
* consistently show ellipsis for repeatable arguments as 3 dots
* embrace alternative mandatory arguments with curly braces
* use hyphens instead of spaces within non-literal arguments
  for improved alignment with the manual page
2018-09-24 00:03:13 +02:00
Peter Marschall c69f10c2ab opensc-explorer: add command 'pin_info'
Get information on a PIN or key from the card via sc_pin_cmd()'s
SC_PIN_CMD_GET_INFO functionality.
2018-09-24 00:03:13 +02:00
Frank Morgner 16275c2683 fixed memory leak 2018-07-17 13:31:14 +02:00
Frank Morgner 410cdf0dcc refactored sc_get_challenge
Let sc_get_challenge() do sc_lock() and loop through the card driver's
get_challenge() until enough bytes were collected. The card driver's
get_challenge() now returns the number of bytes collected (less or equal
than requested) or an error code.

- Allow more code re-use.
- PIV driver now uses ASN.1 parser for reading the random bytes
2018-05-23 14:20:28 +02:00
Frank Morgner 01f712d5da
Use explicit locking for OpenSC tools (#1344)
* opensc-explorer: use explicit locking

fixed https://github.com/OpenSC/OpenSC/issues/1043

* opensc-tool: use explicit locking

* pkcs15-crypt: use explicit locking
2018-05-18 23:21:14 +02:00
Peter Marschall 5abe99d228 fix typos
Mass-typo fixing, almost exclusively in comments and text strings.

While at it also fixed a few (very few) grammar errors.
2018-04-15 09:34:45 +02:00
Frank Morgner 6f37229303 opensc-explorer/opensc-tool: Allow extended APDUs 2017-12-04 21:09:26 +01:00
Frank Morgner 04a7075290 fixed compiler warnings 2017-11-09 12:42:29 +01:00
Nuno Goncalves 9eb706ba29 Fix tools interpretation of util_getpass return value
A negative value means a error and not "No PIN entered".

Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>
2017-02-04 22:44:26 +01:00
Michał Trojnara 645780e6d4 NULL parameter check moved to sc_file_free()
This fixes numerous issues where the check is *not* performed,
and also simplifies the code.
2017-01-10 12:46:44 +01:00
Peter Popovec 539c89e581 opensc-explorer: show tag 0x82 for unknown files
For reserved/unknown file type print value of 0x82 tag, instead of "???" string.

closes #918
2016-12-18 12:50:11 +01:00
Ludovic Rousseau e7cbc3ba82 opensc-explorer.c: fix compiler warning
opensc-explorer.c:1727:8: warning: comparison of integers of different signs:
      'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
                if(r > len) {
                   ~ ^ ~~~
2016-02-29 20:19:42 +01:00
Wouter Verhelst 5de1ec4518 Allow ASN.1 decoding if the file seems incomplete
Some cards (e.g., BELPIC) have a hardcoded file length that does not
match the actual file length (e.g., 65535 bytes), and simply return the
data that is actually on the card when asked.

It is useful to still be able to do an ASN.1 decode in that case.

Signed-off-by: Wouter Verhelst <w@uter.be>
2015-12-01 16:20:17 +01:00
Frank Morgner 5e352ea477 Merge pull request #504 from frankmorgner/find_tags
Find tags with GET DATA
2015-08-04 10:32:23 +02:00
Frank Morgner 24d91acf69 opensc-explorer: added command find_tags 2015-07-30 11:29:14 +02:00
Frank Morgner 7cec500e54 added flags to sc_context_t
- is initialized in sc_context_create with parm->flags
- removes members paranoid_memory and enable_default_driver
2015-07-22 17:30:21 +02:00
Frank Morgner 0790969b97 recognize short EF identifier 2015-03-31 18:48:57 +02:00
Viktor Tarasov 1fe9ba1b2f opensc-explorer: if available, print DF name 2013-12-29 19:46:56 +01:00
Frank Morgner 3d0064e983 don't expect the card to specify the file length in generic tools
if sc_file_t.size == 0 we try to read 1024 bytes by default.
2013-09-29 18:52:48 +02:00
Viktor Tarasov 1a972920f0 By default 'default' card driver is disabled ...
'Default' card driver is explicitely enabled for 'opensc-explorer' and 'opensc-tool' tools.
https://github.com/OpenSC/OpenSC/pull/175
2013-08-02 22:01:51 +02:00
Viktor Tarasov 4c1c39f3e4 opensc-tool: add 'call-SM-handler' command
'open' and 'close' handlers of the card's SM driver can be called
2013-01-06 13:13:08 +01:00
Viktor Tarasov 9e9b3d0bd8 tool: in 'do_apdu' increase size of send/receive buffers 2012-11-28 11:09:36 +01:00
Viktor Tarasov 41861e42b0 no 'pace' in common part
'PACE' is extremely card specific protocol and has not to be ostensibly
present in the common part of OpenSC:
 * currently in OpenSC there is no card driver that supports or uses this protocol;
 * amazing content of the common 'sc_perform_pace' -- beside the verbose logs
   the only substantial action is to call the card/reader specific handler.
   According to the current sources and the pull request 83
   this 'common' procedure is called by the card driver or
   card specific tool/operation.
 * currently the 'PACE' can be thouroghly tested only by one person (Frank Morgner),
   and only using the OpenSSL patched with the PACE specific patch.
   So, at least a dedicated configuration option could be introduced when comiting PACE to the common part.
 * common 'sc_perfom_pace' has the same role as the 'initialize-SM' handler of the existing SM framework
   and can be implemented as card specific SM, as the others cards do.
   This confirmed by Frank Morgner, the author of PACE commits and nPA card driver, himself.
   (https://github.com/OpenSC/OpenSC/pull/83)
2012-08-30 18:51:42 +02:00
Peter Marschall feb2b96127 opensc-explorer: allow filename-pattern as argument to 'ls'
Make ls more flexible and more similar to the UNIX ls.
2012-08-19 21:31:32 +02:00
Peter Marschall 4035245649 opensc-explorer: allow longer PINs in CHANGE & UNBLOCK
Harmonize the allowed PIN length in CHANGE & UNBLOCK with the one in VERIFY,
making sure they are large enough for OpenPGP, which allows up ro 32 characters,
and giving additional security margin for other cards.
2012-08-11 21:33:36 +02:00
Viktor Tarasov 71ec763604 opensc-explorer: warnings when compiling with Windows VC
opensc-explorer.c(447) : warning C4101: 'count' : unreferenced local variable
opensc-explorer.c(940) : warning C4013: 'strlcpy' undefined; assuming extern returning int
opensc-explorer.c(1683) : warning C4013: '_isatty' undefined; assuming extern returning int
opensc-explorer.c(1726) : warning C4090: 'function' : different 'const' qualifiers
2012-08-11 20:48:58 +02:00
Peter Marschall 7f22ede919 opensc-explorer: show text message for APDU result 2012-08-11 20:48:58 +02:00
Peter Marschall 95cbfbb799 opensc-explorer: increase allowed bytes in RANDOM
Allow to fetch up to 256 random bytes from the card -
236 being the maximal value for Le in short APDUs.
2012-08-11 20:48:58 +02:00
Peter Marschall ea8a64d95a opensc-explorer: allow entering the PIN interactively
In VERIFY, allow the user to enter the PIN unteractively if it was not given
on the command line, and if the card reader does not support PIN input.

If it was not given on the command line and the card reader supports PIN input,
then the bahaviour is unchanged: enter PIN via card reader.
2012-08-11 20:48:58 +02:00
Peter Marschall 322e3cf403 opensc-explorer: convert CHANGE & UNBLOCK to sc_pin_cmd 2012-08-11 20:48:58 +02:00
Peter Marschall 81695df211 opensc-explorer: use standard usage() everywhere
With the improvements of the man page, there is no need any more to have
local help texts for functions.
2012-08-11 20:48:58 +02:00
Peter Marschall a56bebd952 opensc-explorer: clean-up help text
"asn1 file" -> "ASN.1 file"
2012-06-08 20:32:33 +02:00
Nguyễn Hồng Quân f3955e2475 opensc-explorer: implement put_data
opensc-explorer: use larger buffer for put_data
2012-06-08 20:17:35 +02:00
Viktor Tarasov fbc9bb35dc opensc-explorer: when printing file content read entire file
When reading and printing file content, do not read it by small chunks,
but read an entire file.
It allows to verify how card driver reads the data of maximal size
that is allowed for one transaction ('max_recv_size').
2012-06-01 16:58:47 +02:00
Peter Marschall aca314b1f8 opensc-explorer: remove outdated usage text for verify
Wuth the key types explicitly listed in the usage line,
it is not necessary to list them separately.
2012-05-30 09:39:12 +02:00
Peter Marschall 367ebd94d4 tools: allow arguments to be printed in usage message
Extend util_print_usage_and_die() by a string argument that describes
further arguments to the program.

1st user: opensc-explorer
2012-05-30 09:39:12 +02:00
Peter Marschall 965d44ec40 opensc-explorer: use case-insensitive pin types in PACE 2012-05-30 09:39:12 +02:00
Peter Marschall cd2cdf77f6 opensc-explorer: explicitly mention key types 2012-05-30 09:39:12 +02:00
Peter Marschall 2276c7e7e4 opensc-explorer: do not use hard-coded string length
Determine length of prefix dynamically instead of using a hard-coded, common
value for all prefixes.
2012-05-30 09:39:12 +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
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
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 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 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
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
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
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
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 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
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
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
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
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
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
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
viktor.tarasov 652a1801e0 opensc-explorer: to use AID of maximal allowed length in 'cd' command
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4754 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-22 11:46:33 +00:00
viktor.tarasov 8aa2a64261 opensc tools: to be compiled with Visual Studio
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4716 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-13 08:08:42 +00:00
ep f5ef30bdd7 Pass SFI as an appropriately-sized number
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4676 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-02 22:58:31 +00:00
ep 6474853217 Support reading record files by SFI
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4641 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-21 20:12:59 +00:00
ep cba47b33bf Only free current_file if it is set
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4640 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-21 20:12:56 +00:00
ep fd396a0546 Refactored the "select the file referenced by current_path; die on error" idiom in opensc-explorer.
This version, additionally, skips this step entirely if there is no current_path; this is useful when starting with --mf "".

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4638 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-20 22:51:42 +00:00
ep 4e726bd09b Fix and document opensc-explorer's new -m, --mf option
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4637 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-20 22:51:39 +00:00
ep b279287701 strlcat(3) implementation
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4634 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-18 13:42:26 +00:00
martin 409284ed60 opensc-tool: Fix ACL reporting for EF-s. Patch by Emanuele Pucciarelli.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4623 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-14 12:18:27 +00:00
viktor.tarasov 765ea98cfb tools opensc-explorer: for 'apdu' command accept space separated hexadecimal data
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4500 c6295689-39f2-0310-b995-f0e70906c6a9
2010-07-01 12:31:52 +00:00
flc a4df57eb4d --wait option don't need argument
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4335 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-11 14:30:15 +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
martin 5a0cc50123 tools: remove slots; implement change in sc_disconnect_card(); convert util_connect_card()/--wait to support the changes in r3931
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3933 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-24 15:29:47 +00:00
viktor.tarasov 44e94c8c94 opensc-explorer: remove debug messages
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3882 c6295689-39f2-0310-b995-f0e70906c6a9
2009-12-03 11:59:48 +00:00
viktor.tarasov 6ff96b8c66 pinpad support of PIN changing and unlocking
Oberthur and opensc-explorer


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3880 c6295689-39f2-0310-b995-f0e70906c6a9
2009-12-03 11:11:04 +00:00
viktor.tarasov a8dc5bdeef opensc-explorer::do_apdu() number of bytes in printed message 'Sending'
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3849 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-14 21:55:17 +00:00
martin 533a33521f * Update opensc-tool and opensc-explorer man pages
* Remove not implemented pksign/pkdecrypt commands from opensc-explorer. Use pkcs15-crypt instead.


git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3843 c6295689-39f2-0310-b995-f0e70906c6a9
2009-11-13 14:51:32 +00:00