igrr / axtls-8266

axTLS port for ESP8266
Other
79 stars 33 forks source link

Added initial support for SSL extension. #25

Closed slaff closed 7 years ago

slaff commented 8 years ago

Refactored the code to support more SSL extensions in the future.

slaff commented 7 years ago

@igrr How about merging this PR?

igrr commented 7 years ago

Apologies, this went under my radar. I'll check this first thing tomorrow...

igrr commented 6 years ago

@slaff Do you recall which server you have tested this implementation of max_fragment_length extension against? I am testing against GnuTLS and it seems to disagree on the formatting of the extension data. It seems that the extension data is one byte, with values 1/2/3/4 corresponding to 512/1024/2048/4096 fragment sizes. This also matches the wording of the RFC.

See e.g. https://gitlab.com/gnutls/gnutls/blob/master/lib/ext/max_record.c#L154-155.

slaff commented 6 years ago

This also matches the wording of the RFC.

@igrr I might have misread the RFC https://tools.ietf.org/html/rfc6066#page-8. And I am a bit confused because I cannot find the sentence saying that the value should be one byte. But if that is the case I can submit a PR for it.

igrr commented 6 years ago

The presentation is explained in the parent RFC, https://tools.ietf.org/html/rfc5246#section-4.5, i.e. An enumerated occupies as much space in the byte stream as would its maximal defined ordinal value.

slaff commented 6 years ago

@igrr You are right. Thanks for pointing that out. The following PR #55 should fix this.