Andres AG
e7723ec284
Make entropy bias self test poll multiple times
...
Instead of polling the hardware entropy source a single time and
comparing the output with itself, the source is polled at least twice
and make sure that the separate outputs are different.
2016-08-30 16:50:48 +01:00
Andres AG
b34e42e69e
Add a new self test to entropy module
...
The self test is a quick way to check at startup whether the entropy
sources are functioning correctly. The self test only polls 8 bytes
from the default entropy source and performs the following checks:
- The bytes are not all 0x00 or 0xFF.
- The hardware does not return an error when polled.
- The entropy does not provide data in a patter. Only check pattern
at byte, word and long word sizes.
2016-08-30 16:50:48 +01:00
Andres AG
99b257ca19
Fix memory leak in test_suite_md.function
2016-08-26 17:21:14 +01:00
Paul Bakker
50157ff5ab
Add new timing test suite that runs the timing self test
2016-08-25 16:36:35 +01:00
Paul Bakker
81c60910e1
Run PKCS#5 selftest in test suites
2016-08-25 16:36:35 +01:00
Simon Butcher
80cd444978
Adds missing dependency to AES special case tests
...
Added MBEDTLS_AES_C to the AES cipher special behaviours test case.
2016-08-25 15:42:28 +01:00
Paul Bakker
5c57e02b1d
Fix style issues in test_suite_md.function
2016-08-25 15:42:28 +01:00
Paul Bakker
6a9c725652
Add Cipher layer corner case test coverage
2016-08-25 15:42:28 +01:00
Paul Bakker
185ccf7070
Add coverage for CTR-DRBG corner case function behaviours
2016-08-25 15:42:28 +01:00
Paul Bakker
ec5ceb65d6
Test invalid bit value in mbedtls_mpi_set_bit()
2016-08-25 15:42:28 +01:00
Paul Bakker
c7d6bd4b5f
Add mbedtls_asn1_write_len() support for 3 and 4 byte lengths
...
As a consequence also adds coverage for reading 3 and 4 byte lengths
(which were not covered before)
2016-08-25 15:42:27 +01:00
Paul Bakker
5e8b77cd8c
Test result of mbedtls_asn1_write_len() through mbedtls_asn1_get_len()
2016-08-25 15:42:27 +01:00
Paul Bakker
58bfb83bb0
Add buffer length tests for mbedtls_asn1_write_len()
2016-08-25 15:42:27 +01:00
Paul Bakker
e325db9055
Add explicit test coverage for mbedtls_asn1_write_len()
2016-08-25 15:42:27 +01:00
Paul Bakker
97c53c2867
Add coverage testing of mbedtls_md_clone() (and wraps)
...
+13 functions, +57 lines
2016-08-25 15:42:27 +01:00
Paul Bakker
e35afa28f7
Update *_multi tests in test_suite_md to do more than 1 step
2016-08-25 15:42:27 +01:00
Simon Butcher
905cef6c2c
Changed library version number to 2.3.0
2016-06-27 19:36:45 +01:00
Simon Butcher
ab069c6b46
Merge branch 'development' into development-restricted
2016-06-23 21:42:26 +01:00
Simon Butcher
02c4a38013
Corrects missing dependency for MBEDTLS_CIPHER_MODE_CBC in some tests
2016-06-23 02:41:31 +01:00
Janos Follath
15ab7ed0f3
Merge branch 'development' into development-restricted
...
Conflicts:
programs/pkey/rsa_decrypt.c
programs/pkey/rsa_encrypt.c
programs/test/selftest.c
2016-06-14 09:20:46 +01:00
Paul Bakker
c568762a5c
Fix dependency on MBEDTLS_ENTROPY_SHA512_ACCUMULATOR in test suite
2016-06-07 13:00:43 +01:00
Paul Bakker
b598c293ce
Fix dependency guard for test
2016-06-01 16:57:11 +01:00
Paul Bakker
4a6c6fc72d
Properly gate NV_SEED additions in test suite
2016-06-01 16:34:50 +01:00
Paul Bakker
ffbfb4c24c
Add test cases for NV seed functionality
...
A standard 'test' that writes a seed file is added so that regular tests
still can succeed. This is in lieu of a 'SUITE_PRE_CODE' kind of
arrangement where a suite can run code before (and after) all other code
runs.
A test is added that checks if we can read and write the standard NV
seed file
A test is added that actually checks if the entropy and seed file values
that are the result of just using the NV seed are the same as the manual
calculation.
2016-06-01 16:34:50 +01:00
Janos Follath
04b591ee79
Merge branch 'development' for weekly test report.
2016-05-31 10:18:41 +01:00
Simon Butcher
65b1fa6b07
Fixes warnings found by Clang static analyser
...
Also removes annotations in the code to avoid warnings which don't appear to
be needed.
2016-05-23 23:18:26 +01:00
Paul Bakker
774180e14e
Fix memory-leak in verbose test framework in case of unexpected input
2016-05-23 14:29:31 +01:00
Paul Bakker
26b60bf7d1
Fox verbose test framework not to duplicate strings if not verbose
2016-05-23 14:29:31 +01:00
Paul Bakker
a30a72f80f
Fix verbose test framework mote to use unmet_dep_count for index
2016-05-23 14:29:31 +01:00
Simon Butcher
a557cfb9ad
Widens test bounds on memory alloc tests
2016-05-23 14:29:30 +01:00
Simon Butcher
4ec1e8193e
Widens test parameters in memory alloc tests
2016-05-23 14:29:30 +01:00
SimonB
214f5c0af2
Additional tests to test stack buffer allocator
...
Adds additional tests to the test suite for
memory_buffer_alloc.c
2016-05-23 14:29:29 +01:00
SimonB
20273ddc4c
Adds reporting of file/line no. in failed tests
...
Tests in tests/suites will now report the file and line number of
failed test assertions.
2016-05-23 14:29:29 +01:00
Nicholas Wilson
b19bac4d82
Allow test suites to be run on Windows
...
For a start, they don't even compile with Visual Studio due to strcasecmp
being missing. Secondly, on Windows Perl scripts aren't executable and have
to be run using the Perl interpreter directly; thankfully CMake is able to
find cygwin Perl straight away without problems.
2016-05-23 14:29:28 +01:00
Simon Butcher
94bafdf834
Merge branch 'development'
2016-05-18 18:40:46 +01:00
Simon Butcher
edb7fd9d76
Fixes stdlib.h dependencies in test suites
...
Moved stdlib.h in test suites, so platforms that don't support
MBEDTLS_PLATFORM_C would build.
2016-05-17 13:35:51 +01:00
Simon Butcher
c21bec8af4
Merge branch 'development'
2016-05-16 16:15:20 +01:00
Paul Bakker
53f01199e2
Fix memory-leak in verbose test framework in case of unexpected input
2016-05-12 15:59:48 +01:00
Paul Bakker
2a259c63e3
Fox verbose test framework not to duplicate strings if not verbose
2016-05-12 15:55:37 +01:00
Paul Bakker
6e51915187
Fix verbose test framework mote to use unmet_dep_count for index
2016-05-12 15:52:48 +01:00
Paul Bakker
324258fdc8
Merge pull request #353 from NWilson/win-tests
...
Allow test suites to be run on Windows
2016-05-11 20:09:13 +02:00
Simon Butcher
938f65c452
Merge 'development' into development
2016-05-10 20:58:54 +01:00
Simon Butcher
e9f25c8a60
Widens test bounds on memory alloc tests
2016-05-10 20:57:03 +01:00
Simon Butcher
d96924de9c
Widens test parameters in memory alloc tests
2016-05-06 00:22:18 +01:00
SimonB
a0ed709f05
Additional tests to test stack buffer allocator
...
Adds additional tests to the test suite for
memory_buffer_alloc.c
2016-05-05 14:25:03 +01:00
SimonB
31a6c49139
Adds reporting of file/line no. in failed tests
...
Tests in tests/suites will now report the file and line number of
failed test assertions.
2016-05-05 14:25:03 +01:00
Simon Butcher
e4a46f696f
Merge branch 'development'
2016-04-27 18:44:37 +01:00
Simon Butcher
b2d5dd105d
Fixes X509 sample app and SSL test suite
...
Fixes the X.509 cert_app and the SSL test suite for the non-default
configs which don't build with if MBEDTLS_PLATFORM_C isn't defined.
2016-04-27 13:35:37 +01:00
SimonB
1594210a49
Adds better support to debug generated code
...
The commit adds to the generate_code.pl script support to add #line directives
to generated code to allow build breaks to be more easily found from the
generated code.
2016-04-26 14:46:56 +01:00
Simon Butcher
956420d6e6
Merge branch 'development'
2016-04-19 19:29:09 +01:00