Files
mbedtls/library
Hanno Becker f5970a0945 Set pointer to start of plaintext at record decryption time
The SSL context structure mbedtls_ssl_context contains several pointers
ssl->in_hdr, ssl->in_len, ssl->in_iv, ssl->in_msg pointing to various
parts of the record header in an incoming record, and they are setup
in the static function ssl_update_in_pointers() based on the _expected_
transform for the next incoming record.
In particular, the pointer ssl->in_msg is set to where the record plaintext
should reside after record decryption, and an assertion double-checks this
after each call to ssl_decrypt_buf().

This commit removes the dependency of ssl_update_in_pointers() on the
expected incoming transform by setting ssl->in_msg to ssl->in_iv --
the beginning of the record content (potentially including the IV) --
and adjusting ssl->in_msg after calling ssl_decrypt_buf() on a protected
record.

Care has to be taken to not load ssl->in_msg before calling
mbedtls_ssl_read_record(), then, which was previously the
case in ssl_parse_server_hello(); the commit fixes that.
2019-05-20 15:32:36 +01:00
..
2019-02-11 21:13:33 +00:00
2019-03-06 13:51:30 +00:00
2018-07-23 18:18:32 +01:00
2018-11-06 13:12:47 +00:00
2019-04-25 11:00:41 +03:00
2015-09-04 14:21:07 +02:00
2015-09-04 14:21:07 +02:00
2017-10-29 17:53:52 +02:00
2018-10-25 16:07:16 +01:00
2019-01-10 09:23:48 +00:00
2018-10-07 17:48:37 +01:00
2019-02-11 21:13:33 +00:00
2019-02-11 21:13:33 +00:00