Paul Elliott
2065a8d8af
Reduce level of -Wformat-truncation
...
Reduce level of format truncation warnings due to issues with false
positives (an unknown size buffer is always treated as size 1)
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-17 13:12:22 +00:00
Paul Elliott
29b641688d
Fix printf format issue in programs
...
Fix issues that were missed as part of previous printf attribute
cleanup
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-03-17 13:08:10 +00:00
Gilles Peskine
0e7b6ebb64
Fix typos in comments
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-03-17 13:46:59 +01:00
Ronald Cron
da3da94373
Merge pull request #4210 from gilles-peskine-arm/crypto_values-param-names
...
Fix parameter names after \p in include/psa
2021-03-17 10:17:18 +01:00
Gilles Peskine
d86bc52d78
Cover encodings of algorithms without parameters
...
Generate test cases for all algorithms without parameters. Only the encoding
of the algorithm in the key metadata is covered: the test keys are not of a
type that permits the algorithm to be used in an operation.
This commit only covers algorithms without parameters. A subsequent commit
will generate algorithms with parameters.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-03-16 22:29:12 +01:00
David Brown
3298851d05
Fix alignment of PSA defines
...
When these names were changed, the definition got misaligned with the
rest of the fields. Fix this alignment.
Signed-off-by: David Brown <david.brown@linaro.org>
2021-03-16 10:44:22 -06:00
Mateusz Starzyk
1aec64642c
Remove certs module from mbedtls.
...
Certs will be used only by tests and programs.
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
2021-03-16 15:51:25 +01:00
Mateusz Starzyk
e204dbf272
Drop support for MBEDTLS_SSL_HW_RECORD_ACCEL.
...
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
2021-03-16 12:49:54 +01:00
Mateusz Starzyk
7e37338dda
Drop single-DES ciphersuites.
...
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
2021-03-16 12:49:54 +01:00
Mateusz Starzyk
5224e29f0e
Drop support for RC4 TLS ciphersuites.
...
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
2021-03-16 12:49:54 +01:00
Mateusz Starzyk
a3a9984a5d
Drop support for TLS record-level compression.
...
Remove option MBEDTLS_ZLIB_SUPPORT.
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
2021-03-16 12:49:51 +01:00
Mateusz Starzyk
2012ed7560
Drop support for compatibility with our own previous buggy implementation of truncated HMAC (MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT).
...
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
2021-03-16 12:19:09 +01:00
Mateusz Starzyk
06b07fb839
Drop support for SSLv3.
...
Remove options: MBEDTLS_SSL_MINOR_VERSION_0 and
MBEDTLS_SSL_PROTO_SSL3).
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
2021-03-16 12:19:05 +01:00
Gilles Peskine
74a7f93c94
Add BUGS.md
...
Instructions on how to report a bug.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-03-16 12:05:44 +01:00
Gilles Peskine
92042d9bc4
The 2.7 branch is retired
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-03-16 12:05:30 +01:00
Gilles Peskine
991bbe7f5e
Mention the master branch as well
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-03-16 12:05:16 +01:00
Gilles Peskine
a23df13e52
Minor presentation improvements
...
Minor wording improvement and cosmetic formatting improvements.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-03-16 12:04:44 +01:00
Steven Cooreman
f8e45a4e98
Simplify compilation guards around hash driver testing
...
The hash driver entry points (and consequentially the hash driver core)
are now always compiled on when PSA_CRYPTO_DRIVER_TEST is turned on.
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-16 11:07:55 +01:00
Gilles Peskine
01a622a1a4
Merge pull request #4197 from bensze01/psa_ccm_nonce_length
...
Correct the maximum generated nonce length for CCM
2021-03-16 10:10:41 +01:00
David Brown
eed74df1ee
Re-order PSA ECC configs
...
Arrange these to be in alphabetical order.
Signed-off-by: David Brown <david.brown@linaro.org>
2021-03-15 15:53:57 -06:00
David Brown
44bfed596d
Update PSA not supported generated data
...
Update this based on the output of the generator script. The Brainpool
curves are now supported, since they are spelled properly in the config.
Signed-off-by: David Brown <david.brown@linaro.org>
2021-03-15 15:40:10 -06:00
David Brown
110ea816ca
psa: Fix name of BRAINPOOL configs
...
These should be WANT_ECC_BRAINPOOL_P_... not WANT_ECC_BP_... Change to
match.
Signed-off-by: David Brown <david.brown@linaro.org>
2021-03-15 15:30:28 -06:00
Ryan LaPointe
dbb192d157
Fix inaccurate comment in sample DTLS server
...
Signed-off-by: Ryan LaPointe <ryan@ryanlapointe.org>
2021-03-15 16:43:27 -04:00
Ryan LaPointe
59244e87e1
Actually use the READ_TIMEOUT_MS in the sample DTLS client and server
...
Signed-off-by: Ryan LaPointe <ryan@ryanlapointe.org>
2021-03-15 16:43:08 -04:00
Steven Cooreman
b6bf4bbf95
Clear up language on zeroizing driver context at setup
...
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-15 19:00:14 +01:00
Steven Cooreman
aa87fd0012
Make driver IDs always visible
...
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-15 18:54:03 +01:00
Steven Cooreman
61bb8fc693
remove superfluous calls to hash_abort
...
The PSA Core is already calling psa_hash_abort, so the driver doesn't
have to do that explicitly.
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-15 12:35:17 +01:00
Steven Cooreman
5e4c18f6d9
Reorder the driver wrapper switch-case content
...
Reordered the cases to be in numeric order.
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-15 12:26:07 +01:00
Steven Cooreman
893232fbde
Ensure the full driver structure is zeroized at setup
...
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-15 12:23:37 +01:00
Steven Cooreman
fa952958a5
Don't void actually used arguments
...
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-15 12:16:25 +01:00
Steven Cooreman
0f8ffa806b
Rename and retype hash test driver context structure
...
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-15 12:14:40 +01:00
Steven Cooreman
753f973f87
Use full config during driver testing
...
Due to the way the test drivers are setup, we require the full setup.
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-15 12:14:40 +01:00
Steven Cooreman
5f88e776c3
Move mbedtls_md_info_from_psa into the mbedtls hash driver
...
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-15 12:14:40 +01:00
Steven Cooreman
a85e2f835e
Guard hash test functions as a block
...
Replicate the way the internal hash functions are guarded
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-15 12:14:40 +01:00
Steven Cooreman
830aff2a98
Restructure the way driver contexts are declared
...
Drivers (both built-in and external) need to declare their context
structures in a way such that they are accessible by the
to-be-autogenerated crypto_driver_contexts.h file. That file lives in
include/psa, which means all builtin driver context structure
declarations also need to live in include/psa.
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-15 12:14:32 +01:00
Mateusz Starzyk
9e9ca1a738
Drop support for parsing SSLv2 ClientHello.
...
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
2021-03-15 11:40:28 +01:00
Steven Cooreman
0d58666395
Reuse already-defined MBEDTLS_PSA_BUILTIN_HASH
...
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-15 10:36:55 +01:00
Steven Cooreman
fbe09284cf
Set output length to 0 at start of function
...
This behaviour was present previously, and is depended on by the
test suites.
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-15 10:34:56 +01:00
Steven Cooreman
f66d5fd2bd
Apply same argument checking as in psa_hash_setup
...
Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
2021-03-15 10:34:56 +01:00
David Brown
85537fa141
psa: ecdsa: Resolve incorrect merge resolution
...
The commit
commit dcdde59c6f
Author: David Brown <david.brown@linaro.org>
Date: Tue Feb 23 15:48:13 2021 -0700
tests: psa: Change Elliptic curve defines to PSA names
when rebased on
commit bb9cbc7a23
Author: Ronald Cron <ronald.cron@arm.com>
Date: Thu Mar 4 17:09:00 2021 +0100
psa: ecdsa: Prefer NOT_SUPPORTED error code
had an incorrect merge conflict resolution. Correct this, allowing the
test "PSA sign: invalid algorithm for ECC key" to pass again.
Signed-off-by: David Brown <david.brown@linaro.org>
2021-03-12 12:21:45 -07:00
Dave Rodgman
e483a77c85
Merge pull request #816 from ARMmbed/development
...
Merge recent commits from development into 2.26.0-rc
2021-03-12 16:55:26 +00:00
Chris Jones
ca38fabf0c
Add move_internal_headers changelog
...
Signed-off-by: Chris Jones <christopher.jones@arm.com>
2021-03-12 09:57:26 +00:00
Ronald Cron
6a69ac4453
Merge pull request #4220 from bensze01/psa_aead_update_output_size
...
Fix revert of PSA_AEAD_UPDATE_OUTPUT_SIZE
2021-03-12 09:17:38 +01:00
Chris Jones
a1df4949b9
Remove internal file references in programs/
...
`entropy_poll.h` and `md_wrap.h` were still being used in some of the
example programs. As these headers are now internal, remove their
references and replace them with publicly available functions.
Signed-off-by: Chris Jones <christopher.jones@arm.com>
2021-03-11 17:44:43 +00:00
Bence Szépkúti
437035bfe3
Fix revert of PSA_AEAD_UPDATE_OUTPUT_SIZE
...
Both the original change, and its incomplete revert were introduced in
#3386 .
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2021-03-11 17:58:26 +01:00
Chris Jones
3848e31eac
Fix internal references in public documentation
...
Signed-off-by: Chris Jones <christopher.jones@arm.com>
2021-03-11 16:17:59 +00:00
Bence Szépkúti
0153c9436b
Correct the maximum generated nonce length for CCM
...
psa_aead_generate_nonce() could generate a nonce of up to 13 bytes,
depending on the inputs to psa_aead_set_lengths().
Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
2021-03-11 15:45:17 +01:00
Ronald Cron
fc86f3f147
Merge pull request #3386 from gabor-mezei-arm/3268_update_macros_for_ouput_buffer_size
...
Add new support macros for output buffer sizes since PSA API 1.0 beta 3
2021-03-11 13:30:42 +01:00
Ronald Cron
5d5fa8b788
Merge pull request #3579 from paul-elliott-arm/fix_printf
...
Fixes for invalid printf format specifiers
2021-03-11 13:06:58 +01:00
gabor-mezei-arm
5699101ac9
Update PSA_CIPHER_ENCRYPT_OUTPUT_MAX_SIZE
...
Signed-off-by: gabor-mezei-arm <gabor.mezei@arm.com>
2021-03-11 11:55:03 +01:00