From 3facd4e1dc458aa6790403c0a86beb277cc33efb Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 8 Nov 2013 17:47:39 +0100 Subject: [PATCH] crypto: unbreak build with no-NPN shared openssl Unbreak the build when linking against a shared version of OpenSSL that doesn't support NPN (Next Protocol Negotiation.) Fixes the following build error: ../src/node_crypto.cc:140: error: no member function 'AdvertiseNextProtoCallback' declared in 'node::crypto::SSLWrap' ../src/node_crypto.cc:147: error: no member function 'SelectNextProtoCallback' declared in 'node::crypto::SSLWrap' --- src/node_crypto.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 857d5862842..3bc550536a9 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -117,6 +117,8 @@ template int SSLWrap::NewSessionCallback(SSL* s, template void SSLWrap::OnClientHello( void* arg, const ClientHelloParser::ClientHello& hello); + +#ifdef OPENSSL_NPN_NEGOTIATED template int SSLWrap::AdvertiseNextProtoCallback( SSL* s, const unsigned char** data, @@ -129,6 +131,7 @@ template int SSLWrap::SelectNextProtoCallback( const unsigned char* in, unsigned int inlen, void* arg); +#endif static void crypto_threadid_cb(CRYPTO_THREADID* tid) {