Commit Graph

90 Commits

Author SHA1 Message Date
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
martin 44cf3d06ae MiniDriver: rename cardmod to minidriver in source.
Also change some grammar, whitespace (reported by git) and wording (Opensc->OpenSC) issues.
Add some comments here and there.

See http://www.opensc-project.org/pipermail/opensc-devel/2011-April/016261.html

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5329 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-12 07:40:12 +00:00
andre 69c846f904 libopensc: Re-defines SC_CARD_FLAG_ONBOARD_KEY_GEN to be local to the file card-flex.c, because that flag is used nowhere else. In principle, this patch only reverts some changes made by r2192.
Relates to #296.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5312 c6295689-39f2-0310-b995-f0e70906c6a9
2011-04-08 13:30:32 +00:00
vtarasov 33f44f8dc1 pkcs15: pin references are always positive integers ...
In the OpenSC versions previous to 0.11.5 the references greater then
127 were erroneously encoded by one byte (negative value ecording to the
ASN.1 rules).
Actually some other proprietary PKCS#15 cards have also this infirmity.

Actual commit makes general the application of the hack used for 'starcos' card.

http://www.opensc-project.org/pipermail/opensc-devel/2011-February/016062.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5220 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-06 12:35:35 +00:00
martin d59197748c EstonianEid: Force T=0 for the newest ATR as well.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5216 c6295689-39f2-0310-b995-f0e70906c6a9
2011-03-01 11:19:45 +00:00
vtarasov 16ca4b05f8 opensc.conf: by default comment out all IAS/ECC specific configuration lines ...
http://www.opensc-project.org/pipermail/opensc-devel/2011-February/016013.html


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5205 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-17 09:36:36 +00:00
vtarasov e02becc6e2 IAS/ECC: for the IAS/ECC cards include into the OpenSC configuration the 'card_atr' sections
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5199 c6295689-39f2-0310-b995-f0e70906c6a9
2011-02-16 11:01:46 +00:00
andre 5405d74d19 opensc.conf.in: clean up white spaces
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5105 c6295689-39f2-0310-b995-f0e70906c6a9
2011-01-18 04:43:32 +00:00
andre 83f393ff0d opensc.conf: Better wording of comments on max_x_size.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4950 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-14 03:16:37 +00:00
andre eeee3f926f opensc.conf: Lower the level of emphasise on the max_x_size options. Users with USB devices really shouldn't care about them.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4947 c6295689-39f2-0310-b995-f0e70906c6a9
2010-12-14 01:30:03 +00:00
martin 113dfda494 EstEID: add support for v 3.0 cards with 2048b keys
* Detect different cards based on ATR-s and on card objects
 * Set the card name from the ATR table
 * Conditionally add support for 2048b keys
 * Add workarounds for broken MULTOS and JavaCard cards.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4893 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-29 14:22:01 +00:00
martin c1c3aa1d55 PC/SC: make (dis)connect actions configurable, SCardDisconnect, SCardEndTransaction and SCardReconnect
actions can now be configured via opensc.conf in better detail.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4891 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-29 13:56:19 +00:00
martin 6fc7e62f20 conf: correct comments about OpenSC.tokend score meaning and default value.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4889 c6295689-39f2-0310-b995-f0e70906c6a9
2010-11-29 13:34:54 +00:00
martin df639efd89 EstonianEid: revert to old behavior and have the T=0 forcing.
Some cards have incorrect ATR-s and can cause troubles if pcsc-lite by default tries to set T=1 by default.

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4834 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-28 13:11:13 +00:00
martin 31b0a05aaf EstonianEid: document more ATR-s in opensc.conf
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4832 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-28 05:30:09 +00:00
martin 6648255cb0 EstonianEid: add a broken EstEID ATR to the Micardo driver. Don't force a protocol for EstEID cards
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4825 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-22 15:48:04 +00:00
flc 3076fe265c Fix patch [4709] for cardmod until build in one static dll
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4808 c6295689-39f2-0310-b995-f0e70906c6a9
2010-10-15 08:07:34 +00:00
martin 72d961beb2 Fix #216: initial go with multiple reader subsystem removal.
* One sc_context has only a single reader driver.
 * remove dynamic reader driver loading capabilities
 * remove opensc-tool -R command
 * change the internal API, we don't need to pass around a "driver data" pointer as it can be found directly from the context.
 * check in ./configure for only a single enabled reader driver

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4709 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-11 13:00:47 +00:00
martin 59a389757e opensc.conf: Better comment for max_send/recv_size meaning and default values.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4669 c6295689-39f2-0310-b995-f0e70906c6a9
2010-09-01 11:50:35 +00:00
martin 5f518a96be Update OpenSC.tokend related default config file entries.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4649 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-25 08:40:54 +00:00
martin 9a63e03e9a pkcs11/pkcs15-init: remove automagic software key generation. Remove software based secret key handling from PKCS#11.
Support for importing cleartext keys is left untouched, but all transparent key generation by either opensc-pkcs11.so or pkcs15-init is removed, to make the operation with cleartext keys visible to the user and his explicit wish.
OpenSC is a PKCS#11 library for accessing keys protected by a smart card. Key material in software is not protected by smart cards and can leave a false sense of security to the user.

