GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — tls: expose built-in root certificates by bnoordhuis · Pull Request #26415 · nodejs/node

Conversation

@bnoordhuis

@bnoordhuis bnoordhuis commented Mar 3, 2019

Copy link
Copy Markdown
Member

Fixes: #25824

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss and chjj reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@nodejs-github-bot

nodejs-github-bot commented Mar 3, 2019

Copy link
Copy Markdown
Collaborator

@bnoordhuis build started: https://ci.nodejs.org/blue/organizations/jenkins/node-test-pull-request-lite-pipeline/detail/node-test-pull-request-lite-pipeline/2751/pipeline

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. labels Mar 3, 2019
cjihrig
cjihrig approved these changes Mar 3, 2019
View reviewed changes
vsemozhetbyt
vsemozhetbyt reviewed Mar 3, 2019
View reviewed changes
Comment thread doc/api/tls.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread doc/api/tls.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

BridgeAR
BridgeAR approved these changes Mar 4, 2019
View reviewed changes

@BridgeAR BridgeAR left a comment

Copy link
Copy Markdown
Member

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 with the doc comments being addressed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
lpinca
lpinca approved these changes Mar 4, 2019
View reviewed changes
sam-github
sam-github approved these changes Mar 4, 2019
View reviewed changes

@sam-github sam-github left a comment

Copy link
Copy Markdown
Contributor

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.

A suggestion about the naming and docs, but otherwise LGTM, thanks.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread doc/api/tls.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread doc/api/tls.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

@sam-github sam-github added the semver-minor PRs that contain new features and should be released in the next minor version. label Mar 4, 2019
@bnoordhuis
bnoordhuis force-pushed the fix25824 branch from 765bd55 to 270f323 Compare March 5, 2019 19:48
@bnoordhuis

bnoordhuis commented Mar 5, 2019

Copy link
Copy Markdown
Member Author

Thanks for the reviews, feedback incorporated. I also added a regression test (forgot to check it in.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sam-github

sam-github commented Mar 5, 2019

Copy link
Copy Markdown
Contributor

@bnoordhuis no comment on calling it tls.DEFAULT_CA like the other defaults?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vsemozhetbyt
vsemozhetbyt reviewed Mar 5, 2019
View reviewed changes
Comment thread doc/api/tls.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell approved these changes Mar 5, 2019
View reviewed changes
@bnoordhuis

bnoordhuis commented Mar 5, 2019

Copy link
Copy Markdown
Member Author

no comment on calling it tls.DEFAULT_CA like the other defaults?

No strong opinion anyway. :-) I was waiting to see if anyone else commented on that.

FWIW, if I had to pick something in all caps, I'd probably opt for tls.CA_ROOTS or something like that.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sam-github

sam-github commented Mar 6, 2019

Copy link
Copy Markdown
Contributor

To be clear, I'm not opionated about the capsiness of the name, they both look like fine names, it's this story that seem strange to me:

