Gilles Peskine 55490d4e1f mbedtls_ssl_handshake_params: use bytes for some small values
Replace bitfields mbedtls_ssl_handshake_params by bytes. This saves some
code size, and since the bitfields weren't group, this doesn't increase the
RAM usage.

Replace several ints that only store values in the range 0..255 by uint8_t.
This can increase or decrease the code size depending on the architecture
and on how the field is used. I chose changes that save code size on Arm
Thumb builds and will save more after field reordering.

Leave the bitfields in struct mbedtls_ssl_hs_buffer alone: replacing them by
uint8_t slightly increases the code size.

Results (arm-none-eabi-gcc 7.3.1, build_arm_none_eabi_gcc_m0plus build):
library/ssl_cli.o: 19759 -> 19763 (diff: -4)
library/ssl_srv.o: 20790 -> 20754 (diff: 36)
library/ssl_tls13_keys.o: 5153 -> 5133 (diff: 20)

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
2021-11-29 12:01:39 +01:00
..
2021-09-27 16:22:08 +02:00
2021-06-28 09:24:07 +01:00
2021-10-25 22:15:20 +02:00
2021-08-19 09:55:41 +01:00
2021-10-21 11:33:37 +02:00
2021-11-03 16:13:32 +01:00
2021-06-17 21:46:29 +02:00
2021-09-27 16:22:08 +02:00
2021-10-25 10:41:29 +08:00
2021-10-25 10:41:29 +08:00
2021-06-25 12:46:40 +01:00
2021-09-27 16:34:58 +08:00
2021-06-08 16:45:41 +02:00
2021-08-19 09:31:55 +01:00
2021-06-28 09:24:07 +01:00
2021-06-16 10:34:25 +02:00
2021-06-16 10:34:25 +02:00
2021-06-28 09:24:07 +01:00
2021-06-08 16:45:41 +02:00
2021-09-08 22:04:13 +05:30
2021-10-08 16:28:32 +02:00
2021-08-19 09:31:55 +01:00
2021-08-19 09:31:55 +01:00
2021-08-19 09:31:55 +01:00
2021-08-19 09:56:47 +01:00
2021-08-31 22:54:27 +02:00
2021-11-17 16:03:06 +08:00
2021-11-15 03:37:11 +00:00
2021-11-11 06:46:35 +00:00
2021-06-28 09:28:33 +01:00