1
0
mirror of https://github.com/ARMmbed/mbedtls.git synced 2025-06-28 00:58:05 +08:00
Hanno Becker df64596733 Remove ciphersuite from handshake params if single suite hardcoded
If MBEDTLS_SSL_SINGLE_CIPHERSUITE is enabled, the type

  mbedtls_ssl_ciphersuite_handle_t

is logically a boolean (concretely realized as `unsigned char`),
containing the invalid handle and the unique valid handle, which
represents the single enabled ciphersuite.

The SSL handshake structure mbedtls_ssl_handshake_params contains
an instance of mbedtls_ssl_ciphersuite_handle_t which is guaranteed
to be valid, and which is hence redundant in any two-valued
implementation of mbedtls_ssl_ciphersuite_handle_t.

This commit replaces read-uses of

  mbedtls_ssl_handshake_params::ciphersuite_info

by a getter functions which, and defines this getter function
either by just reading the field from the handshake structure
(in case MBEDTLS_SSL_SINGLE_CIPHERSUITE is disabled), or by
returning the single valid ciphersuite handle (in case
MBEDTLS_SSL_SINGLE_CIPHERSUITE is enabled) and removing the
field from mbedtls_ssl_handshake_params in this case.
2019-07-08 11:23:24 +01:00
..
2019-02-11 21:13:33 +00:00
2019-04-24 10:51:54 +02:00
2019-04-24 10:51:54 +02:00
2019-04-24 10:51:54 +02:00
2019-04-24 10:51:54 +02:00
2019-04-24 10:51:54 +02:00
2018-11-06 13:12:47 +00:00
2019-04-24 10:51:54 +02:00
2019-06-18 11:05:44 +01:00
2015-09-04 14:21:07 +02:00
2015-09-04 14:21:07 +02:00
2019-04-24 10:51:54 +02:00
2019-04-24 10:51:54 +02:00
2019-06-20 16:33:02 +01:00