drogue-iot / embedded-tls

An Rust TLS 1.3 implementation for embedded devices.
Apache License 2.0
168 stars 21 forks source link

Increment decrypt_consumed instead of assigning #121

Closed rmja closed 1 year ago

rmja commented 1 year ago

This PR fixes a regression when calling TlsConnection::read() multiple times on the same record buffer. For each call to read, the total number of consumed bytes should be incremented, and not assigned to the most recent value.