Skip to content

cleanup: _gnutls_recv_handshake: added explicit sanity checks

Nikos Mavrogiannopoulos requested to merge tmp-explicit-sanity-checks into master

Although, this function acts on the message provided as expected and thus it should never call a message parsing function on unexpected messages, we make a more explicit sanity check. This unifies the sanity checks existing within the involved functions.

The existing test suite covers the modified paths, though the fix which is a sanity check should not be exercised by any code path.

Checklist

  • Code modified for feature

Reviewer's checklist:

  • Any issues marked for closing are addressed
  • There is a test suite reasonably covering new functionality or modifications
  • Function naming, parameters, return values, types, etc., are consistent and according to CONTRIBUTION.md
  • This feature/change has adequate documentation added
  • No obvious mistakes in the code

Merge request reports