diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 664bf1a72c7e8c..798752d74f6ce6 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -162,7 +162,11 @@ template void SSLWrap::SetSNIContext(SecureContext* sc); template int SSLWrap::SetCACerts(SecureContext* sc); template SSL_SESSION* SSLWrap::GetSessionCallback( SSL* s, +#if OPENSSL_VERSION_NUMBER < 0x10100000L unsigned char* key, +#else + const unsigned char *key, +#endif int len, int* copy); template int SSLWrap::NewSessionCallback(SSL* s, @@ -1394,7 +1398,11 @@ void SSLWrap::InitNPN(SecureContext* sc) { template SSL_SESSION* SSLWrap::GetSessionCallback(SSL* s, +#if OPENSSL_VERSION_NUMBER < 0x10100000L unsigned char* key, +#else + const unsigned char* key, +#endif int len, int* copy) { Base* w = static_cast(SSL_get_app_data(s)); diff --git a/src/node_crypto.h b/src/node_crypto.h index 3abfe973a79ebd..c3d728fef56a2c 100644 --- a/src/node_crypto.h +++ b/src/node_crypto.h @@ -232,7 +232,11 @@ class SSLWrap { static void AddMethods(Environment* env, v8::Local t); static SSL_SESSION* GetSessionCallback(SSL* s, +#if OPENSSL_VERSION_NUMBER < 0x10100000L unsigned char* key, +#else + const unsigned char* key, +#endif int len, int* copy); static int NewSessionCallback(SSL* s, SSL_SESSION* sess);