XiaokangQian
3ce4d51c11
Move set_outbound_transform to finalize server finished.
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-17 02:11:36 +00:00
Dave Rodgman
491d849ad1
Fix derive_input test ignoring parameter
...
Fix derive_input test hardcoding key type instead of using test argument.
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-11-16 16:05:06 +00:00
Dave Rodgman
3f86a90261
Update test to handle changed error code
...
Update test to handle changed error code from psa_key_derivation_output_key
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-11-16 16:05:06 +00:00
Dave Rodgman
d69da6c3c3
Improve PSA error return code
...
psa_key_derivation_output_key: prioritize BAD_STATE over NOT_PERMITTED
If psa_key_derivation_output_key() is called on an operation which hasn't been
set up or which has been aborted, return PSA_ERROR_BAD_STATE. Only return
PSA_ERROR_NOT_PERMITTED if the operation state is ok for
psa_key_derivation_input_bytes() or psa_key_derivation_output_bytes() but not
ok to output a key.
Ideally psa_key_derivation_output_key() would return PSA_ERROR_NOT_PERMITTED
only when psa_key_derivation_output_bytes() is possible, but this is clumsier
to implement.
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
2021-11-16 16:03:31 +00:00
XiaokangQian
a3087e881e
Fix finished message decryption fail issue
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-16 02:38:45 +00:00
Tom Cosgrove
fff613aa10
Fix list of LTS braches in CONTRIBUTING.md, and back link from BRANCHES.md
...
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2021-11-15 13:54:59 +00:00
XiaokangQian
9ec8fcfddd
Improve failure messag for calculating verify data
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-15 08:24:08 +00:00
XiaokangQian
dce82245ac
Fix the compile issue about prepare message
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-15 06:01:26 +00:00
XiaokangQian
0fa6643eb5
Align coding stles and remove useless code
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-15 03:37:11 +00:00
XiaokangQian
35dc625e37
Move the location of functions
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-15 03:37:11 +00:00
XiaokangQian
8773aa0da9
Align coding styles in generic for client finish
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-15 03:37:11 +00:00
XiaokangQian
cc90c94413
Rebase and change code
...
Solve conflicts.
Rename functions
Align coding style
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-15 03:37:11 +00:00
XiaokangQian
e1655e4db8
Change naming styles and fix ci failure
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-15 03:37:11 +00:00
XiaokangQian
c00ba81310
Remove MBEDTLS_SSL_NEW_SESSION_TICKET in TLS1.3 MVP
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-15 03:37:11 +00:00
XiaokangQian
eab1023dbf
Fix some compiling errors for name mismatch
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-15 03:37:11 +00:00
XiaokangQian
74af2a827e
TLS1.3: Add client finish processing in client side
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-15 03:37:11 +00:00
Gilles Peskine
834d229117
Fix dynamic library extension on macOS
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-11-12 14:30:22 +01:00
Ronald Cron
bb41a88f2e
Merge pull request #5120 from yuhaoth/pr/fix-memory-leak-and-version-header
...
TLS1.3 :fix memory leak and version header
2021-11-12 13:49:26 +01:00
Ronald Cron
28777db226
Merge pull request #4952 from xkqian/add_server_finished
...
Add server finished
2021-11-12 12:30:10 +01:00
Paul Elliott
853c0da8de
Fix for pkcs12 with NULL or zero length password
...
Previously passing a NULL or zero length password into either
mbedtls_pkcs12_pbe() or mbedtls_pkcs12_derive() could cause an infinate
loop, and it was also possible to pass a NULL password, with a non-zero
length, which would cause memory corruption.
I have fixed these errors, and improved the documentation to reflect the
changes and further explain what is expected of the inputs.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-11-11 19:26:37 +00:00
XiaokangQian
a4c99f2c2d
Remove useless blank line
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-11 06:46:35 +00:00
XiaokangQian
c13f935c05
Align code styles of indent and so on
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-11 06:13:22 +00:00
XiaokangQian
3306284776
Change code base on comments
...
Remove client certificate verify in tests.
Change the layout of structure to fix abi_api check issues.
Add comments of Finished.
Align with the coding styles.
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-11 03:37:45 +00:00
XiaokangQian
d6d234f698
Solve the ABI_API check issue for mbedtls_ssl_session
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-11 02:22:12 +00:00
Gilles Peskine
7fb54c5674
More explicit output for the test program
...
Without that, the logs were a bit hard to understand if you didn't know what
to expect.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-11-10 21:08:28 +01:00
Gilles Peskine
f1a7ea88d1
Merge pull request #5092 from mprse/generate_key2
...
Generate test cases for PSA key generation
2021-11-10 20:55:35 +01:00
Gilles Peskine
b6a0299708
Avoid undefined variable warning without MBEDTLS_MD_C
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-11-10 19:11:32 +01:00
Gilles Peskine
88e3e70df5
Use CMake's knowledge of what system library has dlopen()
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-11-10 19:10:27 +01:00
Gilles Peskine
f80a029f28
Don't build dlopen when building for Windows
...
Windows doesn't have dlopen, not even Linux emulation environments such as
MinGW.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-11-10 19:05:20 +01:00
Gilles Peskine
5dbee582a3
Only link with libdl on Linux
...
Requiring an extra library for dlopen is a Linux non-POSIX-compliance.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-11-10 19:05:20 +01:00
Gilles Peskine
ca144597e8
Run the dlopen test in shared library builds
...
Non-regression for the fix in https://github.com/ARMmbed/mbedtls/pull/5126 :
libmbedtls and libmbedx509 did not declare their dependencies on libmbedx509
and libmbedcrypto when built with make.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-11-10 19:05:20 +01:00
Gilles Peskine
a7c247e87d
New test app for dynamic loading of libmbed* with dlopen
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-11-10 19:05:20 +01:00
Max Fillinger
7568d1a238
Add Changelog entry for additional getters
...
Signed-off-by: Max Fillinger <max@max-fillinger.net>
2021-11-10 15:12:04 +01:00
Max Fillinger
c60c3a0c77
Include new getters in test suites
...
Signed-off-by: Max Fillinger <max@max-fillinger.net>
2021-11-10 15:12:04 +01:00
Dave Rodgman
ea79ff627c
Merge pull request #5147 from tom-cosgrove-arm/serialise-builds-of-archives-on-windows
...
Serialise builds of the .a files on Windows
2021-11-10 13:53:23 +00:00
Max Fillinger
f057893035
Allow checking variable IV/key size in cipher_info
...
Signed-off-by: Max Fillinger <max@max-fillinger.net>
2021-11-10 14:20:50 +01:00
Max Fillinger
3a782a0fe4
Add IV and block size getters for cipher_info
...
Signed-off-by: Max Fillinger <max@max-fillinger.net>
2021-11-10 14:20:38 +01:00
Tom Cosgrove
0eedd36557
Serialise builds of the .a files on Windows
...
This is a workaround for an issue with mkstemp() in older MinGW releases that
causes simultaneous creation of .a files in the same directory to fail.
Fixes #5146
Signed-off-by: Tom Cosgrove <tom.cosgrove@arm.com>
2021-11-10 11:15:46 +00:00
Przemyslaw Stekiel
d6914e3196
ssl_client2/ssl_server2: Rework ordering of cleanup
...
Signed-off-by: Przemyslaw Stekiel <przemyslaw.stekiel@mobica.com>
2021-11-10 10:46:11 +01:00
Manuel Pégourié-Gonnard
087f04783d
Merge pull request #5076 from mstarzyk-mobica/psa_ccm_no_tag
...
PSA CCM*-no-tag
2021-11-10 10:18:55 +01:00
XiaokangQian
d0aa3e9307
Inprove code base on review comments
...
Change debug messag for server finished.
Change name of generate_application_keys.
Remove the client vertificate tests from ssl-opt.sh.
Add test strings for server finished in ssl-opt.sh.
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-10 06:17:40 +00:00
XiaokangQian
57b2aff8a8
Align the union size
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-10 03:12:11 +00:00
XiaokangQian
aaa0e197a8
Change the alignment and names of functions and a macro
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-10 03:07:04 +00:00
XiaokangQian
c5c39d5800
Change code for styles and comments .etc
...
Remove useless code in union.
Rename functions and parameters.
Move definitions into othe files.
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-10 01:47:23 +00:00
XiaokangQian
44c38f7e36
Chande debug message in finished and rename finalize functions
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-10 01:47:23 +00:00
XiaokangQian
b51f8841c4
Change comments for export_keys callback
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-10 01:47:23 +00:00
XiaokangQian
ac0385c08f
Change code based on comments
...
Move set_state function into client
Add back export_key callback function in generate
application keys
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-10 01:47:23 +00:00
XiaokangQian
8903bd97b0
Change some naming style issues and remove useless code
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-10 01:47:23 +00:00
XiaokangQian
1aef02ee20
Fix initialized issues and remove useless code
...
Fix the variable not inialized issue, remove the client
certificate related code, remove early data related code.
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-10 01:47:23 +00:00
XiaokangQian
61bdbbc18b
Add cleanup in functions for secure reason
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2021-11-10 01:47:23 +00:00