[1.1.1][test] Avoid missing EC_GROUP wrappers #12433
Closed
Conversation
Backport of #12096 to 1.1.1 broke the build as the following functions are missing: const BIGNUM *EC_GROUP_get0_field(const EC_GROUP *group); int EC_GROUP_get_field_type(const EC_GROUP *group); Turns out that for the purposes of the test code, we don't really need to differentiate between prime and binary fields, and we can directly use the existing `EC_GROUP_get_degree()` in the same fashion as was being done for binary fields also for prime fields. Fixes #12432
Closed
|
My fault :( |
|
Approve if Travis is successful |
Actually not, it was my fault, I endorsed backporting to 1.1.1 as cherry-picking cleanly, but clearly my dev worktree must have been in some weird state to not trigger build failures! |
| bsize = (EC_GROUP_get_field_type(group) == NID_X9_62_prime_field) ? | ||
| BN_num_bytes(EC_GROUP_get0_field(group)) : | ||
| (EC_GROUP_get_degree(group) + 7) / 8; | ||
| bsize = (EC_GROUP_get_degree(group) + 7) / 8; |
Comment on lines
-2126
to
+2126
romen
Jul 13, 2020
Author
Member
@bbbrumley Am I missing why (other than for clarity) you did not use EC_GROUP_get_degree() in both cases?
@bbbrumley Am I missing why (other than for clarity) you did not use EC_GROUP_get_degree() in both cases?
bbbrumley
Jul 14, 2020
Contributor
Not really. It started out with no EC_GROUP_get_degree or branches at all but then failed for some old binary curves. So then I went digging for how to make that work and didn't back up to reconsider. (I would not have expected EC_GROUP_get_degree to do anything sane for GFp curves, but looks like I'm wrong.)
Not really. It started out with no EC_GROUP_get_degree or branches at all but then failed for some old binary curves. So then I went digging for how to make that work and didn't back up to reconsider. (I would not have expected EC_GROUP_get_degree to do anything sane for GFp curves, but looks like I'm wrong.)
openssl-machine
pushed a commit
that referenced
this pull request
Jul 14, 2020
Backport of #12096 to 1.1.1 broke the build as the following functions are missing: const BIGNUM *EC_GROUP_get0_field(const EC_GROUP *group); int EC_GROUP_get_field_type(const EC_GROUP *group); Turns out that for the purposes of the test code, we don't really need to differentiate between prime and binary fields, and we can directly use the existing `EC_GROUP_get_degree()` in the same fashion as was being done for binary fields also for prime fields. Fixes #12432 Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from #12433)
|
Merged to
Thanks! |
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.
Backport of #12096 to 1.1.1 broke
the build as the following functions are missing:
Turns out that for the purposes of the test code, we don't really need
to differentiate between prime and binary fields, and we can directly
use the existing
EC_GROUP_get_degree()in the same fashion as wasbeing done for binary fields also for prime fields.
Fixes #12432
Checklist