-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
TLS cleanups #25861
TLS cleanups #25861
Conversation
Declaration is unused, it was added by mistake in 46c5c33.
Make it clear which of the multiple interfaces a TLSWrap method is implementing by grouping and commenting the related methods.
`tls` shadows the global `tls` require, and isn't indicative of the arument type.
- Don't use both break and return simultaneously. - Use case:/UNREACHABLE() to enforce that all cases are handled, instead of CHECK().
The const_cast used to be necessary for SSL_get_app_data() in OpenSSL 0.9.7, but node doesn't compile against OpenSSL versions that old. However, now it's needed for the recently introduced SSL_renegotiate_pending(), which is not const-correct as of 1.1.1a.
1b4897a
to
534379e
Compare
@nodejs/crypto |
@nodejs/collaborators please take a look |
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
@joyeecheung |
@sam-github You probably need to add a |
^^^^ Yup, adding that comment fixed it. |
@Trott Thanks! I had no idea the comment was required. |
Landed in b1cc1af...62b4796. |
Make it clear which of the multiple interfaces a TLSWrap method is implementing by grouping and commenting the related methods. PR-URL: #25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
`tls` shadows the global `tls` require, and isn't indicative of the arument type. PR-URL: #25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
- Don't use both break and return simultaneously. - Use case:/UNREACHABLE() to enforce that all cases are handled, instead of CHECK(). PR-URL: #25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
The const_cast used to be necessary for SSL_get_app_data() in OpenSSL 0.9.7, but node doesn't compile against OpenSSL versions that old. However, now it's needed for the recently introduced SSL_renegotiate_pending(), which is not const-correct as of 1.1.1a. PR-URL: #25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Make it clear which of the multiple interfaces a TLSWrap method is implementing by grouping and commenting the related methods. PR-URL: #25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
- Don't use both break and return simultaneously. - Use case:/UNREACHABLE() to enforce that all cases are handled, instead of CHECK(). Backport-PR-URL: nodejs#25968 PR-URL: nodejs#25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: nodejs#25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Backport-PR-URL: nodejs#25968
- Don't use both break and return simultaneously. - Use case:/UNREACHABLE() to enforce that all cases are handled, instead of CHECK(). Backport-PR-URL: #25968 PR-URL: #25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Declaration is unused, it was added by mistake in 46c5c33. PR-URL: nodejs#25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Make it clear which of the multiple interfaces a TLSWrap method is implementing by grouping and commenting the related methods. PR-URL: nodejs#25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
`tls` shadows the global `tls` require, and isn't indicative of the arument type. PR-URL: nodejs#25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
The const_cast used to be necessary for SSL_get_app_data() in OpenSSL 0.9.7, but node doesn't compile against OpenSSL versions that old. However, now it's needed for the recently introduced SSL_renegotiate_pending(), which is not const-correct as of 1.1.1a. PR-URL: nodejs#25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
- Don't use both break and return simultaneously. - Use case:/UNREACHABLE() to enforce that all cases are handled, instead of CHECK(). Backport-PR-URL: nodejs#25968 PR-URL: nodejs#25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Minor TLS cleanups, mostly small refactors for clarity, and updates to documentation, with a few lib/_tls_wrap debug statements thrown in.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes