f171e836eb
fix lenght mismatch error
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
b7ab336b3a
fix format issue
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
a2cf7bd243
fix comment issues
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
6a64310002
Cleanup client_hello body.
...
cleanup `ssl_tls13_write_client_hello_body`, fix comments issues.
And move ciphersuites to separate function
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
67d4ed5b22
force change state type
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
159c5a0e12
fix comments issues
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
08906d006b
fix name conversion issues
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
e41dec0158
Rename write signature algorithms function
...
To keep similar name with other place.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
eecfbf001c
fix format issues
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
995ecd396f
fix wrong iana values and comments
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
c4d22444d6
fix undeclared variable error
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
# Conflicts:
# library/ssl_tls13_client.c
2021-09-03 16:29:20 +08:00
5cc8f0a0d8
Add simple document for tls13 functions
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
275619336a
fix name conversion issue for tls13 server entry
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
92c6b402d7
Remove prototype of static functions
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
9176c3ad8c
trim spaces
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
9e42f6efd3
Revert "Move random function check"
...
This reverts commit cc88b34f79
.
It causes many test fail. It should be re-considered.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
d532fe7720
write client hello also in hello reqeust
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
f443681f56
fix function name conversion issues
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
55b9038600
fix coding style issue
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
2ac64193ad
Apply MBEDTLS_PUT_xyz
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
e885b76980
fix too long lines
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:20 +08:00
6f13f64aa6
fix various format issues
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:19 +08:00
708202b7d0
Move random function check
...
move to `ssl_conf_check`
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:19 +08:00
c7ddeec229
Remove len_without_binders
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:19 +08:00
8e7ca0432e
fix extensions_present issues
...
fix comments for the mask values. follow same order
as IANA values.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:19 +08:00
32cd5b19dc
fix unused variable warning
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:19 +08:00
ef6b36b484
add supported versions extension
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:19 +08:00
bc20bdd3a9
Implement write_partial with dummy exts
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:19 +08:00
93bcd61a41
Add field into handshake params
...
Add `extensions_present` field. It represents
which are present.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:19 +08:00
c8a392c47e
Implement stages except write_partial
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:19 +08:00
65dd2ccfe6
Add dummy stages for client_hello_process
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:19 +08:00
a13c7e739c
add dummy client hello process
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:19 +08:00
beb3f41f2f
Add handshake_set_state helper function
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-09-03 16:29:19 +08:00
64f0b5f454
Return BAD_INPUT error for CCM context's erroneous state
...
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com >
2021-09-02 11:50:54 +02:00
6f015a8798
Merge pull request #2327 from kennethsoerensen/pkparse-warning
...
Remove compiler warning if only MBEDTLS_PK_PARSE_C is defined
2021-09-01 16:53:45 +02:00
7251eda6ff
Replace BAD_SEQUENCE error with BAD_INPUT
...
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com >
2021-09-01 13:26:44 +02:00
5a8abb144c
Merge pull request #4883 from mstarzyk-mobica/fix_psa_sign_msg
...
PSA MAC computation with _HASH flag implies _MESSAGE.
2021-09-01 12:23:20 +02:00
e28d49b3b6
Remove compiler warning if only MBEDTLS_PK_PARSE_C is defined
...
Warning reported with IAR compiler:
"mbedtls\library\pkparse.c",1167 Warning[Pe550]: variable "ret" was set but never used
Signed-off-by: Kenneth Soerensen <knnthsrnsn@gmail.com >
2021-08-31 13:05:12 +02:00
e45ee40f7e
Merge pull request #4811 from hanno-arm/tls13_ciphersuite_api
...
Add TLS 1.3 ciphersuite and key exchange identifiers and API
2021-08-30 09:47:46 +02:00
d85a52c508
Add mask for kex_modes
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-08-25 18:13:57 +08:00
69e0ec46b7
Replace SHA512_C with SHA384_C
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-08-25 18:13:48 +08:00
cadebe5343
fix several format and comment issues
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com >
2021-08-25 18:13:42 +08:00
cbefb6ba4d
Merge branch 'development' into ccm_chunked
...
Conflicts:
library/ccm.c
Conflict resolved by re-applying the MBEDTLS_BYTE_0 macro.
Conflict resolved by ignoring the MBEDTLS_PUT_UINT16_BE macro
used in development branch on the 'b' buffer, because the 'b'
buffer is removed in current branch.
2021-08-24 15:14:23 +02:00
a5cb0d24d4
Tidy up grouped MBEDTLS_BYTE_x macros
...
exchange groups of the byte reading macros with MBEDTLS_PUT_UINTxyz
and then shift the pointer afterwards. Easier to read as you can
see how big the data is that you are putting in, and in the case of
UINT32 AND UINT64 it saves some vertical space.
Signed-off-by: Joe Subbiani <joe.subbiani@arm.com >
2021-08-23 11:52:28 +01:00
94180e708f
Minor coding style improvement
...
Signed-off-by: Joe Subbiani <joe.subbiani@arm.com >
2021-08-20 16:20:44 +01:00
e4603eece9
Compress byte reading macros in if statements
...
exchange MBEDTLS_BYTE_x in if statements with MBEDTLS_GET_UINT16_BE
Signed-off-by: Joe Subbiani <joe.subbiani@arm.com >
2021-08-20 13:05:30 +01:00
1f6c3aeb63
Tidy up ssl_*.c grouped MBEDTLS_BYTE_x macros
...
exchange groups of the byte reading macros with MBEDTLS_PUT_UINTxyz
and then shift the pointer afterwards. Easier to read as you can
see how big the data is that you are putting in, and in the case of
UINT32 AND UINT64 it saves some vertical space.
Signed-off-by: Joe Subbiani <joe.subbiani@arm.com >
2021-08-20 12:19:57 +01:00
ce0e6a9dea
Require MESSAGE flag in PSA MAC setup.
...
Signed-off-by: Mateusz Starzyk <mateusz.starzyk@mobica.com >
2021-08-20 11:33:51 +02:00
9ab1866b0d
Remove trailing whitespace
...
Signed-off-by: Joe Subbiani <joe.subbiani@arm.com >
2021-08-19 09:57:42 +01:00
d0687856af
Improve documentation and add more uses of MBEDTLS_PUT
...
minor changes, such as improving the documentation for the byte reading
macros, and using MBEDTLS_PUT_UINT16_xy in place of byte reading
macro combinations
Signed-off-by: Joe Subbiani <joe.subbiani@arm.com >
2021-08-19 09:57:42 +01:00