diff --git a/src/env.h b/src/env.h
index b3f55c173a..c558764c67 100644
--- a/src/env.h
+++ b/src/env.h
@@ -131,6 +131,7 @@ namespace node {
V(netmask_string, "netmask") \
V(nice_string, "nice") \
V(nlink_string, "nlink") \
+ V(npn_buffer_string, "npnBuffer") \
V(nsname_string, "nsname") \
V(ocsp_request_string, "OCSPRequest") \
V(offset_string, "offset") \
@@ -181,6 +182,7 @@ namespace node {
V(serial_string, "serial") \
V(scavenge_string, "scavenge") \
V(scopeid_string, "scopeid") \
+ V(selected_npn_buffer_string, "selectedNpnBuffer") \
V(sent_shutdown_string, "sentShutdown") \
V(serial_number_string, "serialNumber") \
V(service_string, "service") \
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 1f50b643b5..2bbfa0552b 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -1917,14 +1917,17 @@ int SSLWrap::AdvertiseNextProtoCallback(SSL* s,
HandleScope handle_scope(env->isolate());
Context::Scope context_scope(env->context());
- if (w->npn_protos_.IsEmpty()) {
+ Local npn_buffer =
+ w->object()->GetHiddenValue(env->npn_buffer_string());
+
+ if (npn_buffer.IsEmpty()) {
// No initialization - no NPN protocols
*data = reinterpret_cast("");
*len = 0;
} else {
- Local