Andrzej Kurek
1767e40368
all.sh: fix submodule test names
2019-02-05 06:05:49 -05:00
Andrzej Kurek
8a2e97c2df
Merge development-psa commit 80b5662 into development-psa-merged branch
...
Adjust crypto submodule version to use new, forked crypto version accordingly.
2019-02-05 06:02:51 -05:00
Andrzej Kurek
e9c3b8130a
all.sh: move crypto submodule check to pre_check_git
2019-02-05 05:34:21 -05:00
Andrzej Kurek
fd0381a2c5
all.sh: change test_submodule to test_use_psa_crypto
2019-02-05 05:00:02 -05:00
Darryl Green
61b7f61d5e
Change unknown hash algorithm value
...
0x010000ff corresponds to PSA_ALG_ANY_HASH, so this collides and
isn't an unknown algorithm.
2019-02-05 09:21:28 +00:00
k-stachowiak
a1dc9117a7
Correct code formatting in the timing test suites
2019-02-05 09:22:20 +01:00
Jaeden Amero
80b566267f
Merge remote-tracking branch 'origin/pr/2386' into development-psa
2019-02-04 16:42:23 +00:00
Jaeden Amero
d18b264eaf
Merge remote-tracking branch 'origin/pr/2382' into development-psa
2019-02-04 16:41:46 +00:00
Peter Kolbus
1bc1a4c639
all.sh: Fix check_headers_in_cpp
...
When all.sh invokes check_headers_in_cpp, a backup config.h exists. This
causes a stray difference vs cpp_dummy_build.cpp. Fix by only collecting
the *.h files in include/mbedtls.
Change-Id: Ifd415027e856858579a6699538f06fc49c793570
2019-02-01 17:58:59 -06:00
Jaeden Amero
acdf07c033
Merge pull request #41 from hanno-arm/ec_pubkey_fmt_fixes
...
Make further adaptations to new EC public key format
2019-02-01 13:05:48 +00:00
Andrzej Kurek
de5a007316
Merge development commit f352f7 into development-psa
2019-02-01 07:03:03 -05:00
Hanno Becker
00114d71f4
Adapt test in test_suite_pk to work with new PSA public key format
2019-02-01 11:56:42 +00:00
Hanno Becker
56104ea9bb
Adapt test in test_suite_pk to work with new PSA public key format
2019-02-01 11:48:19 +00:00
Andrzej Kurek
409fdae6bf
test_suite_ctr_drbg: use ctr_drbg_update_ret instead of ctr_drbg_update
...
Align files with development to ensure the same state of repositories.
2019-02-01 02:53:16 -05:00
Andrzej Kurek
f093a3dc61
Use ecdh_setup instead of ecp_group_load
...
Align files with development to ensure the same state of repositories.
2019-02-01 02:50:36 -05:00
Peter Kolbus
60c6da2352
all.sh: Test MBEDTLS_MPI_WINDOW_SIZE=1
...
There were no tests for a non-default MPI window size. Add one.
Change-Id: Ic08fbc9161d0b3ee67eb3c91f9baf602646c9dfe
2019-01-31 19:41:11 -06:00
Andrzej Kurek
c470b6b021
Merge development commit 8e76332 into development-psa
...
Additional changes to temporarily enable running tests:
ssl_srv.c and test_suite_ecdh use mbedtls_ecp_group_load instead of
mbedtls_ecdh_setup
test_suite_ctr_drbg uses mbedtls_ctr_drbg_update instead of
mbedtls_ctr_drbg_update_ret
2019-01-31 08:20:20 -05:00
Jaeden Amero
f352f75f6b
Merge remote-tracking branch 'origin/pr/2332' into development
2019-01-30 15:53:00 +00:00
Jaeden Amero
c4cc2511d0
Merge remote-tracking branch 'origin/pr/2325' into development
2019-01-30 15:35:44 +00:00
Jaeden Amero
c89148bba7
Merge remote-tracking branch 'origin/pr/2207' into development
2019-01-30 14:57:44 +00:00
Jaeden Amero
b18239713e
Merge remote-tracking branch 'origin/pr/2191' into development
2019-01-30 14:56:58 +00:00
Jaeden Amero
730ecdf3b1
Merge remote-tracking branch 'origin/pr/2371' into development
2019-01-30 13:15:40 +00:00
Andrzej Kurek
92dd4d0307
ssl-opt.sh: add a test for "calc PSA finished" log to the PSA tests
2019-01-30 04:10:19 -05:00
Andrzej Kurek
683d77e836
ssl_opt: check client and server output for PSA calc verify in PSA tests
...
Increase debug level to 2 in PSA tests and check for "PSA calc verify"
to ensure that the PSA code is being run.
2019-01-30 03:50:42 -05:00
Darryl Green
ec07950e53
Exclude ECDH and FFDH key agreement algorithms for now
2019-01-29 16:08:46 +00:00
Gilles Peskine
95ab71a19a
test_psa_constant_names: make tmp files easier to recognize
2019-01-29 16:08:46 +00:00
Gilles Peskine
17542086ab
Recognize kdf_alg as KDF algorithm parameter name
2019-01-29 16:08:46 +00:00
Gilles Peskine
6d194bd92b
Read constant names from crypto_extra.h as well as crypto_values.h
...
test_psa_constant_names.py was originally written before the split of
crypto.h into crypto_values.h and more, so it now needs to read
crypto_values.h as well.
In both generate_psa_constants.py and test_psa_constant_names.py, read
crypto_extra.h as well. We don't currently define any value there, but
it's plausible that we will one day.
2019-01-29 16:08:46 +00:00
Gilles Peskine
6a78573088
CMake: psa_constant_names and test_psa_constant_names
...
Build and install psa_constant_names.
Make sure that test_psa_constant_names passes in an out-of-tree build.
2019-01-29 16:08:46 +00:00
Gilles Peskine
c68ce9637a
Exclude full-length-algorithm macros from testing
...
Calls to PSA_ALG_AEAD_WITH_DEFAULT_TAG_LENGTH and
PSA_ALG_FULL_LENGTH_MAC are not in canonical form, so exclude them
from the list of constructor macros to test.
2019-01-29 16:08:46 +00:00
Gilles Peskine
434899fccd
Test truncated MAC and AEAD algorithms
...
For MAC and AEAD algorithms, test the algorithm truncated to certain
lengths (1 and 63 bytes).
2019-01-29 16:08:46 +00:00
Gilles Peskine
f96ed6615c
Fix bug in distribute_arguments for multi-argument macros
2019-01-29 16:08:46 +00:00
Gilles Peskine
cf9c18e696
Add option to keep the temporary C files
...
Useful for debugging and for reviewing what test cases are generated.
2019-01-29 16:08:45 +00:00
Gilles Peskine
a0a315c815
Add location information to input processing exceptions
...
If parsing fails, report the input file name and line number.
If distribute_arguments fails, report for what name.
2019-01-29 16:08:45 +00:00
Gilles Peskine
377c6832a2
Test psa_constant_names in all.sh
2019-01-29 16:08:44 +00:00
Gilles Peskine
2482702d15
Test program for psa_constant_names
...
Test psa_constant_names on many inputs. For each input, find out the
numerical value by compiling and running a C program, pass the
numerical value to psa_constant_names and compare the output with the
original input.
Gather inputs by parsing psa/crypto.h and
test_suite_psa_crypto_metadata.data. For macros that take an argument,
list some possible arguments using the parsed data.
2019-01-29 16:07:45 +00:00
k-stachowiak
21daa3c1ee
Reduce the timing tests complexity
2019-01-29 10:19:49 +01:00
Gilles Peskine
6b156df1ba
Don't consider RIPEMD160 a PSA_ALG_ANY_HASH candidate
...
Some parts of the library don't support it, such as RSA PKCS#1v1.5
signature.
2019-01-28 15:43:19 +01:00
Gilles Peskine
8c1247fec9
Add psa_copy_key tests with policy constraints
...
Test a few cases. The logic to combine the constraint is similar to
the logic to combine the source and target, so it's ok to have less
parameter domain coverage for constraints.
2019-01-28 14:55:16 +01:00
Gilles Peskine
57ab721d8a
Test psa_copy_key
...
Split the testing into tests that exercise policies in
test_suite_psa_crypto and tests that exercise slot content (slot
states, key material) in test_suite_psa_crypto_slot_management.
Test various cases of source and target policies with and without
wildcards. Missing: testing of the policy constraint on psa_copy_key
itself.
Test several key types (raw data, AES, RSA). Test with the
source or target being persistent.
Add failure tests (incompatible policies, source slot empty, target
slot occupied).
2019-01-28 14:55:06 +01:00
Gilles Peskine
f603c718c9
New function psa_copy_key
...
Copy a key from one slot to another.
Implemented and smoke-tested.
2019-01-28 14:41:11 +01:00
Jaeden Amero
43bafcca94
Merge pull request #15 from gilles-peskine-arm/psa-signature_policy_wildcard
...
Support wildcard hash in signature policies
2019-01-28 13:31:14 +00:00
Ron Eldor
17233f5a5c
Increase okm_hex buffer to contain null character
...
Add an additional byte for the `okm_hex` buffer, to assure
it is null-terminated in case `okm` is 128 bytes long.
2019-01-28 15:18:15 +02:00
Ron Eldor
bc93219f66
Minor modifications to hkdf test
...
1. Fix comment grammar.
2. Rename `okm_string` to `okm_hex`.
2019-01-28 15:07:55 +02:00
Ron Eldor
1a3a7e5fc7
Add explanation for okm_string size
...
Add explanation for why the size of `okm_string` buffer
is twice as `okm` buffer.
2019-01-28 15:01:53 +02:00
Andrzej Kurek
e85414edd0
ssl-opt: add a check for PSA computation of digest of ServerKeyExchange
2019-01-28 07:04:19 -05:00
Jaeden Amero
37a8c0c144
Merge pull request #27 from hanno-arm/crypto_submodule_update_prs_6_18_19_sibling
...
PSA integration sibling: Update crypto submodule (Hash clone, Key Policy Init, Key slot alloc)
2019-01-28 11:33:28 +00:00
Hanno Becker
a814ae6f92
PSA: Adapt PK test suite to new key policy initialization API
2019-01-25 14:36:28 +00:00
Hanno Becker
fcf659b12d
PSA: Adapt PK test suite to modified key slot allocation mechanism
2019-01-25 14:36:28 +00:00
Hanno Becker
8d865dfe37
PSA: Adapt PK test suite to new key policy initialization API
2019-01-25 14:25:16 +00:00