embedded-tls icon indicating copy to clipboard operation
embedded-tls copied to clipboard

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

Open bugadani opened this issue 1 year ago • 2 comments

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 avatar Apr 19 '23 16:04 bugadani

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

bugadani avatar Apr 21 '23 12:04 bugadani

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 :)

bugadani avatar Apr 24 '23 09:04 bugadani