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

src: remove TLSEXT_TYPE_alpn guard #46956

Merged
merged 1 commit into from
Mar 9, 2023

Conversation

tniessen
Copy link
Member

@tniessen tniessen commented Mar 4, 2023

TLSEXT_TYPE_application_layer_protocol_negotiation is always defined in all supported OpenSSL versions. We also use this macro elsewhere without guards, so if it did not exist, compilation would have already failed.

Besides that, it makes little sense to provide a TLS 1.3 implementation that does not support ALPN.

@tniessen tniessen added c++ Issues and PRs that require attention from people who are familiar with C++. openssl Issues and PRs related to the OpenSSL dependency. labels Mar 4, 2023
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Mar 4, 2023
@tniessen tniessen added the crypto Issues and PRs related to the crypto subsystem. label Mar 4, 2023
@panva panva added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Mar 5, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Mar 5, 2023
@nodejs-github-bot
Copy link
Collaborator

@addaleax addaleax added the commit-queue Add this label to land a pull request using GitHub Actions. label Mar 5, 2023
TLSEXT_TYPE_application_layer_protocol_negotiation is always defined in
all supported OpenSSL versions. We also use this macro elsewhere without
guards, so if it did not exist, compilation would have already failed.

Besides that, it makes little sense to provide a TLS 1.3 implementation
that does not support ALPN.

PR-URL: nodejs#46956
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
@tniessen tniessen merged commit 539dcee into nodejs:main Mar 9, 2023
@tniessen
Copy link
Member Author

tniessen commented Mar 9, 2023

Landed in 539dcee, thanks for reviewing.

tniessen added a commit to tniessen/node that referenced this pull request Mar 9, 2023
This constant was likely introduced for feature detection, but it has
been pointless for a long time.

1. I am not aware of any possible Node.js build configuration (on any
   recent/supported release line) that would have crypto.constants but
   not crypto.constants.ALPN_ENABLED.
2. There is no evidence of this constant being used for feature
   detection in the ecosystem. In fact, both internal and external type
   definitions for crypto.constants simply assume that the constant
   exists.
3. There is no good reason for any modern TLS stack to not support ALPN.
   It looks like ALPN might have been optional in much earlier versions
   of OpenSSL, but all recent versions of OpenSSL unconditionally
   support ALPN as far as I can tell.

Refs: nodejs#46956
nodejs-github-bot pushed a commit that referenced this pull request Mar 13, 2023
This constant was likely introduced for feature detection, but it has
been pointless for a long time.

1. I am not aware of any possible Node.js build configuration (on any
   recent/supported release line) that would have crypto.constants but
   not crypto.constants.ALPN_ENABLED.
2. There is no evidence of this constant being used for feature
   detection in the ecosystem. In fact, both internal and external type
   definitions for crypto.constants simply assume that the constant
   exists.
3. There is no good reason for any modern TLS stack to not support ALPN.
   It looks like ALPN might have been optional in much earlier versions
   of OpenSSL, but all recent versions of OpenSSL unconditionally
   support ALPN as far as I can tell.

Refs: #46956
PR-URL: #47028
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
targos pushed a commit that referenced this pull request Mar 13, 2023
TLSEXT_TYPE_application_layer_protocol_negotiation is always defined in
all supported OpenSSL versions. We also use this macro elsewhere without
guards, so if it did not exist, compilation would have already failed.

Besides that, it makes little sense to provide a TLS 1.3 implementation
that does not support ALPN.

PR-URL: #46956
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
targos pushed a commit that referenced this pull request Mar 14, 2023
TLSEXT_TYPE_application_layer_protocol_negotiation is always defined in
all supported OpenSSL versions. We also use this macro elsewhere without
guards, so if it did not exist, compilation would have already failed.

Besides that, it makes little sense to provide a TLS 1.3 implementation
that does not support ALPN.

PR-URL: #46956
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
danielleadams pushed a commit that referenced this pull request Apr 11, 2023
TLSEXT_TYPE_application_layer_protocol_negotiation is always defined in
all supported OpenSSL versions. We also use this macro elsewhere without
guards, so if it did not exist, compilation would have already failed.

Besides that, it makes little sense to provide a TLS 1.3 implementation
that does not support ALPN.

PR-URL: #46956
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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 pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue Add this label to land a pull request using GitHub Actions. crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. openssl Issues and PRs related to the OpenSSL dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants