Commit Graph

77 Commits

Author SHA1 Message Date
Peter Marschall 76725d5f80 .travis.yml: partially revert commit cb3113a 2018-06-06 22:43:46 +02:00
Peter Marschall a27ade7789 .travis.yml: remove references to help2man
Now that we have proper DocBook sources for all man pages formerly
generated using help2man, it is not needed anymore.
2018-06-06 22:43:46 +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
Frank Morgner 54097c0fc0 fixed .travis.yml 2018-04-07 14:32:53 +02:00
Frank Morgner 647b623357 (hopefully) fixed .travis.yml 2018-04-07 13:04:27 +02:00
Frank Morgner e1bc515363 optionally try covertiy_scan with every build on master
idea from https://github.com/umlaeute/Gem/blob/master/.travis.yml
2018-04-07 12:08:08 +02:00
Jakub Jelen 8a63103229 Properly report errors from make check in travis 2018-04-04 21:43:01 +02:00
Frank Morgner 956ad33e31 travis: fixed disabling of notifications for mingw 2017-08-03 00:16:58 +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 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 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 6850ec7e77 travis: synchronize coverity_scan with master
... allows executing a cron job on coverity_scan for analysis
2017-03-03 14:56:06 +01:00
Frank Morgner 32dd37f391 travis: always kill services.exe
hopefully fixes build issues on coverity branch
2017-03-03 11:05:05 +01:00
Frank Morgner aa0592f025 travis-ci: fixed mingw cross compile build
fixes #906
2017-03-02 23:30:10 +01:00
Viktor Tarasov f6a5885348 travis: allow failed cross-builds
closes #911
2016-12-18 11:29:06 +01:00
Viktor Tarasov 0f22c0fd77 travis for OCX: fix missing 'sed'
Due to bugs in Travis CI:
$ ./bootstrap
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: glibtoolize --copy --force
/usr/local/bin/glibtoolize: line 401: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 401: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/bin/glibtoolize: line 401: /usr/local/Library/ENV/4.3/sed: No such file or directory

Apply solution from https://github.com/mkrufky/libdvbtee/issues/22 .

Fixes #881
2016-10-04 11:01:24 +02:00
Ludovic Rousseau e631b9d697 travis: do not fail on error on Mac OS X
The compilation on Mac OS X using clang generates the warning:
clang: warning: argument unused during compilation: '-pthread'

This is because -pthread is passed during link and this argument is
unused.
This problem will be hard to fix.

The best for now is to NOT fail on warning :-(
2016-03-02 15:37:47 +01:00
Ludovic Rousseau 7d2d454160 travis: fail on compiler error 2016-03-02 15:37:47 +01:00
Viktor Tarasov a48fc73333 travis: check with coverity-scan 'master' 2016-02-19 16:34:29 +01:00
Frank Morgner 8fe8974333 Uses container based travis and caching 2015-09-16 03:52:00 +02:00
Frank Morgner fcfb0cebee build cross compiled installer with innosetup 2015-09-15 15:04:33 +02:00
Frank Morgner f261426303 travis: cross compile for 64 bit windows 2015-09-14 10:52:31 +02:00
Frank Morgner 88fa362b5b nobody likes being pedantic 2015-04-01 01:41:04 +02:00
Frank Morgner 311958e13f Travis-ci: build dmg on OS X 2015-04-01 01:41:04 +02:00
Frank Morgner a05e7ca84d ignore errors on `apt-get update` 2015-03-31 18:48:33 +02:00
Frank Morgner 9f3dbaa39d honour warnings 2015-02-20 19:54:40 +01:00
Frank Morgner ea40322a30 added travis-ci configuration 2015-01-27 22:56:11 +01:00