Jerry Yu
9817e3e621
fix generate check fail
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 12:47:03 +08:00
Jerry Yu
d05e1cec4b
fix build fail on check_*
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 12:47:03 +08:00
Jerry Yu
e6369b0061
fix test_cmake_as_package fail
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 12:47:03 +08:00
Jerry Yu
eb96fb508e
Add cmake generator
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 12:47:03 +08:00
Jerry Yu
6389b254c9
fix typos error
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 12:47:03 +08:00
Jerry Yu
cdcc55f46f
update test check strings
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 12:47:02 +08:00
Jerry Yu
e988f0f7a7
fix wrong typo
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 12:45:52 +08:00
Jerry Yu
e3b3412bc4
Add tests for enum helper
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 12:45:52 +08:00
Jerry Yu
e78ee99624
add enum value to string helpers
...
Only add helpers for enum in `ssl.h`.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 12:43:30 +08:00
Jerry Yu
4a2fa5d0aa
Move erase handshake secrets
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 10:37:14 +08:00
Jerry Yu
27224f58be
fix coding style issue
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 10:33:27 +08:00
Jerry Yu
5132771f5f
Revert "fix possible security leak for counter"
...
This reverts commit 8aab77e11e2aebec09dc9d682b16373771471fe0.
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 10:33:27 +08:00
Jerry Yu
7ca3054795
move zerioize tls13_hs_secrets
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 10:33:27 +08:00
Jerry Yu
23ab7a46a3
move zeroize master secrets
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 10:33:27 +08:00
Jerry Yu
2c70a39d97
move zeroize randbytes
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 10:33:27 +08:00
Jerry Yu
bdfd01835a
fix compile break after merge
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 10:33:27 +08:00
Jerry Yu
a986e9faac
Clean handshake secrets
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 10:33:27 +08:00
Jerry Yu
d103bdb01d
Clean randbytes
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 10:33:27 +08:00
Jerry Yu
745db226db
fix possible security leak for counter
...
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
2021-12-10 10:33:27 +08:00
Gilles Peskine
1dc3c4553d
Merge pull request #5295 from paul-elliott-arm/crypt_and_hash_prog
...
Add checks for return values to md functions in crypt and hash
2021-12-09 23:32:59 +01:00
Gilles Peskine
d31da1c673
Merge pull request #5270 from davidhorstmann-arm/improve-cmac-docs
...
Reword documentation of CMAC operations
2021-12-09 23:28:36 +01:00
Gilles Peskine
f40145887d
Merge pull request #5294 from paul-elliott-arm/ssl_context_info_prog
...
Two fixes for SSL context info sample program
2021-12-09 23:22:58 +01:00
Gilles Peskine
9c8c243c41
Merge pull request #5296 from paul-elliott-arm/test_suite_ssl_returns
...
Add checked returns to common functions in SSL tests without them.
2021-12-09 23:17:10 +01:00
Paul Elliott
0cf7e38606
Add checked return to cipher setup
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-12-09 18:27:01 +00:00
Paul Elliott
46a6c20d0c
Add checked returns to tests without them.
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-12-09 18:16:13 +00:00
Paul Elliott
ef9cccaf3c
Fix printf format specifier
...
Also mark function as printf variant so compiler will pickup any future
issues.
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-12-09 17:25:04 +00:00
Paul Elliott
d79d3eb736
Add checks for return values to md functions
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-12-09 17:18:10 +00:00
minosgalanakis
0f2a46c1cf
readme: Addressed review comments #2
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
Co-authored-by: davidhorstmann-arm <70948878+davidhorstmann-arm@users.noreply.github.com>
2021-12-09 17:11:30 +00:00
Minos Galanakis
d7547fcb5d
readme: Addressed review comments
...
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2021-12-09 15:06:16 +00:00
Gilles Peskine
d5b2a59826
Merge pull request #5047 from paul-elliott-arm/psa-m-aead-ccm
...
PSA Multipart AEAD CCM Internal implementation and tests.
2021-12-09 14:49:42 +01:00
Minos Galanakis
c42cadb54a
Updated readme
...
This patch adds explicit implementation requirements for
platforms architecture dependencies
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2021-12-09 13:21:20 +00:00
Paul Elliott
3820c150d1
Prevent resource leak
...
If -f was used as an argument twice to the program, then it would leak
the file resource, due to overwriting it on the second pass
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-12-09 12:48:51 +00:00
Ronald Cron
d4c64027a5
tls13: Move state transition after sending CCS to ssl_tls13_client.c
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2021-12-09 13:40:22 +01:00
Ronald Cron
a55c5a1152
ssl-opt.sh: TLS 1.3: Add middlebox compatibility tests with GnuTLS
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2021-12-09 13:40:22 +01:00
Ronald Cron
7c0185fa5f
ssl-opt.sh: TLS 1.3: Add some missing test dependencies
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2021-12-09 13:40:22 +01:00
Ronald Cron
49ad6197ca
Add injection of dummy's ChangeCipherSpec for middlebox compatibility
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2021-12-09 13:40:22 +01:00
Ronald Cron
fdb0e3f381
ssl-opt.sh: TLS 1.3: Run tests with middlebox compatibility enabled
...
Run tests with middlebox compatibility enabled but tests
dedicated to middlebox compatibility disabled.
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2021-12-09 13:40:22 +01:00
Ronald Cron
7e38cba993
Add incoming ChangeCipherSpec filtering in TLS 1.3
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2021-12-09 13:40:22 +01:00
Ronald Cron
ab65c52944
Add MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE config option
...
Signed-off-by: Ronald Cron <ronald.cron@arm.com>
2021-12-09 13:40:22 +01:00
Manuel Pégourié-Gonnard
c38c1f2411
Merge pull request #5268 from gilles-peskine-arm/struct_reordering_3.0
...
Reorder structure fields to maximize usage of immediate offset access
2021-12-09 12:54:09 +01:00
Manuel Pégourié-Gonnard
d7d740eb6e
Merge pull request #5236 from gabor-mezei-arm/4926_base64_move_constant-time_functions
...
Move base64 constant-time functions to the new module
2021-12-09 12:40:18 +01:00
Minos Galanakis
e87790baba
Update changelog
...
This patch adds explicit wording to state
that Two's complement is the official
supported signed integer representation.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
2021-12-09 09:58:43 +00:00
Paul Elliott
37ec16b579
Add explanation for workaround in test code
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-12-09 09:44:11 +00:00
Manuel Pégourié-Gonnard
b873577fc3
Merge pull request #5240 from duckpowermb/development
...
[session] fix a session copy bug
2021-12-09 09:23:23 +01:00
Manuel Pégourié-Gonnard
49c20954e4
Merge pull request #865 from davidhorstmann-arm/3.0-fix-session-copy-bug-chglog
...
Add changelog entry for session copy bugfix
2021-12-09 09:21:28 +01:00
Paul Elliott
3938fef25c
Indicate set nonce negative test failure reasons
...
Signed-off-by: Paul Elliott <paul.elliott@arm.com>
2021-12-08 20:09:09 +00:00
Gilles Peskine
cfe74a37b9
mbedtls_ssl_handshake_params: move ecrs_ctx back further
...
"mbedtls_ssl_handshake_params: reorder fields to save code size" moved this
filed earlier along with byte-sized fields that should be in the 128-element
access window on Arm Thumb. This took away precious room in the 128-byte
window. Move it back further out.
Results (same architecture, config-suite-b.h + MBEDTLS_ECDH_LEGACY_CONTEXT +
MBEDTLS_ECP_RESTARTABLE):
library/ssl_cli.o: 2860 -> 2816 (diff: 44)
library/ssl_msg.o: 3080 -> 3076 (diff: 4)
library/ssl_srv.o: 3340 -> 3300 (diff: 40)
library/ssl_tls.o: 6546 -> 6478 (diff: 68)
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-12-08 18:38:51 +01:00
Gilles Peskine
b3ec69dba5
mbedtls_ssl_config: better document former bit-fields
...
Ensure that the documentation of fields affected by
"mbedtls_ssl_config: Replace bit-fields by separate bytes"
conveys information that may have been lost by removing the exact size of
the type. Extend the preexisting pattern "do this?" for formerly 1-bit
boolean fields. Indicate the possible values for non-boolean fields.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-12-08 18:32:12 +01:00
Gilles Peskine
41139a2541
mbedtls_ssl_handshake_params: move group_list earlier to save code size
...
Placing group_list earlier seems to help significantly, not just as a matter
of placing it in the 128-element (512-byte) access window.
Results (arm-none-eabi-gcc 7.3.1, build_arm_none_eabi_gcc_m0plus build):
library/ssl_cli.o: 19559 -> 19551 (diff: 8)
library/ssl_msg.o: 24690 -> 24674 (diff: 16)
library/ssl_srv.o: 20418 -> 20406 (diff: 12)
library/ssl_tls.o: 20555 -> 20519 (diff: 36)
library/ssl_tls13_client.o: 7244 -> 7240 (diff: 4)
library/ssl_tls13_generic.o: 4693 -> 4697 (diff: -4)
Results (same architecture, config-suite-b.h + MBEDTLS_ECDH_LEGACY_CONTEXT +
MBEDTLS_ECP_RESTARTABLE):
library/ssl_cli.o: 2864 -> 2860 (diff: 4)
library/ssl_tls.o: 6566 -> 6546 (diff: 20)
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-12-08 18:26:55 +01:00
Ronald Cron
1865585eab
Merge pull request #5212 from yuhaoth/pr/add-tls13-compat-testcases
...
TLS1.3 MVP:Add tls13 compat, not supported version , certificaterequest and HRR tests
2021-12-08 14:56:39 +01:00