drogue-iot / embedded-tls

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

Use the read buffer for the handshake process, make the write buffer available for cert verification #106

Open bugadani opened 1 year ago

bugadani commented 1 year ago

This may or may not be safe to do. It depends whether there are any read records that need to live past a response. The server cert is one such piece of data, but we pass that to the verifier, which can choose to store it however it wants to.

bugadani commented 1 year ago

Ah, a lovely case of "no merge conflict but this will absolutely not work if merged".

bugadani commented 1 year ago

So far only one thing suggests this may not be a good idea: clients can send early data at basically any point of the handshake process after server hello. Since we don't support early data yet, and treat the whole handshake process as one atomic step, I think this PR is at least not completely broken.

My best idea is to leave this PR hanging for a while, until we know more. It isn't very complicated and doesn't cost anything, I think :)