Skip to content

key_share processing fails if group is the last one in supported_groups

I was doing some testing against OpenSSL and discovered that btls fails if the offered key_share uses the last group listed in supported_groups (in my test I only had one group in supported_groups).

The error seems to be here: https://gitlab.com/ilari_l/btls/blob/master/src/messages/clienthello.rs#L514

ssrc.at_end() evaluates to true on the last entry even though we have found a match.