Repository navigation
fix(hip): HIP_CIPHER warns at six Cipher IDs although RFC 7401 allows six - #1111
Merged
Merged
Conversation
… six RFC 7401 section 5.2.8 allows up to six Cipher IDs, and a recipient accepts the first six and drops the rest. The reader warned at six and kept every ID at seven or more. It now warns only above six and keeps the first six; the reported length is still the whole wire record. The existing HIP unit test pinned the old warning at six; it now uses seven. New module tests/protocols/internet/test_hip_cipher_limit_unit.py covers 5, 6 and 7 IDs. Closes #1092
Owner
Author
|
Cross-review verdict on
|
Contributor
|
Coverage: 88.74% (unit tier, Python 3.14,
Per-file detail: the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make pylint,make mypy,make isort) — Makefile flags run on the touched files; mypy and isort clean, pylint adds nothing on the changed linesmake testpasses, and a test case covers the change — modules run: newtest_hip_cipher_limit_unit.py,test_hip_unit.py,test_option_roundtrip_unit.py,tests/projectWhat is the purpose of your pull request?
fix— corrects a defectCloses #1092. RFC 7401 §5.2.8 allows up to six Cipher IDs, and a recipient keeps the first six and drops the rest.
_read_param_hip_ciphernow warns only above six and truncates to six.lengthis still the whole wire record, so parsing bookkeeping is unchanged. The maker had no limit and is left alone.test_hip_unit.pypinned the old warning at six; it now uses seven. Without the fix the new module gives2 failed, 1 passed(6 and 7 fail, 5 passes); with it,2 passed.test_hip_unit34 passed, round-trip 6 passed,tests/project379 passed, 1 skipped.