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

doc: remove _optional_ designation for tls options #22545

Closed
wants to merge 2 commits into from

Conversation

Trott
Copy link
Member

@Trott Trott commented Aug 27, 2018

Options are, by definition, optional. Remove specification of some
options as "optional".

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

Options are, by definition, optional. Remove specification of some
options as "optional".
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. tls Issues and PRs related to the tls subsystem. labels Aug 27, 2018
@vsemozhetbyt
Copy link
Contributor

Node.js Collaborators, please, add 👍 here if you approve fast-tracking.

@vsemozhetbyt vsemozhetbyt added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 27, 2018
provide the client certificate.
* `crl` {string|string[]|Buffer|Buffer[]} Optional PEM formatted
CRLs (Certificate Revocation Lists).
* `cert` {string|string[]|Buffer|Buffer[]} Cert chains in PEM format. One cert
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure this is a good idea. It's hard to tell with options can be omitted now. It seems they must all be specified now.

Copy link
Member Author

Choose a reason for hiding this comment

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

If I'm not mistaken, none of them are required. (If there were required things, it should probably be named config rather than options.) I think that by specifying "Optional" for some options, we mislead the reader into thinking that some options are required.

We have it called with an empty options object twice here.

I do think the function signature needs to be updated to put options in [] to make it clear that it can be omitted, like it is here and here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I do think the function signature needs to be updated

I've now done this in a separate commit. @vsemozhetbyt PTAL to confirm you're still 👍 on this with that addition. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM, but maybe let's get at least one LGTM from @nodejs/crypto to be on the safe side.

Copy link
Member Author

Choose a reason for hiding this comment

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

LGTM, but maybe let's get at least one LGTM from @nodejs/crypto to be on the safe side.

I'll remove the fast-track label, at least until that happens. No need to rush this.

Copy link
Member Author

Choose a reason for hiding this comment

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

@nodejs/crypto Any chance someone can take a quick look at this?

@Trott Trott added the fast-track PRs that do not need to wait for 48 hours to land. label Aug 27, 2018
The `options` argument to `tls.createSecureContext()` is optional.

Indicate this by using `[` and `]` in the function signature.
Copy link
Member

@lpinca lpinca left a comment

Choose a reason for hiding this comment

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

LGTM now.

@Trott Trott removed the fast-track PRs that do not need to wait for 48 hours to land. label Aug 27, 2018
@Trott
Copy link
Member Author

Trott commented Aug 31, 2018

Probably overkill to do this but just in case folks there would want to look this over: /ping @nodejs/security-wg

@lirantal
Copy link
Member

LGTM @Trott with only a small concern that as @lpinca pointed out it might be misleading with regards to what is optional or not. In the future someone may refactor this code and rename options with data or something else and then the variable naming won't be that obvious.

I'm suggesting maybe we can specify in a comment that all options variables are indeed optional.

@lpinca
Copy link
Member

lpinca commented Aug 31, 2018

@lirantal my comment was addressed by making it optional in the signature. I think that is sufficient.
See d92be8e.

@lirantal
Copy link
Member

yep, didn't notice that and makes sense 👍

@addaleax addaleax removed the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Sep 2, 2018
@addaleax
Copy link
Member

addaleax commented Sep 2, 2018

Landed in 1672484, 8452459

@addaleax addaleax closed this Sep 2, 2018
addaleax pushed a commit that referenced this pull request Sep 2, 2018
Options are, by definition, optional. Remove specification of some
options as "optional".

PR-URL: #22545
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
addaleax pushed a commit that referenced this pull request Sep 2, 2018
The `options` argument to `tls.createSecureContext()` is optional.

Indicate this by using `[` and `]` in the function signature.

PR-URL: #22545
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
targos pushed a commit that referenced this pull request Sep 2, 2018
Options are, by definition, optional. Remove specification of some
options as "optional".

PR-URL: #22545
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
targos pushed a commit that referenced this pull request Sep 2, 2018
The `options` argument to `tls.createSecureContext()` is optional.

Indicate this by using `[` and `]` in the function signature.

PR-URL: #22545
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
targos pushed a commit that referenced this pull request Sep 3, 2018
Options are, by definition, optional. Remove specification of some
options as "optional".

PR-URL: #22545
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
targos pushed a commit that referenced this pull request Sep 3, 2018
The `options` argument to `tls.createSecureContext()` is optional.

Indicate this by using `[` and `]` in the function signature.

PR-URL: #22545
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
targos pushed a commit that referenced this pull request Sep 6, 2018
Options are, by definition, optional. Remove specification of some
options as "optional".

PR-URL: #22545
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
targos pushed a commit that referenced this pull request Sep 6, 2018
The `options` argument to `tls.createSecureContext()` is optional.

Indicate this by using `[` and `]` in the function signature.

PR-URL: #22545
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
@Trott Trott deleted the optional branch January 13, 2022 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants