Commit Graph

30 Commits

Author SHA1 Message Date
Peter Marschall 4dbfc77eba opensc-explorer: extend do_asn1() to accept offsets
Have do_asn1() accept an optional parameter indicating an offset.
If this is given then start ASN.1-decoding the file/record at this offset.
2020-08-23 22:46:26 +02:00
Peter Marschall 45e7039940 opensc-explorer: extend do_asn1() to decode records
Have do_asn1() accept an optional parameter indicating a record number.
If this is given and the file is a record-oriented file, then ASN.1-decode
the record requested.
2020-08-23 22:46:26 +02:00
Peter Marschall d345c65a5d opensc-explorer: extend do_cat()
Have do_cat() accept an optional second parameter indicating a record number.
If this is given and the file is a record-oriented file, only print the record
requested.
2020-08-23 22:46:26 +02:00
Peter Marschall 5714dbfa08 opensc-explorer: add function 'get_record' 2020-06-05 14:48:08 +02:00
Peter Marschall 5da40bf027 opensc-explorer: make '--card-driver ?' list all available drivers
Make opensc-explorer a bit more user friendly by treating the question mark
given as argument to option '--card-driver' special: list all available
drivers instead of stupidly bailing out.
2020-01-12 09:36:49 +01:00
Frank Morgner b11cc3871e tools: harmonize card initialization 2018-12-18 14:50:45 +01:00
Peter Marschall 9616ad4d94 opensc-explorer: fix&clarify handling of interactive mode
* make 'interactive' a global variable
* set it when opensc was called with the SCRIPT argument
* document the behaviour in the manual page

Make interactive a global variable and set it in main.
2018-09-24 00:03:13 +02:00
Peter Marschall c9db3f7385 opensc-explorer: allow arguments for 'help'
When arguments are given, compare them like ambguous_match() does,
and show the matching ones only.

Add documentation of the 'help' command to the manual page.

In main loop on multiple matches, show help on matching commands only.
2018-09-24 00:03:13 +02:00
Peter Marschall bd97c2b139 opensc-explorer: clarify command parsing in manual page 2018-09-24 00:03:13 +02:00
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 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 fa2421c89d opensc-explorer: overhaul man page
- harmonize structure
- add missing commands (e.g. '#')
- extend description of commands
- fix description of commands (e.g. 'do_put')
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
Peter Marschall 5a3134556b doc/tools: slight markup improvements
* get rid of hard-coded markup like e.g. { ... | ... } or [ ... ]
  in favour of DocBook's proper tags
* use tags better matching the purpose,
  e.g. use <filename class"directory"> instead of <command> for directories
* improve consistency in <replaceable>s
2018-06-06 22:43:46 +02:00
Frank Morgner 1798bbe692 manuals: added missing "Authors" section 2018-05-16 13:43:25 +02:00
Frank Morgner 99eed0aa82 pkcs15-init: documented remaining commandline switches
fixes https://github.com/OpenSC/OpenSC/issues/1267
2018-05-04 23:38:24 +02:00
Frank Morgner 24d91acf69 opensc-explorer: added command find_tags 2015-07-30 11:29:14 +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 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 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 8583197b6b opensc-explorer docs: various improvements
* document the UNBLOCK function
* format the examples better, and explain what they do
* extend the documentation for CD
2012-07-07 19:00:26 +02:00
Peter Marschall 387da4c793 opensc-explorer: document 'echo' command 2012-06-08 20:17:35 +02:00
Peter Marschall c58e94810b opensc-explorer: update documentation 2012-05-30 09:39:12 +02:00
Peter Marschall 2efc9b76df opensc-explorer: document new command line parameter SCRIPT 2012-05-30 09:39:11 +02:00
Frank Morgner 750d2e9121 cherry-picked from Frank Morgner OpenSC.git and rebased
opensc-explorer: documented `find`
opensc-explorer: documented `pace`
2012-05-16 15:45:08 +02:00
Peter Marschall 9f09113ab7 opensc-explorer.1.xml: sort options & commands alphabetically 2011-08-21 13:47:48 +02:00
Peter Marschall 1bff1c1cc0 opensc-explorer.1.xml: fix typos, more harmonization 2011-08-21 13:47:48 +02:00
Peter Marschall a9c320f8f8 doc/tools/*.xml: more consistent formatting
uUse specific tags:
<command> for commands
<option> for options
<replaceable> for values that need to be replaced with real values
2011-08-21 13:47:48 +02:00
Peter Marschall aa5974bf58 doc/tools/*.xml: include manpage sections in file names
Rename source XML files so that their names contain the manpage sections.
2011-08-20 16:54:35 +02:00