Commit Graph

305 Commits

Author SHA1 Message Date
Doug Engert 48a11c0634 Update piv-tool man pages for AES
commit 295c523e4 (William Roberts     2014-07-08 13:52:48)
added support for AES keys to card-piv.c but the man page
for piv-tool that uses the code was never  updated.

 On branch piv-tool-doc
 Changes to be committed:
	modified:   ../../doc/tools/piv-tool.1.xml
2021-05-20 11:07:29 +02:00
Frank Morgner 4ecb4b39ac updated documentation 2021-04-26 18:13:43 +02:00
Frank Morgner 2063a1d334 silince generation of files 2021-04-26 18:13:43 +02:00
Doug Engert f704e4f23e Pkcs11-tool changes to test a modules ability to use threads
Option --use-locking has C_Initialize pass in parameters with the
CKF_OS_LOCKING_OK to tell module to use threads. The default is it passes NULL
which says threads are not needed.

The following is not designed to be used by the general user. There are for debugging
and test scripts and only compiled if the system has threads.

    Option --test-threads <arg> can be passed multiple times. Each one starts a thread.
    <arg> is a list of 2 byte commands seperated by ":". The thread will execute these.
    Current commands are:
       IN - C_Initialize(NULL)
       IL - C_Initialize with CKF_OS_LOCKING_OK
       Pn - Pause for n seconds
       GI - C_GetInfo
       SL - C_GetSlotList
       Tn - C_GetTokenInfo  from slot_index n

These are just enough calls to see if threads are working in the module.
Output is written to stderr.

 Changes to be committed:
	modified:   doc/tools/pkcs11-tool.1.xml
	modified:   src/tools/Makefile.am
	modified:   src/tools/pkcs11-tool.c
2021-01-26 12:50:39 +01:00
Doug Engert d369965a7f pkcs11-tool support key-gen for GENERIC secret key
Fixes #2139

Added code to support  mechanism GENERIC-SECRET-KEY-GEN.

Improved --help  and doc/tools/pkcs11-tool.1.xml because key gen
of symmetric keys pass CKA_VALUE_LEN which is length of key in bytes.

Tested with:

./pkcs11-tool --module /usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so \
 --login --label generic-64 --keygen --key-type GENERIC:64 \
 --mechanism GENERIC-SECRET-KEY-GEN

./pkcs11-tool --module /usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so --login -O
2021-01-26 12:34:15 +01:00
Peter Popovec 26adaf519c man page update, info about generating EC keys
modified:   doc/tools/pkcs15-init.1.xml
2021-01-26 10:51:44 +01:00
Peter Popovec a3ca7613cd MyEID: opensc.conf - option to disable PKCS1 padding in card.
config option for MyEID:  "disable_hw_pkcs1_padding"

If user set this option to non zero, OpenSC is forced to calculate padding
in software. This will allow users to use RSA 1024 with SHA512.
2021-01-26 00:27:47 +01:00
Jakub Jelen 7f9e8ba85c pkcs11-tool: Add option to list PKCS #11 3.0 interfaces 2021-01-11 14:49:22 +01:00
Jakub Jelen 8a6708c163 doc: Update documentation about the cache location 2020-11-25 09:26:18 +01:00
Conrado P. L. Gouvea 40da5cace2 pkcs11-tool: add --allow-sw flag that removes CKF_HW and allows using software tokens 2020-09-28 12:59:58 +02:00
Hans-Christoph Steiner 410012f100 add env vars to bash completion for PIN-related options 2020-09-22 22:48:00 +02:00
Hans-Christoph Steiner 644eae691d standardize <replaceable> PIN names in man pages
This makes all PIN-related options use the exact same term throughout the
man pages.
2020-09-22 22:48:00 +02:00
Peter Marschall 16c889cf7d spelling fixes
Fix various spelling errors, mostly in comments but also in texts displayed.

