Commit Graph

137 Commits

Author SHA1 Message Date
Frank Morgner
4fca7d08c1 removed configuration option force_card_driver
Use `card_drivers` or `OPENSC_DRIVER` instead
2018-05-18 12:46:51 +02:00
Frank Morgner
6ab6d7bad9 removed configuration option reopen_debug_file
Simply re-open the debug file every time on Windows and don't do it
everywhere else.
2018-05-18 12:46:51 +02:00
Frank Morgner
5d7ed37246 Removed configuration option paranoid-memory
Don't pretend that we're capable of performing memory locking. The
implementation of that, `sc_mem_alloc_secure()` (also removed), was
almost unused anyway.
2018-05-18 12:46:51 +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
87cdfcb08c OpenPGP: Implemented "keep alive" command 2018-02-07 11:57:48 +01:00
Frank Morgner
74553a5a8f PC/SC: don't reset the card on disconnection
Windows/macOS (minidriver/tokend) handle the authentication status and
perform an explicit logout on shutdown. PKCS#11 standard requires a
session for logging into the card; when closing the session we perform
an explicit logout. Hence, the authentication status should be reset
even if not performing a reset on disconnect.
2018-01-22 15:27:18 +01:00
Raul Metsma
f1aa2a61c9 Cleanup expired EstEID card ATR-s
Signed-off-by: Raul Metsma <raul@metsma.ee>
2017-11-17 10:05:25 +01:00
Frank Morgner
eacb53fc60 added boilerplate for disabling old card driver
currently disabled:
- miocos
- jcop
2017-11-09 12:43:06 +01:00
Frank Morgner
6a4e120b44 md: added default text for role: user+sign 2017-10-17 09:38:19 +02:00
Frank Morgner
498aedd165 Merge remote-tracking branch 'upstream/master' into winui 2017-10-16 15:16:34 +02:00
Frank Morgner
b0a85a1497 opensc-conf: Added notification text for GoID 2017-08-02 19:07:01 +02:00
Frank Morgner
e3604143d1 opensc.conf: added default notification texts 2017-08-02 19:04:52 +02:00
Frank Morgner
417a409406 md: allow user defined data for PIN pad dialog
- use UI framework
- timeout progressbar is running backwards
- cancelling is disabled by default
- removes card specific UI strings, use opensc.conf for that instead
- icon can be loaded by file
2017-08-02 19:02:13 +02:00
HAMANO Tsukasa
3d187d9ac4 documentation for ignore_private_certificate parameter. 2017-08-02 11:23:43 +02:00
Frank Morgner
fcc8ea5939 reader-pcsc: removed cardmod driver
- pcsc driver takes over all the functionality
- no dedicated reader driver config values for cardmod, use application
  specific blocks to define a different behavior for the pcsc reader if
  needed
- removes legacy code; requiring at least libpcsclite 1.6.5

Fixes https://github.com/OpenSC/OpenSC/issues/892
2017-04-20 10:29:30 +02:00
Frank Morgner
013bdcb264 macOS: added support for access via CryptoTokenKit
Binaries still need to be signed with the com.apple.security.smartcard
entitlement. The command should look something like this:

