Skip to content

record: add API to send a record with padding

This is a continuation of !574 (merged)

To expose the TLS 1.3 record padding to applications, this MR adds two new functions: gnutls_record_send2() and gnutls_record_get_max_pad_size(). The former is a variant of gnutls_record_send() but takes additional pad and flags parameters to specify the padding behavior. The latter is to calculate the maximum possible padding size considering the protocol overhead. This is not essential but might be useful to catch any errors earlier.

Checklist

  • Code modified for feature
  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Documentation updated

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
Edited by Nikos Mavrogiannopoulos

Merge request reports