Errors found & interactively fixed using 'codespell', with additional manual
checks after the fixes.
2020-08-30 10:35:14 +02:00
Ludovic Rousseau 8ada99b4d3 Fix spelling error
Thanks to Debian lintian:
I: opensc: typo-in-manual-page usr/share/man/man5/opensc.conf.5.gz
developement development
2020-08-29 23:30:32 +02:00
Ludovic Rousseau a70b082a09 Fix spelling error
Thanks to Debian lintian:
I: opensc: spelling-error-in-binary usr/bin/egk-tool arguement argument
2020-08-29 23:14:49 +02:00
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
Jakub Jelen 0defebfe05 doc: Recommend pin caching in combination with pin_cache_ignore_user_consent configuration option 2020-07-03 17:55:24 +02:00
Peter Marschall 5714dbfa08 opensc-explorer: add function 'get_record' 2020-06-05 14:48:08 +02:00
Piotr Majkrzak d4a9405bf4
Initial support for Polish eID card (e-dowód, eDO) (#2023) 2020-05-19 14:05:13 +02:00
Jakub Jelen 797414be05 Create missing man pages (goid needs some work) 2020-05-07 02:34:12 +02:00
Jakub Jelen b091165595 doc: Drop trailing comma 2020-05-07 02:34:12 +02:00
Frank Morgner c212776f45 fixed dashes 2020-02-27 23:12:54 +01:00
Frank Morgner 261e0b6b0d unified documentation of handling PIN/PUK on CLI 2020-02-27 23:12:54 +01:00
Frank Morgner 6b1770e7ad pkcs15-init: removed --options-file
use an environment variable to pass a hidden PIN code instead of the
options file

fixes 13814 Resource leak as reported by Coverity Scan
2020-02-27 23:12:54 +01:00
Frank Morgner 0cd19b59e1 pkcs11-tool: add --usage-wrap (disabled by default)
fixes https://github.com/OpenSC/OpenSC/issues/1913
2020-02-01 22:29:35 +01:00
Peter Marschall a0adbc9ef2 dnie-tool: cleanup
- remove command line option '--card-driver';
- instead force driver 'dnie' and fail if card is not a DNIe card
- overhaul option parsing
  - remove unused variable 'long_optind'
  - bail out with usage message on all unknown/unhandled args
  - correctly terminate option parsing (no infinite loop)
- slight refactoring
  - avoid magic constant '0x0f'
  - make variable 'tries_left' more local
  - move dependent code into if block
2020-01-12 09:42:09 +01:00
Peter Marschall 58ecb4aba2 cardos-tool: cleanup
- remove command line option '--card-driver';
- instead force driver 'cardos' and fail if card is not a CardOS card
- overhaul option parsing
      - remove unused variable 'long_optind'
      - bail out with usage message on all unknown/unhandled args
      - correctly terminate option parsing (no infinite loop)
2020-01-12 09:40:54 +01:00
Peter Marschall 04f4f589a1 piv-tool: cleanup
- remove command line option '--card-driver';
- instead force driver 'PIV-II' and fail if card is not a PIV card
- overhaul option parsing
  - remove unused variable 'long_optind'
  - make work option '--reader' ( "r:" was missing in the optstring!!!)
  - bail out with usage message on all unknown/unhandled args
  - correctly terminate option parsing (no infinite loop)
2020-01-12 09:40:53 +01:00
Peter Marschall 5514a0529f dnie-tool: rename option '--driver' to '--card-driver'
Rename option '--driver' to '--card-driver' for increased consistency.

In addition, extend it the same way opensc-explorer was extended. I.e.
treat the question mark given as argument to option '--card-driver'
special: list all available drivers instead of stupidly bailing out.

In contrast to opensc-tool and opensc-explorer, which are card-agnostic,
I am not sure whether the option '--card-driver' makes sense on this
card-specific tool.
2020-01-12 09:36:49 +01:00
Peter Marschall a10368769c cardos-tool: make '--card-driver ?' list all available drivers
Extend cardos-tool the same way opensc-explorer was extended. I.e.
treat the question mark given as argument to option '--card-driver'
special: list all available drivers instead of stupidly bailing out.

In contrast to opensc-tool and opensc-explorer, which are card-agnostic,
I am not sure whether the option '--card-driver' makes sense on this
card-specific tool.
2020-01-12 09:36:49 +01:00
Peter Marschall 30fdc7de4a piv-tool: make '--card-driver ?' list all available drivers
Extend piv-tool the same way opensc-explorer was extended. I.e.
treat the question mark given as argument to option '--card-driver'
special: list all available drivers instead of stupidly bailing out.

In contrast to opensc-tool and opensc-explorer, which are card-agnostic,
I am not sure whether the option '--card-driver' makes sense on this
card-specific tool.
2020-01-12 09:36:49 +01:00
Peter Marschall 94288b438e opensc-tool: make '--card-driver ?' list all available drivers
Extend opensc-tool the same way opensc-explorer was extended. I.e.
treat 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
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
Arnout Engelen a3ee8cefc8 Generate consistent docbook id's 2019-11-01 14:23:40 +01:00
Vicente Jimenez Aguilar d4a97c6959 [DOC] dnie-tool -a option includes sw version 2019-09-16 13:50:10 +02:00
Peter Popovec 426772298a pkcs15-tool: inconsistent -r option fix
Option -r is used in other opensc tools to specify card reader.  pkcs15-tool
uses -r to specify cerfificate.  This fix intorduces warning message if -r
is used, and for future versions of pkcs15-tool -r is used to specify
reader.
2019-08-05 01:14:35 +02:00
Jakub Jelen 368563ddd6 doc: Fix the description of switch in manual page (copy&paste error) 2019-06-17 12:49:11 +02:00
Raul Metsma 3a192e2c87 pkcs11-tool: Add extractable option to key import
Signed-off-by: Raul Metsma <raul@metsma.ee>
2019-06-03 10:59:58 +02:00
Raul Metsma 91a1dd9af4 Option to delete object by index
Signed-off-by: Raul Metsma <raul@metsma.ee>
2019-04-17 14:38:40 +02:00
Jakub Jelen fc4d600634 pkcs11-tool: Allow to set CKA_ALLOWED_MECHANISMS when creating an objects
Also list them in the attributes listing
2019-04-08 11:15:19 +02:00
Frank Morgner 71b85d15e4 opensc.conf: Configure handling of private_certificate
possible choices: ignore, protect, declassify

fixes https://github.com/OpenSC/OpenSC/issues/1430
2019-03-13 21:18:57 +01:00
opensignature 84f0a88edb Remove postecert and infocamere support because no longer issued (#1584)
* Remove postecert and infocamere support because no longer issued

* Remove wrong changes

* reset NEWS

* EC_POINT_set_affine_coordinates_GFp and EC_POINT_get_affine_coordinates_GFp are
deprecated, use EC_POINT_set_affine_coordinates and EC_POINT_get_affine_coordinates

* If OPENSSL API version is < 3 use old functions EC_POINT_[sg]et_affine_coordinates_GFp

* Move the OpenSSL compatibility stuff to src/libopensc/sc-ossl-compat.h
2019-01-30 22:01:24 +01:00
Jakub Jelen f161c3a178 Remove repeated words from manual pages 2019-01-23 20:41:01 +01:00
Mat e19fe680c4 Add object type "secrkey" to help of --type switch in pkcs11-tool (#1575)
* Add object type "secrkey" to help of --type switch in pkcs11-tool

Reading an object with pkcs11-tool requires the `--type` switch. The help for that switch is currently incomplete as it is missing the (not very friendly named" *secrkey* option used to read out a secret key object.

I have added this information to the help description.

* Update man page

Describe secrkey option of pkcs11-tool's --type switch in man page
2019-01-15 07:32:41 +01:00
Frank Morgner 1eda4c1795 sc-hsm-tool: add support for initializing biometry 2019-01-15 07:31:20 +01:00
Frank Morgner b11cc3871e tools: harmonize card initialization 2018-12-18 14:50:45 +01:00
Jakub Jelen 8fb611bb1c Move the test into separate directory
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
2018-12-06 09:27:50 +01:00
Hannu Honkanen 9e5a324903 Edited according to PR review: CKA_ALWAYS_AUTHENTICATE only associated with private keys. Defined a custom attribute to achieve same functionality with secret keys. Updated man pages. 2018-12-05 12:10:42 +01:00