-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.28 only: tests/test_suite_ecp: Fix ECP group compare test #7907
2.28 only: tests/test_suite_ecp: Fix ECP group compare test #7907
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, this still doesn't look right.
tests/suites/test_suite_ecp.function
Outdated
@@ -64,9 +64,6 @@ inline static int mbedtls_ecp_group_cmp(mbedtls_ecp_group *grp1, | |||
if (grp1->T_size != grp2->T_size) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we comparing T_size
but not T
? Doesn't T_size
also depend on the state of the group structure? (AFAICT from reading ecp.c
, it does.)
On a related note, please add a comment explaining why we are not comparing T
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it does. I missed T_size
here. Will update it and add a comment. :)
24a1b36
a8592c7
to
24a1b36
Compare
ECP group compare function should not check the value of T. We only need to assert the value of T after the ECP group copy function is called. Signed-off-by: Gowtham Suresh Kumar <[email protected]>
24a1b36
to
21f2b7a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The task requires both a PR to development and a PR to 2.28, but they're going to be very different, so there's no reason to wait until development is ready, we can merge the 2.28 PR independently. |
Description
ECP group compare function should not check the value of T. We only need to assert the value of T after the ECP group copy function is called.
Relates to #6707.
PR checklist
Please tick as appropriate and edit the reasons (e.g.: "backport: not needed because this is a new feature")
Notes for the submitter
Please refer to the contributing guidelines, especially the
checklist for PR contributors.