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

Backport of #5706 to v4.x #5983

Closed
wants to merge 1 commit into from
Closed

Conversation

svozza
Copy link
Contributor

@svozza svozza commented Mar 31, 2016

This is a backport of #5706 (doc: align doc/api/tls.markdown with style guide) to the v4.x-staging branch as requested @thealphanerd.

@jasnell
Copy link
Member

jasnell commented Apr 1, 2016

@svozza ... can you rebase your branch to the current v4.x-staging to clear out the extraneous commits here?

@svozza
Copy link
Contributor Author

svozza commented Apr 1, 2016

Oh this is weird, I ddn't see all those extra commits. I'm not actually sure how this happened. I didn't have the v4.x-staging branch before I did this change. All I did was this:

git checkout -b v4.x-staging upstream/v4.x-staging
git cherry-pick 4f6ad5c
git push -u origin v4.x-staging

My branch said it was only 1 commit ahead when I made the PR and when I do git rebase upstream/v4.x-staging it tells me I'm up to date.

@svozza
Copy link
Contributor Author

svozza commented Apr 1, 2016

OK. I think I've fixed it.

@@ -50,29 +50,41 @@ openssl pkcs12 -export -in agent5-cert.pem -inkey agent5-key.pem \
- `certfile`: all CA certs concatenated in one file like
`cat ca1-cert.pem ca2-cert.pem > ca-cert.pem`

## ALPN, NPN and SNI
Copy link
Contributor

Choose a reason for hiding this comment

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

This should not have made it into the backport

ALPN support is only on v5.x +

#2564

Please move this section

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes, I wasn't sure about that ALPN stuff. I'll remove the references.

@MylesBorins
Copy link
Contributor

@svozza when you cherry picked did you have conflicts? It appears to me like you merged all of the latest changes as opposed to manually handling the conflicts, as such we have a bunch of documentation in here about ALPN which is not a feature in v4.x

I would suggest you might find it easier in the sections with conflicts to opt for the version present in v4, not in your commit and simply reaudit those sections to make sure they are correct

@svozza
Copy link
Contributor Author

svozza commented Apr 1, 2016

Done.


NOTE: the change is effective only for the future server connections. Existing
or currently pending server connections will use previous keys.
### server.maxConnections
Copy link
Contributor

Choose a reason for hiding this comment

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

where did this come from?

@MylesBorins
Copy link
Contributor

@svozza I'm still seeing quite a bit of information in here of v5 specific documentation. Would you be open to redoing this fix from scratch using the v4 doc? Sorry for being tight on this, but I really don't want to accidentally merge incorrect docs

@svozza
Copy link
Contributor Author

svozza commented Apr 4, 2016

Yeah, no problem. I think I made a mess of the rebase.

@MylesBorins
Copy link
Contributor

@svozza thanks for all the hard work!

@MylesBorins
Copy link
Contributor

@svozza let me know if I can help with anything

@svozza
Copy link
Contributor Author

svozza commented Apr 11, 2016

Really sorry about the delay, will be able to get to it tonight though!

@svozza
Copy link
Contributor Author

svozza commented Apr 11, 2016

So I just blew away the branch and started over. No rebasing or any messing around and I think it worked out much better.

@whitlockjc
Copy link
Contributor

I apologize, I was commenting on a backport after the original commit was already accepted. I've removed my nits and will instead address these in a future PR

@svozza
Copy link
Contributor Author

svozza commented Apr 11, 2016

Oh right, I was in the process of fixing them! :) I agree that 'This event is emitted...` reads better btw.

@MylesBorins
Copy link
Contributor

@whitlockjc the review is appreciated. This backport ended up having to be a complete rewrite due to the differences (to a certain extent).

@whitlockjc
Copy link
Contributor

Well, if I wasn't out of line, let me add them back. Thanks for stepping in @thealphanerd and @svozza for being so willing to help. <3.

@@ -202,63 +202,64 @@ established it will be forwarded here.

`function (sessionId, sessionData, callback) { }`

Emitted on creation of TLS session. May be used to store sessions in external
Emitted on creation of a TLS session. May be used to store sessions in external
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency, we might use "This event is emitted" like we did for the 'secure' event.

`callback(null, sessionData)` once finished. If session can't be resumed
(i.e. doesn't exist in storage) one may call `callback(null, null)`. Calling
`callback(err)` will terminate incoming connection and destroy socket.
Emitted when the client wants to resume the previous TLS session. The event
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above for 'clientError' event.

Brings tls.markdown into alignment with the node.js
styleguide, specifically regarding the use of
personal pronouns. Also, fixes various typos,
punctuation errors, missing definite/indefinite
articles and other minor grammatical issues.

PR-URL: nodejs#5706
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@svozza
Copy link
Contributor Author

svozza commented Apr 11, 2016

Think I got them all!

@whitlockjc
Copy link
Contributor

I'll take another peek. I also see a number of places where we're using a trailing . for option/argument descriptions that themselves are not full sentences. These have been there for some time and for consistency, using what was there makes sense. But if you wanted to clean those up, I wouldn't mind. (I might be in the wrong on that one so I'll state my opinion and let someone else decide.)

@whitlockjc
Copy link
Contributor

@svozza Thanks for addressing the NOTE: and event inconsistencies. The inconsistencies with the trailing periods for argument/option documentation is rampant but this did not start with you.

If no one else has an opinion on the argument/option documentation inconsistencies, LGTM.

@svozza
Copy link
Contributor Author

svozza commented Apr 11, 2016

Yeah, I really wasn't sure what to do there so I left it originally. I was leaning towards putting fullstops everywhere but thought it might be best not to go down that rabbithole.

@whitlockjc
Copy link
Contributor

Let's see what @thealphanerd has to say. Others welcome of course as well but he was last involved before myself. Great job regardless.

@MylesBorins
Copy link
Contributor

If something is consistent in the docs and not specific to this change I think it should come in another update

@MylesBorins MylesBorins self-assigned this Apr 14, 2016
@whitlockjc
Copy link
Contributor

@thealphanerd That's what I was thinking. Seems you've assigned to yourself so I'll step out and let you merge when it's ready. Thanks for stepping in.

@MylesBorins
Copy link
Contributor

cool.. can I get an official LGTM from you @whitlockjc

@jasnell
Copy link
Member

jasnell commented Apr 27, 2016

ping @whitlockjc

@MylesBorins
Copy link
Contributor

MylesBorins commented Jun 6, 2016

ping @whitlockjc

I'm going to close for now, please feel free to reopen

@MylesBorins MylesBorins closed this Jun 6, 2016
@MylesBorins MylesBorins removed their assignment Dec 27, 2016
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.

6 participants