1
0
mirror of https://github.com/ARMmbed/mbedtls.git synced 2025-06-27 15:53:57 +08:00
Hanno Becker 03b64fa6c1 Rearrange ExtendedMasterSecret parsing logic
`mbedtls_ssl_handshake_params::extended_ms` holds the state of the
ExtendedMasterSecret extension in the current handshake. Initially
set to 'disabled' for both client and server,
- the client sets it to 'enabled' as soon as it finds the ExtendedMS
  extension in the `ServerHello` and it has advertised that extension
  in its ClientHello,
- the server sets it to 'enabled' as soon as it finds the ExtendedMS
  extension in the `ClientHello` and is willing to advertise is in its
  `ServerHello`.

This commit slightly restructures this logic in prepraration for the
removal of `mbedtls_ssl_handshake_params::extended_ms` in case both
the use and the enforcement of the ExtendedMasterSecret extension have
been fixed at compile-time. Namely, in this case there is no need for
the `extended_ms` field in the handshake structure, as the ExtendedMS
must be in use if the handshake progresses beyond the Hello stage.

Paving the way for the removal of mbedtls_ssl_handshake_params::extended_ms
this commit introduces a temporary variable tracking the presence of the
ExtendedMS extension in the ClientHello/ServerHello messages, leaving
the derivation of `extended_ms` (and potential failure) to the end of
the parsing routine.
2019-06-25 08:42:20 +01:00
..
2019-02-11 21:13:33 +00:00
2019-03-06 13:51:30 +00:00
2019-04-24 10:51:54 +02:00
2019-04-24 10:51:54 +02:00
2018-07-23 18:18:32 +01: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-04-25 11:00:41 +03: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-19 10:25:01 +01:00
2019-02-11 21:13:33 +00:00
2019-02-11 21:13:33 +00:00