http://www.opensc-project.org/pipermail/opensc-devel/2010-April/013877.html

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4646 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-23 14:47:07 +00:00
martin b1ff1abb1b Fix and change ignored readers feature introducsed in r4626 for Windows. strcasestr is GNU specific extension.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4630 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-16 08:59:14 +00:00
ep 71cdef0ed2 New card driver: Italian CNS/CIE (eID)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4627 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-16 00:56:27 +00:00
martin a938d3b67f Implement simple reader ignoring, to exclude readers from OpenSC PKCS#11 module.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4624 c6295689-39f2-0310-b995-f0e70906c6a9
2010-08-15 09:33:18 +00:00
viktor.tarasov ffc9f8efc6 pkcs11: by default do not lock login
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4359 c6295689-39f2-0310-b995-f0e70906c6a9
2010-05-19 08:17:53 +00:00
aj 02768fb5dc remove "split-key" option and emulat sign for sign,decrypt keys with padding
and decrypt() for cardos.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4113 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-13 22:52:51 +00:00
viktor.tarasov 6cb0c93ee3 pkcs11: configuration option to report as zero the CKA_ID of CA certificates
In fact, the middleware of the manufacturer of the gemalto (axalto, gemplus) cards
reports the CKA_ID of CA certificates as '0'.

But it's not true for the others middlewares (Oberthur), NSS (afais) and PKCS#11 standard.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4097 c6295689-39f2-0310-b995-f0e70906c6a9
2010-03-09 16:57:39 +00:00
flc 3d23ea782b cardmod updates:
- Add comment to opensc.conf
- Use opensc log in cardmod
- Minor corrections on cardmod pcsc driver


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4036 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-17 07:51:52 +00:00
flc 0e03c6d5cf add cardmod a minidrivers for windows
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4001 c6295689-39f2-0310-b995-f0e70906c6a9
2010-02-05 13:05:25 +00:00
aj 32f7a4eed3 fix text a bit.
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3959 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-28 14:53:36 +00:00
viktor.tarasov 9eebe0e1a5 pkcs11: by default do not create slot for the User PUK (thanks to Andreas)
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3957 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-28 14:15:13 +00:00
viktor.tarasov 67b1ba0562 opensc.conf: in pkcs11 section a new option to disable slot for User PUK
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3954 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-28 12:17:05 +00:00
viktor.tarasov e2dae6b97b Unlock User PIN with PKCS#11:
One of the three unblock methods can be activated from the 'opensc-pkcs11' section of opensc.conf:
- C_SetPin() in the unlogged sesssion;
- C_SetPin() in the CKU_SPECIFIC_CONTEXT session;
- C_InitPin() in CKU_SO session (inspired by Pierre Ossman).
-- This last one works, for a while, only for the pkcs15 cards without SOPIN auth object.
   For the pkcs15 cards with SOPIN, this method will be useful for the cards 
   that do not have then modes '00' and '01' of ISO command 'RESET RETRY COUNTER'.

