XiaokangQian
8499b6ce25
Only free verify_cookie in tls 1.3 case.
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-27 09:00:11 +00:00
Xiaofei Bai
82f0a9a1db
Rebase and address review comments
...
Signed-off-by: Xiaofei Bai <xiaofei.bai@arm.com>
2022-01-27 07:53:52 +00:00
XiaokangQian
a909061c2a
Refine HRR parse successfully message in test cases
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-27 03:48:27 +00:00
XiaokangQian
34909746df
Change cookie free code and some comments
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-27 02:25:04 +00:00
Tautvydas Žilys
60165d7708
Don't inline mbedtls_mpi_safe_cond_assign on MSVC/ARM64 to avoid a compiler bug.
...
Signed-off-by: Tautvydas Žilys <tautvydas.zilys@gmail.com>
2022-01-26 15:44:10 -08:00
XiaokangQian
52da558103
Change code base on comments
...
Align the alert type in parse_server_hello
Remove MBEDTLS_SSL_COOKIE_C guard
Enable cookie for both DTLS and TLS1.3
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:53:15 +00:00
XiaokangQian
aec1f3e913
Cookie fields are used only by DTLS 1.3
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:53:15 +00:00
XiaokangQian
7bae3b616c
Add more ciphersuites into test cases for hrr
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:53:15 +00:00
XiaokangQian
b119a35d07
Refine fatal alert in parse_server_hello
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:53:15 +00:00
XiaokangQian
d59be77ce7
Refine code based on comments
...
Add comments for parse hrr key share and cookie
Change variable names based on RFC8466
Refine fatal allerts in parse server hello and hrr
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:53:15 +00:00
XiaokangQian
0ece998287
Refine code in mbedtls_ssl_reset_transcript_for_hrr
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:53:15 +00:00
XiaokangQian
f1e7d12cb6
Fix compile issues in mbedtls_ssl_session_reset_msg_layer
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:53:15 +00:00
XiaokangQian
43550bd761
Prepare function to parse hrr cookie extension
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:53:15 +00:00
XiaokangQian
2b01dc30cb
Add hrr no change check and allign mbedtls_ssl_session_reset_msg_layer
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:53:15 +00:00
XiaokangQian
355e09ae9d
Change code base on comments
...
Change functions name
Change some comments
Improve hrr test case for gnutls
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:53:15 +00:00
XiaokangQian
78b1fa7e81
Update code base on comments
...
Move reset transcript for hrr to generic
Reset SHA256 or SHA384 other than both
Rename message layer reset
Add check log for hrr parse successfully
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:53:15 +00:00
XiaokangQian
53f20b71c5
Improve ssl_tls13_parse_server_hello
...
Avoid coping random bytes in hrr
Send illegal parameter alert when cipher suite mismatch
Send illegal parameter alert when supported_version not exist
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:51:13 +00:00
XiaokangQian
6db08dd2cb
Change ssl-opt.sh to make hrr tests pass
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:51:13 +00:00
XiaokangQian
d9e068e10b
Change code based on comments
...
Align coding styles
Add hrr parameter for ssl_tls13_parse_server_hello
Add reset steps for SHA384 in HRR
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:51:13 +00:00
XiaokangQian
8945db36ab
Reduce paramter hrr from ssl_tls13_parse_server_hello
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:51:13 +00:00
XiaokangQian
b48894eca4
Add buffer check for named group
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:51:13 +00:00
XiaokangQian
16acd4b3e4
Reject the second HRR earlier and align naming styles
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:51:13 +00:00
XiaokangQian
b851da8a44
Re-construct the code to merge hello and hrr based on comments
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:51:13 +00:00
XiaokangQian
0b56a8f85c
Replace curve_list with group_list and add update test scripts
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:51:13 +00:00
XiaokangQian
51eff22c9b
Align oode style with server hello parse
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:51:13 +00:00
XiaokangQian
647719a172
Add hello retry request in client side
...
Signed-off-by: XiaokangQian <xiaokang.qian@arm.com>
2022-01-26 10:50:06 +00:00
Xiaofei Bai
69fcd39774
Update CertificateRequest tests and the parsing function
...
Signed-off-by: Xiaofei Bai <xiaofei.bai@arm.com>
2022-01-26 09:32:29 +00:00
Xiaofei Bai
de3f13e0b8
update based on comments
...
Signed-off-by: Xiaofei Bai <xiaofei.bai@arm.com>
2022-01-26 09:31:54 +00:00
Xiaofei Bai
f6d3696eda
fix test failures
...
Signed-off-by: Xiaofei Bai <xiaofei.bai@arm.com>
2022-01-26 09:31:54 +00:00
Xiaofei Bai
a0ab777cfc
update based on comments.
...
Signed-off-by: Xiaofei Bai <xiaofei.bai@arm.com>
2022-01-26 09:31:54 +00:00
Xiaofei Bai
5d8598e090
update certificate request tests
...
Signed-off-by: Xiaofei Bai <xiaofei.bai@arm.com>
2022-01-26 09:31:54 +00:00
Xiaofei Bai
e1e344213a
Add TLS1.3 process certificate request
...
Signed-off-by: Xiaofei Bai <xiaofei.bai@arm.com>
2022-01-26 09:31:52 +00:00
Ronald Cron
f51b79c297
Merge pull request #5355 from yuhaoth/pr/remove-duplicate-sig-alg-ext
...
Remove duplicate write signature algorithms extension
The failure of ABI-API-checking is expected.
2022-01-26 10:05:26 +01:00
Jerry Yu
ed5e9f431d
Change ecdsa sig_algs order for tls1.3
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-01-26 12:41:12 +08:00
Gilles Peskine
a18fb9d9ac
Fix string/regexp backslash escapes
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-01-25 23:24:34 +01:00
Gilles Peskine
cd55fe02ef
Remove accidental use of a feature that doesn't exist in CMake 3.5
...
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-01-25 23:13:49 +01:00
Gilles Peskine
29080e8e6a
CMake: generate the list of test suites automatically
...
We keep forgetting to register new test suites in tests/CMakeLists.txt. To
fix this problem once and for all, remove the need for manual registration.
The following test suites were missing:
test_suite_cipher.aria
test_suite_psa_crypto_driver_wrappers
test_suite_psa_crypto_generate_key.generated
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-01-25 22:36:12 +01:00
Gilles Peskine
05bf89da34
Clarify key types message from ssl_client2 and ssl_server2
...
If no key is loaded in a slot, say "none", not "invalid PK".
When listing two key types, use punctuation that's visibly a sequence
separator (",").
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2022-01-25 17:50:25 +01:00
Gilles Peskine
3de9d3a3ad
Merge pull request #5455 from AndrzejKurek/gitignore-eclipse
...
Add eclipse-specific project files to gitignore
2022-01-25 17:02:52 +01:00
Gilles Peskine
cfb151889f
Merge pull request #5457 from AndrzejKurek/key-id-encodes-owner-psa-fixes-follow-up
...
Remove incorrect incompatibility information about `MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER` from mbedtls_config.h
2022-01-25 17:02:35 +01:00
Gilles Peskine
c6753a6c90
Merge pull request #5363 from AndrzejKurek/clarify-testing-set-nonce-set-lengths
...
PSA AEAD: extend testing of set_nonce + set_lengths
2022-01-25 17:02:26 +01:00
Manuel Pégourié-Gonnard
9d95d81eae
Merge pull request #5359 from hanno-arm/mpi_montmul_remove_dead_code
...
Remove redundant write operation in Montgomery multiplication
2022-01-25 13:00:19 +01:00
Manuel Pégourié-Gonnard
24479b3185
Merge pull request #5395 from gilles-peskine-arm/ssl-opt-self-signed-positive
...
Add positive test case with self-signed certificates
2022-01-25 12:53:56 +01:00
Andrzej Kurek
cfc920a960
Remove incorrect incompatibility information from mbedtls_config.h
...
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-01-25 06:33:08 -05:00
Andrzej Kurek
36fd329442
Add eclipse-specific project files to gitignore
...
The project file must be at root directory:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=78438
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
2022-01-25 06:11:58 -05:00
Jerry Yu
0b994b8061
fix typo error
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-01-25 17:22:12 +08:00
Jerry Yu
53037894ab
change the defaut sig_algs order
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-01-25 14:38:01 +08:00
Jerry Yu
18c833e2eb
fix tls1_2 only sig_algs order issue
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-01-25 14:38:01 +08:00
Jerry Yu
f377d644f5
Refactor duplicate check
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-01-25 14:38:01 +08:00
Jerry Yu
6ade743a43
Add mbedtls_printf alias for !PLATFORM_C
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2022-01-25 14:38:01 +08:00