Commit Graph

304 Commits

Author SHA1 Message Date
Peter Marschall
85258f2951 openpgp-tool: use key type to indicate key to generate
Instead of only expecting a key length, and implicitly assuming RSA
as the key algorithm, introduce option --key-type to pass the key type
as a string.

When generating the key determine key algorithm and attributes based on
the key type passed.

If no key was given, default to "rsa2048".
2018-11-06 12:41:19 +01:00
Peter Marschall
c9f5e05aca openpgp-tool: new option --key-info to display key info 2018-11-06 12:41:19 +01:00
Peter Marschall
1866c3e930 openpgp-tool: new option --card-info to display card info 2018-11-06 12:41:19 +01:00
Jakub Jelen
9a853176b8 pkcs11-tool: Support for signature verification
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
2018-09-30 21:23:27 +02:00
Jakub Jelen
fb94b639bc doc: Fix the pkcs11-tool example
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
2018-09-30 21:23:27 +02:00
Peter Marschall
f471048ef7 remove source-less doc/tools/files.html
The current version, which gets re-generated from XML source, is in doc/files/.
2018-09-30 18:40:55 +02: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
Frank Morgner
129946ca96 pkcs11: CKF_WRITE_PROTECTED based on card's read_only flag
uses `md_read_only` as `read_only` for both, PKCS#11 and Minidriver
2018-09-14 08:23:08 +02:00
Frank Morgner
012a425819 fixed generating files documentation 2018-09-05 23:18:55 +02:00
Frank Morgner
62a2847300 add missing files.xml to distribution 2018-09-04 13:55:19 +02:00
Frank Morgner
849c9785e3 added missing rule for opensc.conf.5.xml 2018-08-09 15:46:53 +02:00
Frank Morgner
80d44a5b99 use proper prefix in documentation 2018-08-05 12:28:50 +02:00
Frank Morgner
cd557df54d md: change semantics of cancelling the PIN pad prompt
md_pinpad_dlg_allow_cancel now defines whether or not the user is asked
before verifying the PIN on the PIN pad. This can be denied without
interaction with the PIN pad. A checkbox in the dialog allows the user
to change this setting, which is saved in the registry by the path of
the process.

This change fixes the progress bar to match the actual configured
timout. The progressbar now fills instead of running empty, which seemed
less frightening for most users.

This change also fixes some copy/paste errors in the documentation of
opensc.conf(5).
2018-08-05 11:35:12 +02:00
Frank Morgner
47ee3a3978 added manual page opensc.conf(5)
splits the HTML documentation into files.html and tools.html
2018-07-17 14:49:27 +02:00
Sean Enck
0ceef8778b Fixes #1421, when a tool has no OPTSWITHARGS it will produce invalid bash (completion) output syntax 2018-07-11 10:03:50 +02:00
Frank Morgner
88de66bb13 fixed make distcheck 2018-07-04 18:12:58 +02:00
Stanislav Brabec
b0a20fa7ca Use correct bash-completion path
Recent versions of bash is leaving /etc/bash_completion.d. The correct
directory is specified by pkg-config --variable completionsdir
bash-completion.

Fixes https://github.com/OpenSC/OpenSC/issues/1403
2018-07-04 09:50:07 +02:00
Peter Marschall
184bc137cd OpenPGP: extend & sort man page
Also try to consolidate the coding style a bit
2018-06-06 22:43:46 +02:00
Peter Marschall
85468868fb man pages: add missing options to make test-manpage.sh happy 2018-06-06 22:43:46 +02:00
Peter Marschall
dbe2fcef2c test-manpages.sh: make more robust & more easily readable
Call the tools to be tested with option '--help' to avoid
triggering automatic actions when no option is given.

