Skip to content

tls: fix macro to check NPN feature

In order to check if NPN feature is enabled, use #ifndef OPENSSL_NO_NEXTPROTONEG rather than #ifdef OPENSSL_NPN_NEGOTIATED because the former is used in ssl.h. An ALPN test also needs NPN feature to run and it was fixed. This also change the messages when ALPN and NPN tests are skipped.

Fix #11650 (closed)

Build and tests are made with an additional commit of

diff --git a/node.gyp b/node.gyp
index 673a1d1..6a26cb1 100644
--- a/node.gyp
+++ b/node.gyp
@@ -257,6 +257,7 @@
         'NODE_WANT_INTERNALS=1',
         # Warn when using deprecated V8 APIs.
         'V8_DEPRECATION_WARNINGS=1',
+        'OPENSSL_NO_NEXTPROTONEG'
       ],

which is not included in this PR. I also made build and test in my local host and also submitted a CI job to https://ci.nodejs.org/job/node-test-commit/8210/ with this additional commit.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

tls, test

@nodejs/crypto

Merge request reports

Loading