TLS exposes default values of some of the options as module properties:

  • tls .DEFAULT_CIPHERS, default value of tls.createSecureContext({ciphers: ...
  • tls.DEFAULT_ECDH_CURVE, default value ... {ecdhCurve:
  • tls.DEFAULT_MAX_VERSION, default value of ... {maxVersion:
  • tls.DEFAULT_MIN_VERSION, default value of ... {minVersion:

and now:

  • tls.CA_ROOTS / tls.roots the default value of .... {ca:

Perhaps I'm unreasonably perturbed by pattern breaks?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Mar 6, 2019

Copy link
Copy Markdown
Member Author

The tls.DEFAULT_FOO exports are reassignable (and the new value gets picked up the next time a connection is created) but this one isn't, that's why I picked a different style for the name.

I suppose making the default CA roots fully overridable by assigning to tls.DEFAULT_CA or whatever isn't completely out of the question but I don't know.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell

jasnell commented Mar 6, 2019

Copy link
Copy Markdown
Member

I'd really prefer if we could move away from that DEFAULT_FOO setter pattern on the module as it's just not going to work for the ESM side of things. That's not blocking for this PR but we need to consider an alternative approach at some point here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sam-github

sam-github commented Mar 6, 2019

Copy link
Copy Markdown
Contributor

@jasnell That is a bit of a side-track, but what would it have to look like to be esm-ok?

@bnoordhuis I see your point about not being able to be used to change the default, so being a bit different from the other DEFAULT_ definitions. I suspect reassignability might come as a feature request, and eventually we'll make it possible. It looks like you set the descriptor so that it will throw if anyone tries to set it, so that's good, nobody can complain that they set it and it didn't do anything. That was good enough for me, YMMV.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Mar 7, 2019

Copy link
Copy Markdown
Member Author

I added one more sanity check to the test: https://ci.nodejs.org/job/node-test-pull-request/21294/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR

BridgeAR commented Mar 10, 2019

Copy link
Copy Markdown
Member

@sam-github @jasnell is this ready to land out of your perspective? (I did not check the comments fully)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sam-github

sam-github commented Mar 11, 2019

Copy link
Copy Markdown
Contributor

Would be good to get some feedback by @jasnell on esm-safety, but given this pattern is used for other top-level vars in tls, I can't see why it would be blocking.

Would be good to have some @nodejs/collaborators weigh in on the naming. Its bike shedding, but we'll have to live with the shed for a long time, best be happy with it now.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott

Trott commented Mar 11, 2019

Copy link
Copy Markdown
Member

Would be good to have some @nodejs/collaborators weigh in on the naming. Its bike shedding, but we'll have to live with the shed for a long time, best be happy with it now.

Since you're inviting the bike shed discussion: I'd prefer rootCertificates to roots.

ronkorving reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis

bnoordhuis commented Mar 22, 2019

Copy link
Copy Markdown
Member Author

Is there consensus on the name?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

mcollina
mcollina approved these changes Mar 22, 2019
View reviewed changes

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

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 I don't care about the names.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ronkorving

ronkorving commented Mar 25, 2019

Copy link
Copy Markdown
Contributor

If bike shedding, I would also prefer rootCertificates (+0) to roots, but regardless the name am very happy to see this land. LGTM.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

ronkorving
ronkorving approved these changes Mar 25, 2019
View reviewed changes
@BridgeAR

BridgeAR commented Mar 25, 2019

Copy link
Copy Markdown
Member

I agree with @ronkorving and @Trott that rootCertificates is a nicer name but in the end I am fine with either.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sam-github sam-github mentioned this pull request Apr 4, 2019
Documented way to add certificates to existing SecureContext #27079
Open
@bnoordhuis
bnoordhuis force-pushed the fix25824 branch from f6cfaea to cfa3d8a Compare April 9, 2019 10:28
@bnoordhuis

bnoordhuis commented Apr 9, 2019

Copy link
Copy Markdown
Member Author

The test failures are #23089 and #24593.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Apr 10, 2019

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/22331/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis bnoordhuis added author ready PRs with CI started, the required approvals, and no outstanding review comments. and removed author ready PRs with CI started, the required approvals, and no outstanding review comments. labels May 2, 2019
@bnoordhuis
bnoordhuis force-pushed the fix25824 branch from cfa3d8a to b4f2ac2 Compare May 16, 2019 09:16
@bnoordhuis

bnoordhuis commented May 16, 2019

Copy link
Copy Markdown
Member Author

Rebased one more time. CI: https://ci.nodejs.org/job/node-test-pull-request/23139/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented May 16, 2019

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/23139/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Trott
Trott approved these changes May 16, 2019
View reviewed changes
@bnoordhuis
tls: expose built-in root certificates
c07cb00
Fixes: nodejs#25824
@bnoordhuis
bnoordhuis force-pushed the fix25824 branch from b4f2ac2 to c07cb00 Compare May 17, 2019 14:37
@bnoordhuis

bnoordhuis commented May 17, 2019

Copy link
Copy Markdown
Member Author

Again because 11:23:07 collect2: fatal error: ld terminated with signal 9 [Killed]:

https://ci.nodejs.org/job/node-test-pull-request/23161/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented May 17, 2019

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/23161/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented May 17, 2019

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/23169/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bnoordhuis bnoordhuis closed this May 20, 2019
@bnoordhuis
bnoordhuis force-pushed the fix25824 branch from c07cb00 to f1a3968 Compare May 20, 2019 09:10
bnoordhuis added a commit to bnoordhuis/io.js that referenced this pull request May 20, 2019
@bnoordhuis
tls: expose built-in root certificates
f1a3968
Fixes: nodejs#25824
PR-URL: nodejs#26415
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ron Korving <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
@bnoordhuis

bnoordhuis commented May 20, 2019

Copy link
Copy Markdown
Member Author

Landed in f1a3968, cheers.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos pushed a commit that referenced this pull request May 20, 2019
@bnoordhuis @targos
tls: expose built-in root certificates
bdd75d0
Fixes: #25824
PR-URL: #26415
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ron Korving <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
BridgeAR added a commit that referenced this pull request May 21, 2019
@BridgeAR
2019-05-21, Version 12.3.0 (Current)
e0afe0e
Notable changes:

* process:
  * Log errors using `util.inspect` in case of fatal exceptions
    (Ruben Bridgewater) #27243
* repl:
  * Add `process.on('uncaughtException')` support (Ruben Bridgewater)
    #27151
* stream:
  * Implemented `Readable.from` async iterator utility (Guy Bedford)
    #27660
* tls:
  * Expose built-in root certificates (Ben Noordhuis)
    #26415
  * Support `net.Server` options (Luigi Pinca)
    #27665
  * Expose `keylog` event on TLSSocket (Alba Mendez)
    #27654
* worker:
  * Added the ability to unshift messages from the `MessagePort`
    (Anna Henningsen) #27294
@BridgeAR BridgeAR mentioned this pull request May 21, 2019
v12.3.0 proposal #27799
Merged
4 tasks done
BridgeAR added a commit that referenced this pull request May 21, 2019
@BridgeAR
2019-05-21, Version 12.3.0 (Current)
20c11be
Notable changes:

* esm:
  * Added the `--experimental-wasm-modules` flag to support
    WebAssembly modules (Myles Borins & Guy Bedford)
    #27659
* process:
  * Log errors using `util.inspect` in case of fatal exceptions
    (Ruben Bridgewater) #27243
* repl:
  * Add `process.on('uncaughtException')` support (Ruben Bridgewater)
    #27151
* stream:
  * Implemented `Readable.from` async iterator utility (Guy Bedford)
    #27660
* tls:
  * Expose built-in root certificates (Ben Noordhuis)
    #26415
  * Support `net.Server` options (Luigi Pinca)
    #27665
  * Expose `keylog` event on TLSSocket (Alba Mendez)
    #27654
* worker:
  * Added the ability to unshift messages from the `MessagePort`
    (Anna Henningsen) #27294

PR-URL: #27799
BridgeAR added a commit that referenced this pull request May 21, 2019
@BridgeAR
2019-05-21, Version 12.3.0 (Current)
9fec70a
Notable changes:

* esm:
  * Added the `--experimental-wasm-modules` flag to support
    WebAssembly modules (Myles Borins & Guy Bedford)
    #27659
* process:
  * Log errors using `util.inspect` in case of fatal exceptions
    (Ruben Bridgewater) #27243
* repl:
  * Add `process.on('uncaughtException')` support (Ruben Bridgewater)
    #27151
* stream:
  * Implemented `Readable.from` async iterator utility (Guy Bedford)
    #27660
* tls:
  * Expose built-in root certificates (Ben Noordhuis)
    #26415
  * Support `net.Server` options (Luigi Pinca)
    #27665
  * Expose `keylog` event on TLSSocket (Alba Mendez)
    #27654
* worker:
  * Added the ability to unshift messages from the `MessagePort`
    (Anna Henningsen) #27294

PR-URL: #27799
bnoordhuis added a commit to bnoordhuis/io.js that referenced this pull request Aug 15, 2019
@bnoordhuis
tls: partially backport pull request nodejs#26415
eadc82b
This is a partial backport of commit f1a3968 ("tls: expose built-in
root certificates") from the master branch. The original commit adds a
new API, this commit just backports the non-visible changes to ease
backporting follow-up commits.

Refs: nodejs#26415
@bnoordhuis bnoordhuis mentioned this pull request Aug 15, 2019
[v8.x] crypto: update root certificates #29137
Closed
@BethGriggs BethGriggs added the lts-watch-v10.x label Aug 20, 2019
BethGriggs pushed a commit that referenced this pull request Sep 19, 2019
@bnoordhuis @BethGriggs
tls: partially backport pull request #26415
d57f797
This is a partial backport of commit f1a3968 ("tls: expose built-in
root certificates") from the master branch. The original commit adds a
new API, this commit just backports the non-visible changes to ease
backporting follow-up commits.

PR-URL: #26415
Backport-PR-URL: #29137
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Ron Korving <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
@BethGriggs BethGriggs mentioned this pull request Sep 19, 2019
v8.16.2 proposal #29617
Merged
@BethGriggs BethGriggs added land-on-v10.x and removed lts-watch-v10.x labels Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mcollina mcollina mcollina approved these changes
@jasnell jasnell jasnell approved these changes
@Trott Trott Trott approved these changes
@lpinca lpinca lpinca approved these changes
@cjihrig cjihrig cjihrig approved these changes
@BridgeAR BridgeAR BridgeAR approved these changes
+3 more reviewers
@sam-github sam-github sam-github approved these changes
@vsemozhetbyt vsemozhetbyt vsemozhetbyt left review comments
@ronkorving ronkorving ronkorving approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. semver-minor PRs that contain new features and should be released in the next minor version.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Retrieve built-in root certificates within node application

Uh oh!

There was an error while loading. Please reload this page.

12 participants

@bnoordhuis @nodejs-github-bot @sam-github @jasnell @BridgeAR @Trott @ronkorving @mcollina @lpinca @cjihrig @vsemozhetbyt @BethGriggs
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.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.