input_len is the length of the currently parsed input, while ssl_state->curr_connp->message_length is the length of the message being parsed.

The two can differ if:
- there are several handshake messages packed into one record (in that case, input_len >> message_len). This is usually the case
- the handshake message is fragmented across several records. In that case, input_len < message_len

I changed the test at the beginning of this function to check both values. It returns the message length to tell the parser that it has handled the entire ServerHello message.