codesign --force --entitlements MacOSX/pcsc.entitlements --sign "Mac Developer" target/Library/OpenSC/bin/*
codesign --force --entitlements MacOSX/pcsc.entitlements --sign "Mac Developer" target/Library/OpenSC/lib/*.dylib
codesign --force --entitlements MacOSX/pcsc.entitlements --sign "Mac Developer" --deep target/Library/OpenSC/lib/opensc-pkcs11.bundle
codesign --force --entitlements MacOSX/pcsc.entitlements --sign "Mac Developer" --deep target/Library/Security/tokend/OpenSC.tokend
2017-04-03 12:30:03 +02:00
Frank Morgner
45a7ea9737 card-npa: moved to internal card drivers 2017-03-20 21:28:48 +01:00
Frank Morgner
40acedcc21 Added support for PIN commands via escape commands
As defined in BSI TR-03119 to issue SCardTransmit (with Uses
Pseudo-APDU) instead of SCardControl (with FEATURE_VERIFY_PIN_DIRECT).
It allows using a very basic PC/SC reader driver without special support
for PIN verification or modification (such as the default CCID driver on
Windows).

Also gets IFD vendor information via escape commands.

PC/SC's Get Uid command is now only triggered if enable_escape = true;
was set by the user to allow disabling wrapped commands on broken
readers (see https://github.com/OpenSC/OpenSC/issues/810)
2017-03-20 21:28:48 +01:00
Frank Morgner
a4f64d9439 Added (external) card driver for German ID card
(Imported libcardnpa from https://github.com/frankmorgner/vsmartcard)

- Added generic SM implementation of ISO/IEC 7816-8
- Added implementation of extended access control as defined by
  - BSI TR-03110
  - ICAO Doc 9303
  - ISO/IEC 7501
- Added tool for German ID card (and other EAC tokens)
- renamed folder libsm to sm
2017-03-20 21:28:48 +01:00
Frank Morgner
e7f118d797 config: added disable_popups for internal UI
closes #916
2016-12-18 12:38:28 +01:00
Viktor Tarasov
f0f453781e tools: fix segfault with verbose log into 'stderr'
Issue #824

In Windows, file handles (including 'stderr', 'stdout') can not be shared
between DLL-s, and so, the log handle (File *), defined in one module, cannot
be reused in another.

That is the situation when, for example, the SM is processed
in external, dynamically loadable module as it currently implemented for
IAS/ECC card.

That's for the configuration option 're-open of log file on each message' was
introduced.

This 're-open' logic has not been tested in the particular case of opensc-*
tools used with verbose log into 'stderr' -- in dynamically loaded module the
'stderr' handle, defined in the 'main' module, was not recognized as 'stderr'
and there was an attempt to close it.

closes #910
2016-12-18 11:31:00 +01:00
Frank Morgner
6dc6d4c05d Documented reader's max_recv_size/max_send_size
Closes https://github.com/OpenSC/OpenSC/issues/802
2016-10-07 14:13:53 +02:00
Viktor Tarasov
e95b515163 reader: by default only short APDU supported
default values of reader's max send/receive sizes correspond to only short APDU supported;
these values can be overwritten by reader itself with the proper value of dwMaxAPDUDataSize from TLV properties,
or with the corresponding options in OpenSC configuration.

resolves issue #735
2016-04-26 18:26:43 +02:00
Viktor Tarasov
00bdf446d9 config: remove plug_and_play parameter 2016-03-31 15:06:21 +02:00
viktorTarasov
a5550f980b Merge pull request #706 from frankmorgner/npa-generic
generic changes from #611
2016-03-10 11:04:12 +01:00
Andreas Schwier
3b330c6e98 Add minidriver options documentation 2016-03-10 10:37:18 +01:00
Andreas Schwier
29ccc2960d sc-hsm: Enable minidriver read/write support 2016-03-10 10:37:11 +01:00
Frank Morgner
2e92ba8b70 use a conditional lib prefix for dll/so 2016-03-07 10:39:42 +01:00
Frank Morgner
c3527f4a5b fixed dylib extensions 2016-03-07 10:39:42 +01:00
Viktor Tarasov
b8c3722bf5 pkcs11/framework: no more 'for-applications' mode for slot creation
Simplify create tokens rules, no need to manipulate applications in
'pkcs11' configuration part,
applications can be enabled/disabled on the 'pkcs15' one.

Fix the possibility to expose only 'sign' PIN
2016-02-24 13:39:27 +01:00
Viktor Tarasov
754eaf3c14 config: allow disabling of PKCS15 application 2016-02-16 16:54:14 +01:00
Frank Morgner
83ef753799 Implemented atomic PKCS#11 transactions 2015-12-06 10:42:45 +01:00
German Blanco
d45c96106a Adding configuration of pinentry application for DNIe. 2015-11-10 09:37:39 +01:00
Frank Morgner
1480a4ef4a use one configuration file for all systems 2015-10-01 12:44:41 +02:00
Frank Morgner
a4ca19019e Documented whitelisting drivers with opensc.conf
closes https://github.com/OpenSC/OpenSC/issues/358
2015-10-01 12:44:41 +02:00
Frank Morgner
7b677837a0 Always uses tabs instead of spaces in opensc.conf 2015-10-01 12:44:41 +02:00
Frank Morgner
f252277fab Add configuration for sloppy PKCS#11 initialization 2015-10-01 12:44:41 +02:00
Andreas Kemnade
c9efb2f643 make file cache dir configurable
in cases where you use pam_pkcs11, HOME might not be set
so paths based on $HOME are not usable, so that the combination
of home and caching does not work. Having the paths configurable
(together with a good setting of access rights)
resolves that problem.
2015-09-02 10:34:35 +02:00
Frank Morgner
6d21903c90 documented pkcs11_enable_InitToken flag 2015-07-27 19:10:34 +02:00
Thomas Calderon
435291f216 iasecc: initial support for Morpho IAS Agent Card
* This commit adds initial support for Morpho French Agent card which is an
    IAS card. Signature operations are working. Since my test card was
    read-only, I was unable to test object management functions.

  * Add missing copy of AID in structure
2015-03-29 12:10:55 +02:00
Raul Metsma
55bb8e9ff8 New generation card-s don't have issues with T1 and 3.5 card with same ATR has issues with T0 (recursive GET BINARY/GET DATA) 2014-06-09 15:46:13 +02:00
Raul Metsma
8e13acf51e Restore pkcs11 onepin module for Firefox usage 2014-05-31 21:15:19 +02:00
Nikos Mavrogiannopoulos
7796d2c95c Mention that create_slots_for_pins can be used to get opensc-onepin behavior. 2014-04-21 13:40:26 +02:00
Viktor Tarasov
3f023d3342 pkcs15: PIN value not validated in pkcs15-verify
In pkcs15-verify the value of PIN is not more validated for conformity with PIN policy,
value is only checked for maximal allowed length.

So that, no more need of 'ignore-pin-length' configuration option - now it's default behavior of common framework.
2014-01-19 19:19:17 +01:00
Viktor Tarasov
15f694f85d pkcs11: introduce 'ignore-pin-length' config option
When doing C_Login default behavior is to ignore the applied PINs with lengths less
then value of PKCS#15 PIN attribure 'min-length'. Such a PINs are not
really verified by card.

With 'ignore-pin-length' option in 'true' all applied PINs are verified by card.
2013-12-29 22:00:28 +01: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
Doug Engert
a3b516a1e1 Add pin_cache_ignore_user_consent parameter to opensc.conf
When OpenSC is used with a card that enforces user_consent
and the calling PKCS#11 application does not understand how
to handle the CKA_ALWAYS_AUTHENTICATE, signature operations
will fail.

OpenSC will not cache a PIN that protects a user_consent
object as one would expect.

This mods allows PINs to be cached even if protecting a
user_consent object by adding
 pin_cache_ignore_user_consent = true;
option in opensc.conf.

Thunderbird is the prime example of this situation.
Mozilla has accepted mods (357025 and 613507) to support
CKA_ALWAYS_AUTHENTICATE that will appear in NSS-3.14 but
this may be some time before this version is in vendor
distribution.
2012-08-12 00:11:03 +02:00
Viktor Tarasov
78fe16654e pkcs15init: iasecc: create objects for minidriver support
- Create/delete the PKCS#15 'DATA' objects destinated to supply support of minidriver. For a while only 'Gemalto' style of such support is implemented.
- Declare epass2003 pkcs15init operations.
- include into OpenSC configuration the SM related sections
2012-06-08 20:17:36 +02:00
Viktor Tarasov
d1cf65754b pkcs11: no more 'hacked' mode and 'onepin' module version
'OnePIN' version of opensc-pkcs11 module is not installed.
Instead, in the 'pkcs11' section of OpenSC configuration,
there is a possibility to define in a different manner
how to create slots for the present PINs and applications.
2012-05-21 19:19:38 +02:00
Stef Walter
00e02359a3 libopensc: Add 'paranoid-memory' setting for behavior when mlock() fails
* Setting paranoid-memory to true, and mlock() fails, then
   allocations which require non-pageable memory will return NULL
2012-02-17 10:02:55 +01:00