Skip to content

src: simplify ECDH::GetCurves() - #44309

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
tniessen:crypto-simplify-getcurves
Aug 26, 2022
Merged

src: simplify ECDH::GetCurves()#44309
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
tniessen:crypto-simplify-getcurves

Conversation

@tniessen

Copy link
Copy Markdown
Member

There is no need to explicitly branch based on num_curves or on the return value of the second call to EC_get_builtin_curves. Remove unnecessary branches and replace the loop with a functional transform.

Previously, the last line of the function body was never executed because, in practice, num_curves > 0.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants