Improve generate_tls_handshake_tests.py #144

Open
opened 2025-03-04 12:58:27 -06:00 by gilles-peskine-arm · 0 comments
gilles-peskine-arm commented 2025-03-04 12:58:27 -06:00 (Migrated from github.com)

scripts/mbedtls_framework/tls_test_case.py and generate_tls_handshake_tests.py were written in a hurry as part of a project with a tight deadline. We didn't give a lot of thought to their design and the coding was a bit rushed.

This is a time-bound task to polish what's there. In scope (not an exhaustive list):

  • Improve documentation to make it easier to add similar test cases, or test cases for different aspects of the protocol.
  • Improve the existing abstractions, or create new abstractions, to improve the structure of the existing code.
  • Refactor write_tls_handshake_defragmentation_test(). It's too big and messy for my taste (and pylint), but it's not obvious how to improve it. Maybe make it a derived class of TestCase?
  • Improve styling.

Out of scope:

  • Add support for new features, e.g. DTLS.
  • Backend work — in this task, the objective remains to generate a sub-suite of ssl-opt.sh.
[`scripts/mbedtls_framework/tls_test_case.py`](https://github.com/Mbed-TLS/mbedtls-framework/blob/main/scripts/mbedtls_framework/tls_test_case.py) and [`generate_tls_handshake_tests.py`](https://github.com/Mbed-TLS/mbedtls-framework/blob/main/scripts/generate_tls_handshake_tests.py) were written in a hurry as part of a project with a tight deadline. We didn't give a lot of thought to their design and the coding was a bit rushed. This is a time-bound task to polish what's there. In scope (not an exhaustive list): * Improve documentation to make it easier to add similar test cases, or test cases for different aspects of the protocol. * Improve the existing abstractions, or create new abstractions, to improve the structure of the existing code. * Refactor `write_tls_handshake_defragmentation_test()`. It's too big and messy for my taste (and pylint), but it's not obvious how to improve it. Maybe make it a derived class of `TestCase`? * Improve styling. Out of scope: * Add support for new features, e.g. DTLS. * Backend work — in this task, the objective remains to generate a sub-suite of `ssl-opt.sh`.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/mbedtls-framework#144
No description provided.