FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

crypto: don't expose OpenSSL internals by codebytere · Pull Request #29325 · nodejs/node · GitHub

/ node Public

crypto: don't expose OpenSSL internals - #29325

Closed
codebytere wants to merge 1 commit into
nodejs:masterfrom
codebytere:crypto-oaepHash-boringssl
Closed

crypto: don't expose OpenSSL internals#29325
codebytere wants to merge 1 commit into
nodejs:masterfrom
codebytere:crypto-oaepHash-boringssl

Conversation

codebytere commented Aug 26, 2019
edited
Loading

Copy link
Copy Markdown
Member

#28335 extended RSA-OAEP support with oaepHash, which works perfectly fine for OpenSSL but unfortunately is a bespoke internal for BoringSSL, and so fails to compile in Electron as BoringSSL does not expose EVP_PKEY_OP_TYPE_CRYPT or EVP_PKEY_CTRL_RSA_OAEP_MD.

OpenSSL has a macro EVP_PKEY_CTX_set_rsa_oaep_md that accomplished the selfsame purpose as documented, and which this PR switches to in order to allow BoringSSL compilation.

Passing a bad or null digest to this new macro returns an error like ERR_OSSL_BAD_DECODE and as such the error i've added to node_errors allows for a thrown error that retains the previous context.

cc @tniessen @ryzokuken

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

codebytere requested a review from tniessen August 26, 2019 19:24
nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. labels Aug 26, 2019
codebytere requested a review from ryzokuken August 26, 2019 19:25

ryzokuken left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, feel free to land after @tniessen or @sam-github approve. Thanks for this!

Comment thread src/node_crypto.cc Outdated
codebytere force-pushed the crypto-oaepHash-boringssl branch from 2ec84d4 to 5b722d6 Compare August 26, 2019 20:21
codebytere changed the title crypto: don't expose openssl internals crypto: don't expose OpenSSL internals Aug 27, 2019

Copy link
Copy Markdown
Collaborator

tniessen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Looks good!

danbev added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Aug 29, 2019

Copy link
Copy Markdown
Contributor

CI passed too! Landing this.

ryzokuken pushed a commit that referenced this pull request Aug 29, 2019
PR-URL: #29325
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>

Copy link
Copy Markdown
Contributor

Landed in 17a697c 🎉

ryzokuken closed this Aug 29, 2019
codebytere deleted the crypto-oaepHash-boringssl branch August 29, 2019 05:33
BridgeAR pushed a commit that referenced this pull request Sep 3, 2019
PR-URL: #29325
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
BridgeAR mentioned this pull request Sep 3, 2019
BridgeAR pushed a commit that referenced this pull request Sep 4, 2019
PR-URL: #29325
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
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

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants


Back | FazBrowse Home | New Git URL