Skip to content
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

Add brainpoolP256r1 curve support #421

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

zachdoctolib
Copy link

The brainpoolP256r1 curve is defined in RFC 5639, and is a recommended standard (PDF) by the German Ministry for Information Security. This curve is used in several of the German healthcare system's digitization standards (PDF; and also in German, sorry) for authenticating with various specialist services.

}

try {
promise = Promise.resolve(nodejs.apply(null, args));
promise = promise.catch(check);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nodejs.apply(null, args) is a synchronous operation so i think this statement is unreachable.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaccenture good point! nodejs.apply is a synchronous function that can throw. However, it also returns a promise that can reject. Hence we need to both wrap the call in a try/catch, and call promise.catch here. I'll add a comment to clarify.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the link, I saw return Promise.reject() so this catch here save us from unhandled promise rejection. Legitimate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants