Commit Graph

211 Commits

Author SHA1 Message Date
Frank Morgner 609e2d89cf added GoID Tool 2019-01-15 07:31:20 +01:00
Frank Morgner 3750d70106 pgp: detect gnuk with newer fw
closes https://github.com/OpenSC/OpenSC/issues/1475
2018-09-13 13:46:27 +02:00
Frank Morgner 83c0bff640 pgp: added new ATRs to windows installer 2018-09-11 22:18:19 +02:00
Frank Morgner 3352960265 fixed maintainer-clean target 2018-09-05 08:55:14 +02:00
Frank Morgner 972f9eb35b fixed PKCS11-Spy dll default
fixes https://github.com/OpenSC/OpenSC/issues/1464
2018-08-31 13:36:33 +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 0f9c7d126a win32 installer: automatically start SCardSvr 2018-08-05 11:35:12 +02:00
Frank Morgner a0b6643fa7 Use hard coded default SM module (path)
- avoids the need to set this default in opensc.conf
- fixes loading of (unknown) local library
- removes some unused defines from config.h
2018-07-17 14:49:27 +02:00
Frank Morgner 42833b6129 added more missing files
fixes https://github.com/OpenSC/OpenSC/issues/1368
2018-05-24 13:51:12 +02:00
Jakub Jelen 9858d05589 PKCS#11 testsuite (#1224)
* Initial version of pkcs11 testsuite

* Refactor test cases to several files, clean up awful and unused stuff

* Static mechanism list based on the actual token offer

* Get rid of magic numbers

* Documentation

* License update based on the original project

* Verbose readme

* Cleanup unused code, long lines and method order

* Typo; More verbose errors

* Use fallback mechanisms

* Refactor object allocation and certificate search

* PKCS11SPY mentioned, more TODO

* add SHA mechanisms

* Do not try to Finalize already finalized cryptoki

* Add more flags and mechanisms

* Do not list table for no results

* Logical order of the tests (regression last)

* read ALWAYS_AUTHENTICATE from correct place

* ALWAYS_AUTHENTICATE for decryption

* Test EC key length signature based on the actual key length

* Shorten CKM_ list output, add keygen types detection

* Skip decrypting on non-supported mechanisms

* Fail hard if the C_Login fails

* Reorganize local FLAGS_ constants

* Test RSA Digest mechanisms

* Correct mechanisms naming, typos

* Do not attempt to do signature using empty keys

* CKM_ECDSA_SHA1 support

* Correct type cast when getting attributes

* Report failures from all mechanisms

* Standardize return values, eliminate complete fails, documentation interface

* Wait for slot event test

* Add switch to allow interaction with a card (WaitForSlotEvent)

* At least try to verify using C_Verify, if it fails, fall back to openssl

* Get rid of function_pointers

* Get rid of additional newline

* Share always_authenticate() function between the test cases

* Refactor Encrypt&decrypt test to functions

* Do not overwrite bits if they are not provided by CKA, indentation

* Cleanup and Break to more functions Sign&Verify test

* CKM_RSA_X_509 sign and verify with openssl padding

* More TODO's

* Proper abstracted padding with RSA_X_509 mechanism

* Add ongoing tasks from different TODO list

* Update instructions. Another todo

* Variables naming

* Increase mechanism list size, use different static buffers for flags and mechanism names

* nonstandard mechanism CKM_SHA224_RSA_PKCS supported by some softotkens

* Get rid of loop initial declarations

* Loop initial declaration, typos, strict warnings

* Move the p11test to the new folder to avoid problems with dynamically linked opensc.so

* Update path in README

* Possibility to validate the testsuite agains software tokens

* Add possibility to select slot ID on command-line (when there are more cards present)

* Clean up readme to reflect current options and TODOs

* Do not attempt to use keys without advertised sign&verify bits to avoid false positives

* Get and present more object attributes in readonly test; refactor table

* New test checking if the set of attributes (usage flags) is reasonable

* Test multipart signatures. There is not reasonable mechanism supporting multipart encryption

* Use PKCS#11 encryption if possible (with openssl fallback)

* Identify few more mechanisms (PSS) in the lest

* Resize table to fit new mechanisms

* Remove initial loop declaration from multipart test

* Use pkcs11-tool instead of p11tool form most of the operations (master have most of the features)

* Preparation for machine readable results

* Refactor log variables out of the main context, try to export generic data

* Do not write to non-existing FD if not logging

* Export missing data into the log file in JSON

* Store database in json

* Sanity check

* Avoid uninitialized structure fields using in state structure

* Dump always_authenticate attribute too

* Manual selection of slots with possibility to use slots without tokens

* Do not free before finalizing

* Proper cleanup of message in all cases

* Proper allocation and deallocation of messages

* Sanitize missing cases (memory leaks)

* Suppressions for testing under valgrind

* Better handling message_lengt during sign&verify (avoid invalid access)

* Suppress another PCSC error

* Do not use default PIN. Fail if none specified

* Sanitize initialization. Skip incomplete key pairs

* Add missing newline in errors

* Fix condition for certificate search

* Avoid several calls for attributes of zero length

* Handle if the private key is not present on the card

* Improve memory handling, silent GCC warning of 'unused' variable

* Fail early with missing private key, cleanup the messages

* Use correct padding for encryption

* Cache if the card supports Verify/Encrypt and avoid trying over and over again

* Loosen the condition for the Usage flags

* OpenSSL 1.1.0 compatibility

* Add missing mechanisms

* Do not require certificates on the card and pass valid data for RSA_PKCS mechanisms

* Add missing PIN argument in runtest.sh

* Add OpenSSL < 1.1 comatible bits

* Add SHA2 ECDSA mechanisms handling

* Use public key from PKCS#11 if the certificate is missing (or compare it with certificate)

* Avoid long definitions in OpenSSL compat layer

* In older OpenSSL, the header file is ecdsa.h

* Add missing config.h to apply compat OpenSSL layer

* ASN1_STRING_get0_data() is also new in 1.1.0

* Return back RSA_X_509 mechanism

* Drop bogus CKM_* in the definitions

* Drop CKM_SHA224_RSA_PKCS as it is already in pkcs11.h

* Update documentation

* Use NDEBUG as intended

* typos, cleanup

* Typos, cleanup, update copyright

* Additional check for OpenCryptoki, generate more key types on soft tokens

* Prepare for RSA-PSS and RSA-OAEP

* Use usage&result flags for the tests, gracefully ignore PSS&OAEP

* pkcs11.h: Add missing definitions for PSS

* PSS and OAEP tests

readonly: Typos, reformat

* Working version, memory leak

* Tweak message lengths for OAEP and PSS

* Skip tests that are not aplicable for tokens

* configure.ac: New switch --enable-tests

Do not attempt to build tests if cmocka is not available or
--enable-tests is provided. It makes also more lightweight release
builds out of the box (or with --disable-tests).

* travis: Install cmocka if not available

* Do not build tests on Windows and make dist pass

* Try to install cmocka from apt and from brew

* Do not require sudo (cmocka from apt and brew works)
2018-05-18 12:31:55 +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 6f58a97906 md: added STARCOS 3.5 ATRs 2018-03-09 14:36:55 +01:00
Frank Morgner d29bdf9da0 md: register starcos cards 2018-03-09 14:36:55 +01:00
Frank Morgner 3e7f7e632c SC-HSM: Don't block generic contactless ATR 2017-12-04 21:09:26 +01:00
Frank Morgner 4444d24f59 win32: generate PDB files for releases
https://msdn.microsoft.com/fsk896zz.aspx

fixes https://github.com/OpenSC/OpenSC/issues/1191
2017-11-21 10:54:48 +01:00
Frank Morgner 4317df10e6 created opensc-asn1
fixes installation of egk-tool.exe on win32
2017-11-17 10:03:54 +01:00
Frank Morgner 08ca27197a treat warnings as errors 2017-11-09 12:42:29 +01:00
Frank Morgner 385a0392ce msvc: disable type truncation warnings 2017-11-09 12:42:29 +01:00
Frank Morgner 45be3da23f win32: fixed OpenSC major/minor version 2017-11-09 12:42:29 +01:00
Frank Morgner 19d9ec7d5d msvc: don't warn about deprecated crt functions
See https://msdn.microsoft.com/de-de/library/ms235384.aspx
2017-10-27 19:48:22 +02:00
Frank Morgner 498aedd165 Merge remote-tracking branch 'upstream/master' into winui 2017-10-16 15:16:34 +02:00
Frank Morgner 4923947b0a md: added CNS ATR (#1166)
fixes https://github.com/OpenSC/OpenSC/issues/1153
2017-10-16 09:25:34 +02:00
Frank Morgner 172f320c9a win32: Dedicated md/pkcs11 installation folders
Don't install non-permanent files (md/pkcs11) to system folder anymore.
2017-08-22 23:41:29 +02:00
Frank Morgner 9b772ebdc4 win32: switch back to OpenSSL 1.0.2 as default
AppVeyor changed the default version back to 1.0.2, see
https://github.com/appveyor/ci/issues/1671
2017-08-04 08:44:41 +02:00
Frank Morgner 7bc070ac67 win32: Load notification icons from Windows DLLs
fixes showing wrong icons when loaded as PKCS#11 module
2017-08-03 00:19:26 +02:00
Frank Morgner ce3f27ff54 opensc-notify: notify for card events
... manually or in daemon mode

fixes compilation in MinGW/Travis CI
2017-08-02 19:04:09 +02:00
Frank Morgner b2cde0f7fb Windows: Added support for notifications 2017-08-02 19:03:16 +02:00
Frank Morgner 97e6218f6d fixed CertPropSvc configuration on uninstallation 2017-08-02 19:01:23 +02:00
Frank Morgner 60e4f501cf md: configure certificate propagation service 2017-08-02 19:01:04 +02:00
Frank Morgner c57c9c36bf md: added themable PIN-pad dialog
- themable in the sense of using OS native design
- user messages on PIN pad dialog are identical to Base CSP, which still displays the dialog for PIN entry if no PIN pad is available
- adds progress bar to dialog
- Uses Smartcard icon extracted from DDORes.dll
- requires windows vista/windows server 2008 or above
2017-08-02 19:00:07 +02:00
Frank Morgner 7a39d6d058 build against OpenSSL 1.1.0 on Windows, by default
- build with AppVeyor's OpenSSL 1.1.0
- updates AppVeyor version of OpenPACE

Fixes https://github.com/OpenSC/OpenSC/issues/1108
2017-07-24 21:39:01 +02:00
Frank Morgner cf9b8dd6ea sc-hsm: removed UTSRCACC100001 2017-07-14 07:23:17 +02:00
Frank Morgner 3131282760 sc-hsm: add GoID ATRs
disables forcing sc-hsm for standard JCOP ATRs, see
b7de5888a0 (commitcomment-22258928)
2017-06-06 00:59:20 +02:00
Frank Morgner fb8fccd7ba AppVeyor: cache openpace build 2017-06-05 00:09:33 +02:00
Frank Morgner ad451bd201 AppVeyor: cache zlib build 2017-06-05 00:09:33 +02:00
Frank Morgner 2536365d79 removed BUILD_ON/BUILD_FOR variable
- guess the system architecture based on %PROCESSOR_ARCHITECTURE%
- guess the target system based on %PLATFORM%
2017-06-05 00:09:33 +02:00
Frank Morgner eb19691efe added compatibility with WiX 3.11 2017-06-05 00:09:33 +02:00
Frank Morgner 74ec7b04ff sc-hsm: Add support for SoC
- eac: allow CA without EF.CardSecurity
- sc-hsm: implemented CA based on document PKI
- sc-hsm: adds receive limit for SoC card
- introduces dedicated card type for SoC card
- md: integrate card's PIN pad capabilities
- installer: added SC-HSM SoC card to registry
- pkcs15-tool: Added support for PIN entry on card
- change/unblock PIN: add support for PIN entry on card
- added OpenPACE to macOS build
- travis-ci: install gengetopt/help2man via brew
- sc-hsm: Cache EF.C_DevAut
- sc-hsm: Prevent unnecessary applet selection and state resets
- sc-hsm: added support for session pin
- sc-hsm: avoid multiple AID selection
- sc-hsm: Use the information from match_card for all subsequent selections of the applet
- sc-hsm: cache optional files as empty files (Decoding the files will reveal that they were not existing prior caching. This avoids selecting the file though we have already tried to cache the file before.)
- use dedicated directory for CVC trust anchors
- appveyor: added OpenPACE to windows build
2017-05-22 16:25:08 +02:00
Frank Morgner f21fe1de8d win32 installer: skip license agreement
in accordance to
https://www.gnu.org/licenses/old-licenses/gpl-2.0-faq.html#ClickThrough
2017-03-28 14:24:30 +02:00
Maciej S. Szmigiero 64f56b83d0 Make minidriver installer custom action library optional
Minidriver installer custom action library needs WiX SDK to build.

Since installer is an optional component anyway let's detect whether WiX
SDK is present on build platform and then decide whether to build installer
custom action library or not.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
2017-03-27 10:57:21 +02:00
Frank Morgner 45a7ea9737 card-npa: moved to internal card drivers 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
HAMANO Tsukasa 51ba288bec md: integrate JPKI (#964)
* set pin_flags
* set dummy serial number
* add CA certificates
* set cert flags
2017-03-03 10:59:56 +01:00
Frank Morgner abd1595f60 winconfig.h: use more values from configure.ac
fixes #866
2016-09-20 09:33:38 +02:00
Frank Morgner 0898d06944 fixed and cleaned up nmake Makefiles 2016-06-23 07:35:53 +02:00
Frank Morgner ab2a65e049 added cardos ATRs to minidriver installation 2016-06-21 09:31:48 +02:00
Viktor Tarasov 09cbcd80f4 md: use register to enable debug log 2016-04-17 12:43:27 +02:00
Frank Morgner ed504cb22f OpenSC.msi: fixed compilation with VS2015
WiX 3.10 uses `__vsnprintf` which is deprecated since VS2015
2016-03-07 10:39:42 +01:00
Frank Morgner 415f15e3e2 use autoconf metadata for PKCS#11 library 2016-03-07 10:39:42 +01:00
Viktor Tarasov 36b945aa22 tools: print package revision 2016-03-04 14:16:06 +01:00