Exampleswhy the old behaviour is bad:
- opensc-notify: blocks the build
- opensc-explorer: tries to open the card
2018-06-06 22:43:46 +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
Peter Marschall
98c9a1588b doc/tools/tools.xml: sort, remove duplicates, add new tools 2018-06-06 22:43:46 +02:00
Peter Marschall
ad6b46ea45 doc/tools: add DocBook sources for new tools
* egk-tool.1.xml
* npa-tool.1.xml
* opensc-asn1.1.xml
* opensc-notify.1.xml
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
099270092a added documentation of some command line options 2018-04-27 09:23:34 +02:00
Frank Morgner
dd1a606d0d updated tools.xml for inclusion in wiki 2018-04-25 23:43:08 +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
Jakub Jelen
29a27dd6d7 pkcs11-tool: Add examples section to the manual page 2018-04-13 09:28:09 +02:00
Jakub Jelen
a5839bb83c Temporarily disable tests to make CI pass 2018-04-04 21:43:01 +02:00
Jakub Jelen
0c974a0cc7 Incorporate the first manpage integrity check 2018-04-04 21:43:01 +02:00
Jakub Jelen
161e83a243 Add missing pkcs11-tool options to man page 2018-04-04 21:43:01 +02:00
AnthonyA
74885fb1c1 pkcs11-tool: allow mechanism to be specified in hexadecimal
To support vendor mechanisms, let -m accept hexadecimal strings,
e.g., -m 0x80001234
2018-03-31 21:39:53 +02:00
Jakub Jelen
e46193499b Use only 'filename' for file arguments replacements 2018-02-07 11:13:09 +01:00
Jakub Jelen
391ad1db01 Use filename replacement to allow completion 2018-02-07 11:13:09 +01:00
Jakub Jelen
5cb0484ea6 Correctly autocomplete --write-object option 2018-02-07 11:13:09 +01:00
Jakub Jelen
1d49e8e0db docs/tools: Improve bash-completion template and generation
This allows us to generate templates also for arguments expecting
files (input, output) or PKCS#11 modules. The general ideal was
already implemented, but never completed.
2018-02-07 11:13:09 +01:00
Mouse
e4c589639d Add support in pkcs11-tool and pkcs11-spy for RSA-OAEP (#1169)
* Add RSA-OAEP documentation
* Add definitions and structures needed for RSA-OAEP
* Add ability to display RSA-OAEP parameters to SPY

Closes https://github.com/OpenSC/OpenSC/issues/1170
2017-10-19 22:12:47 +02:00
Jakub Jelen
bdb1961dee Enable RSA-PSS signatures in pkcs11-tool (#1146)
* Add missing SHA224 RSA algorithms

* Fix wrong replacement in pkcs11-tool manual page

* Add MGF and PSS_PARAMS definitions in PKCS#11 header file

* Inspect PSS signature parameters in pkcs11-spy

* Enable RSA-PSS signatures in pkcs11-tool

* Added short names to RSA-PSS methods

* Reintroduce portable NORETURN indication for functions and use it to avoid compilers complaining
2017-09-21 11:19:22 +02:00
Timo Teräs
00a710b939 pkcs15-tool: add documentation for secret key options 2017-06-13 10:40:36 +02:00
Frank Morgner
8da29d4a1e pkcs15-tool: documentated --clear-cache 2017-03-28 14:24:13 +02:00
Maciej S. Szmigiero
1479c4cb3b Add reset operation to opensc-tool
Add "--reset" parameter with optional argument to opensc-tool which
resets a card in reader. Both cold or warm resets are possible
(cold is default).

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2017-03-27 11:05:16 +02:00
Christoph Müllner
c77cb511d9 pkcs11-tool: Add feature to get random data. (#995)
* pkcs11-tool: Add feature to get random data.

Getting random data is an essential part of the PKCS11 API.
This patch provides a new command line parameter to get
random data from the pkcs11-tool.

Tested with a Yubikey (PIV applet) and the following command line:

$ pkcs11-tool --slot=0 --generate-random=128 | hexdump -C
  00000000  0c 35 85 2e 85 68 ab ce  e8 56 b3 f6 f3 33 e6 37  |.5...h...V...3.7|
  00000010  12 10 eb fd 8a 1e 75 b7  3f 4d fa 61 8f ab d8 bf  |......u.?M.a....|
  00000020  f7 2c 7d ba 07 a5 45 6e  a7 85 1c 47 3b 46 01 2c  |.,}...En...G;F.,|
  00000030  79 18 6e 51 4d c4 ae 20  37 37 1d 7b 7e b0 d5 18  |y.nQM.. 77.{~...|
  00000040  ef a4 3c 09 91 68 db dd  2a a8 fc b9 34 06 2a ee  |..<..h..*...4.*.|
  00000050  5a 86 55 54 11 1f ef 4e  07 73 79 27 0a e4 58 cf  |Z.UT...N.sy'..X.|
  00000060  f4 bd bc 2f ad 27 b1 a7  a4 fa c7 1a 7b 31 de a3  |.../.'......{1..|
  00000070  e8 dc 85 28 18 82 00 45  3c f8 eb 48 a4 20 e4 3b  |...(...E<..H. .;|
  00000080

Signed-off-by: Christoph Müllner <christophm30@gmail.com>

* pkcs11-tool: Add documenation for --generate-random.

Signed-off-by: Christoph Müllner <christophm30@gmail.com>
2017-03-27 10:52:38 +02:00
Nuno Goncalves
68f8f0bfa7 pkcs15-init,pkcs15-tool: reword --no-prompt to --use-pinpad (close #944) (#957)
* pkcs15-init,pkcs15-tool: reword --no-prompt to --use-pinpad (close #944)

Wording was confusing for a novice user. Old option is mantained as an alias,
but will print to stderr a deprecation warning.

Deprecation related code is all marked with deprecated word to easy future removal.

Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>

* pkcs15-init,pkcs15-tool: document --use-pinpad

Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>
2017-02-03 17:01:52 +01:00
Nuno Goncalves
a25a2484f1 pkcs15-tool: add compact output format
Closes https://github.com/OpenSC/OpenSC/pull/900
2016-11-17 09:46:51 +01:00
Frank Morgner
44694a0cf3 pkcs15-tool: implemented --clear-cache (#873) 2016-10-07 14:19:03 +02:00
Frank Morgner
8efca4d6db pkcs15: don't require-L for file caching
File caching is done transparently when the user sets the config option.
2016-07-24 17:19:18 +02:00
Michael Ansel
da4446a822 Relax XML parsing regexes for bash_completion
Unnecessarily strict regex was failing for some unknown reason on OS X. Easier to just relax the regex than understand what's wrong (and then relax the regex).
Fixes #782
2016-06-09 14:34:31 -07:00
Frank Morgner
a1fbf46731 Merge pull request #714 from dengert/fix-Makefile.am
Compile from a separate build directory
2016-06-04 02:02:02 +02:00
Jakub Jelen
bdc840a520 Manual page for gids-tool
Related to https://github.com/OpenSC/OpenSC/pull/651
2016-05-16 11:00:40 +02:00
Jakub Jelen
972a93ab47 pkcs11-tool.1.xml: Add documentation for missing options in pkcs11-tool 2016-04-17 12:56:18 +02:00
Viktor Tarasov
4b51d70969 tools: print OpenSC package version 2016-03-28 20:41:19 +02:00
Doug Engert
82a841162a Compile from a separate build directory
doc/toots/Makefile.am is missing a $(srcdir)

 Changes to be committed:
	modified:   doc/tools/Makefile.am
2016-03-19 19:06:56 -05:00
Viktor Tarasov
36b945aa22 tools: print package revision 2016-03-04 14:16:06 +01:00
Chris Elledge
c56378b8ba pkcs15-crypt: Document defaults of stdin/stdout. 2016-01-21 11:30:26 -05:00
Peter Marschall
6498721076 piv: fix typos in usage & man page 2015-10-15 12:51:19 +02:00
Nicolas Schneider
e9b1b2e9e8 update pkcs15 documentation to describe --raw option 2015-09-04 13:09:54 +02: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
97e41cb76a added completion-template to distribution
fixes #505
2015-07-30 15:23:14 +02:00
Frank Morgner
24d91acf69 opensc-explorer: added command find_tags 2015-07-30 11:29:14 +02:00
Viktor Tarasov
f0189e8378 pkcs11-tool: option to 'decrypt some data' 2015-04-30 15:57:44 +02:00
Frank Morgner
de5c224201 silence some shell commands in Makefile 2015-04-23 00:12:37 +02:00
Viktor Tarasov
17eb40e5f9 doc: add 'signature-format' option for pkcs15-crypt 2015-04-15 09:47:15 +02:00
Dirk-Willem van Gulik
88ec461bc5 tool: RFC4716 compliant key output
Add a comment field to the ssh key output if a label is set on the key. Add RFC4716 compliant key output for the new breed of modern (mobile) SSH clients.

VTA: use short form of log call in iso7816
2015-03-31 19:09:25 +02:00
Lau bakman
1becc45c10 Updated dnie-tool.1.xml for consistency
Experienced a problem with dnie-tool where I would receive a warning with the content of /etc/bash_completion.d/dnie-tool.

The cause of the error was a missing case label which in turn was caused by the formatting of the dnie-tool.1.xml.

Options were formatted like <term><option--xarg, -x</option></term> which were not handled by the sed regular expression in the makefiles.

Modified the dnie-tool.1.xml file to be consistent with the other doc files and to generate the dnie-tool file correctly.
2015-03-11 18:22:56 +01:00
Frank Morgner
aa45685e0b fixed documentation of dnie-tool 2014-11-04 22:23:01 +01:00
Frank Morgner
4459e146c4 use util_get_pin in tools 2014-11-04 22:07:07 +01:00
Sumedha Widyadharma
e63f40c2d3 tools: Add util_get_pin helper function
Using this helper PINs can be passed via the command line, stdin and an
environment variable.

For now only used in the openpgp tool.

closes #289
2014-11-04 21:54:41 +01:00
Hans-Christoph Steiner
d72324ddf5 generate bash completion scripts from XML doc files
This generates the scripts that lets bash do completion per specific tool.
It gets the options from the documentation XML files that are also the
source for the man pages and HTML.
2014-10-01 20:53:30 -04:00
Andreas Schwier
d1ba6164ad sc-hsm: Added support for token label to be set via C_InitToken or sc-hsm-tool 2014-01-08 16:07:13 +01:00
Ludovic Rousseau
5979e2fed8 Add documentation for --list-token-slots, -T 2013-10-20 13:32:45 +02:00
Ludovic Rousseau
02727a1406 Merge pull request #168 from germanblanco/opendnie
Adding support for DNIe.
2013-08-27 01:52:55 -07:00
German Blanco
63ce563d76 Adding support for DNIe. 2013-06-13 17:31:56 +02:00
Martin Paljak
112092f7dd Fix eidenv manual page: -n is actually -p 2013-05-08 15:22:33 +03:00
Frank Thater
20824e2124 sc-hsm-tool: Added threshold scheme parameters to manpage 2013-02-07 15:07:42 +01: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
Andreas Schwier
ffb20e5916 sc-hsm: Added sc-hsm-tool with DKEK support and key wrap / unwrap 2012-11-11 12:53:03 +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
Viktor Tarasov
2f3ace06ec doc: #329: explicit usage of --id for a new keys is deprecated
'Id' option in the pkcs15-init commands to import/generate a new key
is deprecated. Better s to let the MW to derive an identifier from
the key material.
2012-08-19 20:30:00 +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
Nguyễn Hồng Quân
69e30ead89 openpgp-tool: Key generation support.
openpgp-tool: PIN verfication support.
openpgp-tool: Add notification in case of error.
openpgp-tool: Add manual for key generation and PIN verification.
2012-07-29 12:48:45 +02:00
Peter Marschall
4b9ca80434 tools docu: correct typo, improve style 2012-07-07 19:00:35 +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
0b0aae8bc8 openpgp-tool: remove unnecessary commas in man page 2012-06-16 15:35:04 +02:00
Peter Marschall
56affa612f pkcs15-tool: help text clean-up
"to be binded to " -> "to bind to"
2012-06-08 20:32:33 +02:00
Peter Marschall
387da4c793 opensc-explorer: document 'echo' command 2012-06-08 20:17:35 +02:00
Viktor Tarasov
d7022d3300 ias-ecc: add tool with IAS/ECC specific query operations 2012-06-01 16:58:39 +02:00
Peter Marschall
61ca69c251 OpenPGP: documentation for openpgp-tool 2012-05-30 09:39:12 +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
3b6c985cca westcos-tool.1.xml: sort options alphabetically 2011-08-21 13:47:48 +02:00
Peter Marschall
56a1ab6769 pkcs15-tool.1.xml: sort options alphabetically 2011-08-21 13:47:48 +02:00