@ -147,7 +147,7 @@ template void SSLWrap<TLSWrap>::OnClientHello(
void * arg ,
void * arg ,
const ClientHelloParser : : ClientHello & hello ) ;
const ClientHelloParser : : ClientHello & hello ) ;
# ifdef OPENSSL_NPN_NEGOTIATED
# ifndef OPENSSL_NO_NEXTPROTONEG
template int SSLWrap < TLSWrap > : : AdvertiseNextProtoCallback (
template int SSLWrap < TLSWrap > : : AdvertiseNextProtoCallback (
SSL * s ,
SSL * s ,
const unsigned char * * data ,
const unsigned char * * data ,
@ -1314,11 +1314,11 @@ void SSLWrap<Base>::AddMethods(Environment* env, Local<FunctionTemplate> t) {
env - > SetProtoMethod ( t , " setMaxSendFragment " , SetMaxSendFragment ) ;
env - > SetProtoMethod ( t , " setMaxSendFragment " , SetMaxSendFragment ) ;
# endif // SSL_set_max_send_fragment
# endif // SSL_set_max_send_fragment
# ifdef OPENSSL_NPN_NEGOTIATED
# ifndef OPENSSL_NO_NEXTPROTONEG
env - > SetProtoMethod ( t , " getNegotiatedProtocol " , GetNegotiatedProto ) ;
env - > SetProtoMethod ( t , " getNegotiatedProtocol " , GetNegotiatedProto ) ;
# endif // OPENSSL_NPN_NEGOTIATED
# endif // OPENSSL_NO_NEXTPROTONEG
# ifdef OPENSSL_NPN_NEGOTIATED
# ifndef OPENSSL_NO_NEXTPROTONEG
env - > SetProtoMethod ( t , " setNPNProtocols " , SetNPNProtocols ) ;
env - > SetProtoMethod ( t , " setNPNProtocols " , SetNPNProtocols ) ;
# endif
# endif
@ -1338,7 +1338,7 @@ void SSLWrap<Base>::AddMethods(Environment* env, Local<FunctionTemplate> t) {
template < class Base >
template < class Base >
void SSLWrap < Base > : : InitNPN ( SecureContext * sc ) {
void SSLWrap < Base > : : InitNPN ( SecureContext * sc ) {
# ifdef OPENSSL_NPN_NEGOTIATED
# ifndef OPENSSL_NO_NEXTPROTONEG
// Server should advertise NPN protocols
// Server should advertise NPN protocols
SSL_CTX_set_next_protos_advertised_cb ( sc - > ctx_ ,
SSL_CTX_set_next_protos_advertised_cb ( sc - > ctx_ ,
AdvertiseNextProtoCallback ,
AdvertiseNextProtoCallback ,
@ -1346,7 +1346,7 @@ void SSLWrap<Base>::InitNPN(SecureContext* sc) {
// Client should select protocol from list of advertised
// Client should select protocol from list of advertised
// If server supports NPN
// If server supports NPN
SSL_CTX_set_next_proto_select_cb ( sc - > ctx_ , SelectNextProtoCallback , nullptr ) ;
SSL_CTX_set_next_proto_select_cb ( sc - > ctx_ , SelectNextProtoCallback , nullptr ) ;
# endif // OPENSSL_NPN_NEGOTIATED
# endif // OPENSSL_NO_NEXTPROTONEG
# ifdef NODE__HAVE_TLSEXT_STATUS_CB
# ifdef NODE__HAVE_TLSEXT_STATUS_CB
// OCSP stapling
// OCSP stapling
@ -2091,7 +2091,7 @@ void SSLWrap<Base>::GetProtocol(const FunctionCallbackInfo<Value>& args) {
}
}
# ifdef OPENSSL_NPN_NEGOTIATED
# ifndef OPENSSL_NO_NEXTPROTONEG
template < class Base >
template < class Base >
int SSLWrap < Base > : : AdvertiseNextProtoCallback ( SSL * s ,
int SSLWrap < Base > : : AdvertiseNextProtoCallback ( SSL * s ,
const unsigned char * * data ,
const unsigned char * * data ,
@ -2231,7 +2231,7 @@ void SSLWrap<Base>::SetNPNProtocols(const FunctionCallbackInfo<Value>& args) {
env - > npn_buffer_private_symbol ( ) ,
env - > npn_buffer_private_symbol ( ) ,
args [ 0 ] ) . FromJust ( ) ) ;
args [ 0 ] ) . FromJust ( ) ) ;
}
}
# endif // OPENSSL_NPN_NEGOTIATED
# endif // OPENSSL_NO_NEXTPROTONEG
# ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
# ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
template < class Base >
template < class Base >