summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTobias Nießen <tniessen@tnie.de>2023-03-13 15:11:35 +0100
committerGitHub <noreply@github.com>2023-03-13 14:11:35 +0000
commitc2e4b1fa9ad0b744616c4e4c13a5017772a630c4 (patch)
treefb55d09b0e8b76f37a08441540075a3ae7b1a965 /src
parent1ef4faa29bd5ef91462ce2dd1c3ec3e463d980b9 (diff)
downloadnode-new-c2e4b1fa9ad0b744616c4e4c13a5017772a630c4.tar.gz
crypto: remove ALPN_ENABLED
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: https://github.com/nodejs/node/pull/46956 PR-URL: https://github.com/nodejs/node/pull/47028 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/node_constants.cc3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/node_constants.cc b/src/node_constants.cc
index 34496673a9..6af450c281 100644
--- a/src/node_constants.cc
+++ b/src/node_constants.cc
@@ -1032,9 +1032,6 @@ void DefineCryptoConstants(Local<Object> target) {
NODE_DEFINE_CONSTANT(target, DH_NOT_SUITABLE_GENERATOR);
#endif
-#define ALPN_ENABLED 1
- NODE_DEFINE_CONSTANT(target, ALPN_ENABLED);
-
#ifdef RSA_PKCS1_PADDING
NODE_DEFINE_CONSTANT(target, RSA_PKCS1_PADDING);
#endif