Commit Graph

20 Commits

Author SHA1 Message Date
Trevor Bentley c07355fefb Fix unit tests for NEO: use ECCP256 and detect attestation errors 2017-10-23 16:26:14 +02:00
Trevor Bentley de065ae36e Rename util.c test suite to api.c 2017-10-23 16:26:05 +02:00
Trevor Bentley 90209997cc Unit test for ykpiv_attest() 2017-10-23 16:25:53 +02:00
Trevor Bentley ded78751a0 Add gzip support to ykpiv_util_import_certificate(), and use in yubico-piv-tool 2017-10-23 16:25:20 +02:00
Trevor Bentley 8135a55200 yubico-piv-tool: Switch to ykpiv_set_pin_retries() 2017-10-23 16:25:17 +02:00
Trevor Bentley fb00baf672 Backport from minidriver:
commit 90020fea0ac34b2f98b68a5798fa85cb5ad12175 (tag: 3.2)
Author: Dave Pate <dpate@yubico.com>
Date:   Thu Jul 27 00:31:54 2017 -0700

    Release 3.2
    Adds automatic PUK blocking
    Adds feature to turn automatic PUK blocking off
    Miscellaneous fixes with metadata handling
2017-10-23 16:22:21 +02:00
Trevor Bentley 16d0a519c4 Continuing unit tests and minor bug fixes
* Support unit tests on Yubikey NEO
* Test ykpiv_get_version
* Test ykpiv_import_private_key
* Test ykpiv_sign_data
* Test ykpiv_decipher_data
* Test ykpiv_change_pin
* Test ykpiv_change_puk
* Test ykpiv_get_pin_retries
* Test ykpiv_set_pin_retries
* Test ykpiv_verify
* Fix segfault when |tries| is NULL
* Fix segfault when import_private_key algorithm is wrong
2017-10-23 16:22:14 +02:00
Trevor Bentley 89e8e7864e Tests for ykpiv_list_readers and ykpiv_set_mgmkey 2017-10-23 16:22:11 +02:00
Trevor Bentley 2ea0e4cbdd Port custom allocator from minidriver, and add test case for it. 2017-10-23 16:22:08 +02:00
Trevor Bentley bfafb926a3 Added tests for authenticate and reset. Fixed bug in reset (always returned success). 2017-10-23 16:22:04 +02:00
Trevor Bentley cffe862bbc Test cases for ykpiv_util_* functions 2017-10-23 16:22:01 +02:00
Trevor Bentley 0d2b85fcef Switch test cases to use libcheck framework
This keeps the test logic the same, but moves most of them into the libcheck
test suite framework.  It gives better control over grouping related tests,
running them in parallel, and reporting on multiple failures.

Running in parallel also brings problems, so libykcs11 tests are left
untouched.  Parallel access to a single hardware DUT does not make sense,
and pcsc-lite doesn't work after a fork() in OS X 10.11+, so it can't run
in libcheck's tests anyway.
2017-10-23 16:21:50 +02:00
Simon Josefsson 89bec1260a Improve license headers. 2016-08-12 15:30:06 +02:00
Klas Lindfors 69326b868d actually run valgrind for the tests 2015-10-09 10:40:59 +02:00
Klas Lindfors 3b080dca45 relicense to 2-clause BSD license 2015-07-01 16:34:20 +02:00
Klas Lindfors 220f0f0226 add a negative test for the hex decode 2015-02-03 10:56:13 +01:00
Klas Lindfors 8b36d6706d add a test with uppercase hex 2015-02-02 10:40:41 +01:00
Klas Lindfors caf64fc464 add valgrind for tests 2014-12-09 15:11:22 +01:00
Klas Lindfors b66f81b324 replace ykpiv_parse_key() with ykpiv_hex_decode() 2014-06-27 15:06:44 +02:00
Klas Lindfors b048ea85e5 move lib tests under lib 2014-06-24 09:52:10 +02:00