Test commands:
# pkcs11-tool --module ./opensc-pkcs11.so --slot 0 --unlock-pin --puk "123456" --new-pin "9999"
# pkcs11-tool --module ./opensc-pkcs11.so --slot 0 --unlock-pin -l --login-type context-specific --puk "123456" --new-pin "9999"
# pkcs11-tool --module ./opensc-pkcs11.so --slot 0 --init-pin -l --new-pin "9999"



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3901 c6295689-39f2-0310-b995-f0e70906c6a9
2010-01-08 15:41:07 +00:00
aj f0484968a9 merge changes 0.11.11 -> 0.11.12
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3899 c6295689-39f2-0310-b995-f0e70906c6a9
2009-12-18 13:33:03 +00:00
martin 95a5ab0654 Re-implement PIN cache on PKCS#15 layer; remove it from PKCS#11. Re-name and log PKCS#15 options to better reflect the purpose.
Data objects and PKCS#15 init are left broken currently.



git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3784 c6295689-39f2-0310-b995-f0e70906c6a9
2009-10-22 08:59:59 +00:00
martin f6d4da7919 PC/SC: Improve core and pinpad code
* Make opensc-tool -l display pinpad capabilities, if available
 * Detect reader capabilities when a reader is found, not when a connection to a card is opened
 * Fix unpadded PIN block parameters to not be rejected by the latest free CCID driver
 * When locking the card and it has been reset by some other application (or re-attached), clear cache and lock again
 * Enable pinpad detection by default


git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3730 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 09:48:56 +00:00
martin d672fde449 Remove sc_error and sc_ctx_suppress_errors_* in favor of sc_debug/fprintf
git-svn-id: https://www.opensc-project.org/svnp/opensc/branches/martin/0.12@3721 c6295689-39f2-0310-b995-f0e70906c6a9
2009-09-14 08:46:59 +00:00
alonbl 34a75de5d7 Rutoken updates
By Aktiv Co. Aleksey Samsonov

- use PKCS#15 (not builtin PKCS#15 emulator)
- rutoken.profile (add privdata)
- correct using ACL
- correct erase procedure



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3640 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-28 12:10:13 +00:00
alonbl 09a849c906 Set default of hide_empty_tokens to true
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3639 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-23 09:30:42 +00:00
alonbl 17cf43eeb1 Rename PKCS#11 v2_20_mode option to plug_and_play
As it is the only feature it controls.
Also, change the default to true.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3637 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-23 09:14:15 +00:00
martin c58bcfab84 Configurable for PKCS#11 v2.20 related changes.
- Correctly report Cryptoki version if v2.20 is used.
 - Consistently report no version for hardware/software we know no version information about.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3627 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-19 12:06:38 +00:00
alonbl 2b41afbb3f Set hardcoded default for profile_dir
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3624 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-16 21:27:46 +00:00
martin 0876222c5f Make PKCS#11 module default slot configuration more sensible:
* Increase default slot count to 16, which equals 4 concurrent readers by default
  * 2 OpenCT + 2 PC/SC on Linux for example
 * Rename num_slots to slots_per_card
 * Rename internal PKCS#11 variables, remove unneeded defines.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3619 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-16 16:44:35 +00:00
martin c6f753dc00 Limit virtual OpenCT readers to a sane default of 2 readers/tokens by default.
Most users don't use more than one or two tokens concurrently. This way default configuration (or with no configuration file) works even after you insert a PC/SC reader as OpenCT does not "eat up" all PKCS#11 slots with 5 virtual readers.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3618 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-16 16:12:50 +00:00
martin 7e7b94d879 Fix PKCS#15 emulation handling:
* Work as expected without a configuration file
  * "Normalize" the configuration file: show the used default and give examples with opposite values.
 * DWIM:    
  * If there is no config file: try all builtin drivers
  * If there is a configuration file, allow to turn emulation off
  * If there is a configuration file, allow to filter the list of internal drivers                   
 * Introduce a PKCS#15 layer card flag for emulated cards



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3613 c6295689-39f2-0310-b995-f0e70906c6a9
2009-01-15 21:08:30 +00:00
alonbl 8456a321f8 Add PKCS#11 specification limitation note
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3607 c6295689-39f2-0310-b995-f0e70906c6a9
2008-12-28 18:45:29 +00:00
alonbl 8c364fdd54 Typeo
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3606 c6295689-39f2-0310-b995-f0e70906c6a9
2008-12-28 18:37:03 +00:00
aj a89b14668f Enable lock_login by default for security.
Disable soft_keygen by default for security.
Make defaults code more readable.


git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3604 c6295689-39f2-0310-b995-f0e70906c6a9
2008-12-28 16:01:04 +00:00