8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e6d992 commit b1ddf11Copy full SHA for b1ddf11
src/node.cc
@@ -2925,7 +2925,7 @@ static Local<Object> GetFeatures(Environment* 8000 env) {
2925
// TODO(bnoordhuis) ping libuv
2926
obj->Set(FIXED_ONE_BYTE_STRING(env->isolate(), "ipv6"), True(env->isolate()));
2927
2928
-#ifdef OPENSSL_NPN_NEGOTIATED
+#ifndef OPENSSL_NO_NEXTPROTONEG
2929
Local<Boolean> tls_npn = True(env->isolate());
2930
#else
2931
Local<Boolean> tls_npn = False(env->isolate());
src/node_constants.cc
@@ -940,7 +940,7 @@ void DefineOpenSSLConstants(Local<Object> target) {
940
NODE_DEFINE_CONSTANT(target, DH_NOT_SUITABLE_GENERATOR);
941
#endif
942
943
944
#define NPN_ENABLED 1
945
NODE_DEFINE_CONSTANT(target, NPN_ENABLED);
946
src/node_crypto.cc
@@ -147,7 +147,7 @@ template void SSLWrap<TLSWrap>::OnClientHello(
147
void* arg,
148
const ClientHelloParser::ClientHello& hello);
149
150
151
template int SSLWrap<TLSWrap>::AdvertiseNextProtoCallback(
152
SSL* s,
153
const unsigned char** data,
@@ -1309,11 +1309,11 @@ void SSLWrap<Base>::AddMethods(Environment* env, Local<FunctionTemplate> t) {
1309
env->SetProtoMethod(t, "setMaxSendFragment", SetMaxSendFragment);
1310
#endif // SSL_set_max_send_fragment
1311
1312
1313
env->SetProtoMethod(t, "getNegotiatedProtocol", GetNegotiatedProto);
1314
-#endif // OPENSSL_NPN_NEGOTIATED
+#endif // OPENSSL_NO_NEXTPROTONEG
1315
1316
1317
env->SetProtoMethod(t, "setNPNProtocols", SetNPNProtocols);
1318
1319
@@ -1333,15 +1333,15 @@ void SSLWrap<Base>::AddMethods(Environment* env, Local<FunctionTemplate> t) {
1333
1334
template <class Base>
1335
void SSLWrap<Base>::InitNPN(SecureContext* sc) {
1336
1337
// Server should advertise NPN protocols
1338
SSL_CTX_set_next_protos_advertised_cb(sc->ctx_,
1339
AdvertiseNextProtoCallback,
1340
nullptr);
1341
// Client should select protocol from list of advertised
1342
// If server supports NPN
1343
SSL_CTX_set_next_proto_select_cb(sc->ctx_, SelectNextProtoCallback, nullptr);
1344
1345
1346
#ifdef NODE__HAVE_TLSEXT_STATUS_CB
1347
// OCSP stapling
@@ -2098,7 +2098,7 @@ void SSLWrap<Base>::GetProtocol(const FunctionCallbackInfo<Value>& args) {
2098
}
2099
2100
2101
2102
2103
int SSLWrap<Base>::AdvertiseNextProtoCallback(SSL* s,
2104
@@ -2238,7 +2238,7 @@ void SSLWrap<Base>::SetNPNProtocols(const FunctionCallbackInfo<Value>& args) {
2238
env->npn_buffer_private_symbol(),
2239
args[0]).FromJust());
2240
2241
2242
2243
#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
2244
src/node_crypto.h
@@ -249,7 +249,7 @@ class SSLWrap {
249
const v8::FunctionCallbackInfo<v8::Value>& args);
250
251
252
253
static void GetNegotiatedProto(
254
255
static void SetNPNProtocols(const v8::FunctionCallbackInfo<v8::Value>& args);
@@ -263,7 +263,7 @@ class SSLWrap {
263
const unsigned char* in,
264
unsigned int inlen,
265
void* arg);
266
267
268
static void GetALPNNegotiatedProto(
269
@@ -328,7 +328,7 @@ class Connection : public AsyncWrap, public SSLWrap<Connection> {
328
static void Initialize(Environment* env, v8::Local<v8::Object> target);
329
void NewSessionDoneCb();
330
331
332
v8::Persistent<v8::Object> npnProtos_;
333
v8::Persistent<v8::Value> selectedNPNProto_;
334