eclipse/californium.scandium — pull request #23 by sophokles73 (2014-11-17 09:43:46+00:00)
Title: Fix handling of unknown extension type

I have fixed a problem with parsing extensions included in a Hello message. If a client sends a message including e.g. a supported, an unsupported and another supported extension, the HelloExtensions class would have not been able to successfully parse the second supported extension. I have fixed this and have changed the behavior regarding the handling of unknown or unsupported extensions along the lines as well.
The TLS spec is quite unspecific regarding the handling of unknown or unsupported extensions but Section 4.2 of RFC 7250 ("RawPublicKeys with TLS") defines that a server should simply ignore a client_certificate_type extension sent by the client if it does not understand or support it.
I have generalized this behavior and have also documented it in HelloExtension.fromByteArray().
Moving the ExtensionType enum from HelloExtensions to HelloExtension provides for better encapsulation of information regarding supported and known extension types ...