Open bugadani opened 1 year ago
I'll leave the rustfmt commit here to prevent accidentally merging before this PR, because I expect that to be a rebase nightmare. Styling options completely up for debate, though, I just want the rustfmt file to overwrite my defaults with something consistent :)
Oh and of course, this PR will need to be split up... somehow...
To be fair, most of the data types aren't actually used currently. We might want to introduce a "placeholder" for the extensions we don't want, that just consumes and ignores the extension data till then, but I wanted to be exhaustive here.
This PR unifies extension data, i.e. it defines a parse and an encode fn for each of them, as well as adds an associated constant. Later, this PR will define all extensions described in the TLS 1.3 and companion RFCs.
This PR will one day be useful for implementing a TLS server.
This PR will allow users to use the Max Fragment Length extension.