Thomas Daubney
b9eaa7369b
Modifies tests in test suite RSA
...
Modifies tests for mbedtls_rsa_rsassa_pkcs1_v15_sign
function in test_suite_rsa.function
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2021-05-18 15:42:16 +01:00
Mateusz Starzyk
ef80a9c5e0
Add migration guide for removed null entropy config option
...
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com>
2021-05-18 16:25:01 +02:00
Thomas Daubney
fa1581ea03
Modifies typedef of mbedtls_pk_rsa_alt_sign_func
...
This commit modifies the typedef of
mbedtls_pk_rsa_alt_sign_func and propagates the
associated changes throughout the codebase.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2021-05-18 12:38:33 +01:00
Gilles Peskine
e7e958b1f1
Merge pull request #4393 from gilles-peskine-arm/generate-tests-python3-make-2.x
...
Use Python 3 instead of Python 2 to generate test files
2021-05-18 13:30:36 +02:00
Thomas Daubney
11425347f0
Modifies tests in rsa test suite
...
Modification of tests in test_suite_rsa.function
to adept them for the removal of the mode param from
mbedtls_rsa_pkcs1_sign function.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2021-05-18 12:07:50 +01:00
Hanno Becker
ea620864ac
Fix formatting of changelog entry
...
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
2021-05-18 08:36:36 +01:00
Hanno Becker
217715d32b
Add ChangeLog entry
...
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
2021-05-18 05:28:53 +01:00
Hanno Becker
9039303cf5
Add migration guide
...
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
2021-05-18 05:27:18 +01:00
Gilles Peskine
9c58274484
Remove automatically generated source files
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-05-17 22:48:08 +02:00
Gilles Peskine
687d1ab714
Makefile targets for automatically generated files
...
Run `make generated_files` to generate the automatically generated
C source files and build scripts.
Run `make neat` to remove all automatically generated files, even C
source files and build scripts.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-05-17 22:47:02 +02:00
Gilles Peskine
b61a614cdb
Use Python 3 instead of Python 2 to generate test files
...
Python 2 is no longer officially supported, but we were still using it
to generate test suite .c files from .function files when using GNU
make. Switch to looking for Python 3.
This change was done for CMake a long time ago.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-05-17 22:46:27 +02:00
Gilles Peskine
c86f20af98
Allow running source file generators from a subdirectory
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-05-17 22:46:27 +02:00
Gilles Peskine
3eac612650
Add changelog entry for #4510
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-05-17 22:18:35 +02:00
Ronald Cron
fdcde47f36
Merge pull request #4458 from davidhorstmann-arm/remove-max-content-len
...
Remove MBEDTLS_SSL_MAX_CONTENT_LEN option
2021-05-17 16:36:04 +02:00
Gilles Peskine
864b425156
Merge pull request #4488 from tom-daubney-arm/remove_rsa_mode_params
...
Remove rsa mode params part 1
2021-05-17 13:49:19 +02:00
Manuel Pégourié-Gonnard
9370f01391
Merge pull request #3927 from hanno-arm/ciphersuite_helper_macros
...
Unify naming scheme for macros indicating presence of classes of ciphersuites
2021-05-17 11:18:58 +02:00
TRodziewicz
e13a23b439
New line added at the end of the migration guide entry
...
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-05-17 11:16:52 +02:00
Thomas Daubney
141700f057
Removes mode param from mbedtls_rsa_rsaes_oaep_encrypt
...
Removes mode parameter from
mbedtls_rsa_rsaes_oaep_encrypt and propagates
changes throughout the codebase.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2021-05-17 10:11:05 +01:00
Thomas Daubney
3c487f4b8e
Removes and modifies tests
...
Removes and modifies tests for
mbedtls_rsa_rsaes_oaep_encrypt.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2021-05-17 10:11:05 +01:00
Thomas Daubney
53e4ac64b7
Removes mode param from mbedtls_rsa_rsaes_pkcs1_v15_encrypt
...
Removal of mode parameter from
mbedtls_rsa_rsaes_pkcs1_v15_encrypt. This commit
propagates the change to all relevant function calls
and tests.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2021-05-17 10:11:05 +01:00
Thomas Daubney
69a8c3809e
Removes and modifies tests
...
Removal and modification of tests relating to
mbedtls_rsa_rsaes_pkcs1_v15_encrypt.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2021-05-17 10:11:05 +01:00
Thomas Daubney
2177277dda
Removes mode param from mbedtls_rsa_pkcs1_encrypt
...
Removal of the mode parameter from
mbedtls_rsa_pkcs1_encrypt function. This change
is propagated throughout the codebase and to
relevant tests.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2021-05-17 10:11:05 +01:00
Thomas Daubney
c32e2b0921
Removal and modification of tests
...
Changes for tests involving mbedtls_rsa_pkcs1_encrypt.
Removal of test in test_suite_rsa.function where
invalid mode is used. Also modification of other tests
to use the constant MBEDTLS_RSA_PUBLIC instead
of the mode variable.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2021-05-17 10:11:05 +01:00
Thomas Daubney
0fdd8d297a
Adding correction to documentation
...
As picked up in review, this commit
modifies the documentation by removing some
wording that is now superfluous given the
removal of the mode parameter.
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
2021-05-17 09:58:05 +01:00
Manuel Pégourié-Gonnard
5605911fd3
Merge pull request #4447 from hanno-arm/ssl_config_cleanup
...
Avoid and remove some SSL error codes for Mbed TLS 3.0
2021-05-17 10:55:17 +02:00
TRodziewicz
57d7ab72fb
Correction to migration guide entry wording
...
Signed-off-by: TRodziewicz <tomasz.rodziewicz@mobica.com>
2021-05-17 10:43:41 +02:00
Gilles Peskine
03b5ab4d54
Merge pull request #4510 from gabor-mezei-arm/3267_fp30_Implement_psa_sign_message_and_verify
...
[Forwardport 3.0] Implement psa_sign_message and psa_verify_message
2021-05-17 10:14:50 +02:00
Hanno Becker
8cce50d726
Remove reference to SSLv3
...
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
2021-05-15 06:15:52 +01:00
Hanno Becker
d086bf0c62
Fix typo
...
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
2021-05-15 06:14:56 +01:00
Hanno Becker
31351cef6f
Add missing escape character in multi-line preprocessor directive
...
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
2021-05-15 06:14:56 +01:00
Hanno Becker
0cc4661365
Introduce helper macro for presence of stream ciphersuites
...
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
2021-05-15 06:14:56 +01:00
Hanno Becker
fd86ca8626
Rename SOME_MODES_USE_MAC -> SOME_SUITES_USE_MAC
...
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
2021-05-15 06:07:48 +01:00
Hanno Becker
9067148918
Add ChangeLog entry
...
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
2021-05-14 20:13:57 +01:00
Hanno Becker
67e49a627d
Add migration guide
...
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
2021-05-14 20:13:54 +01:00
Paul Elliott
4148a68169
Update documentation for internal implementation
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00
Paul Elliott
b06e1c0d68
Remove unnecessary code
...
Calls to abort that are now being done by the psa_crypto layer, freeing
of tempory allocations (done by abort) and a couple of checks that had
already been done prior to that point
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00
Paul Elliott
6108ee7c2d
Change logic to reduce indentation
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00
Paul Elliott
e2c788d480
Rename badly named variable
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00
Paul Elliott
c10ad21a1b
Remove SetLengths() requirement for GCM
...
Also return NOT_SUPPORTED, rather than BAD_STATE for our current
workarounds for GCM/CCM
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00
Paul Elliott
9e8ccd7e82
Make sure all statuses are initialised
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00
Paul Elliott
ccaea40023
Replace hard coded buffer size with define
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00
Paul Elliott
80acb7ee21
Formatting fixups and spelling mistake fixes
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00
Paul Elliott
cc35859739
Pass key buffer size into psa_aead_setup
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00
Paul Elliott
a559b3ce56
Remove key_set and use id instead
...
In keeping with the other PSA multipart operations.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00
Paul Elliott
bbe90b5f7f
Formatting fixes for psa_crypto.c
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00
Paul Elliott
81231f33f0
Return invalid argument for unsupported algorithm
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00
Paul Elliott
39dc6b8aa5
Add abort call to all failure points
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00
Paul Elliott
ef29e17a94
Add comment to non-obvious code guard
...
Ad and body lengths can only be too big on builds where size_t is bigger
than 32 bits. This checking code therefore generates always true
comparison warnings on 32 bit platforms, and thus had to be guarded.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00
Paul Elliott
6edb7473db
Move safer_memcmp to psa_crypto_core.h
...
Same change as made by Steven Cooreman, although not yet merged.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00
Paul Elliott
7f0a180107
Fix missed drivers header
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-05-14 19:03:26 +01:00