|
@ -857,6 +857,7 @@ void SSLWrap<Base>::AddMethods(Handle<FunctionTemplate> t) { |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "renegotiate", Renegotiate); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "renegotiate", Renegotiate); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "shutdown", Shutdown); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "shutdown", Shutdown); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "getTLSTicket", GetTLSTicket); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "getTLSTicket", GetTLSTicket); |
|
|
|
|
|
NODE_SET_PROTOTYPE_METHOD(t, "newSessionDone", NewSessionDone); |
|
|
|
|
|
|
|
|
#ifdef SSL_set_max_send_fragment |
|
|
#ifdef SSL_set_max_send_fragment |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "setMaxSendFragment", SetMaxSendFragment); |
|
|
NODE_SET_PROTOTYPE_METHOD(t, "setMaxSendFragment", SetMaxSendFragment); |
|
@ -929,6 +930,7 @@ int SSLWrap<Base>::NewSessionCallback(SSL* s, SSL_SESSION* sess) { |
|
|
reinterpret_cast<char*>(sess->session_id), |
|
|
reinterpret_cast<char*>(sess->session_id), |
|
|
sess->session_id_length); |
|
|
sess->session_id_length); |
|
|
Local<Value> argv[] = { session, buff }; |
|
|
Local<Value> argv[] = { session, buff }; |
|
|
|
|
|
w->new_session_wait_ = true; |
|
|
w->MakeCallback(env->onnewsession_string(), ARRAY_SIZE(argv), argv); |
|
|
w->MakeCallback(env->onnewsession_string(), ARRAY_SIZE(argv), argv); |
|
|
|
|
|
|
|
|
return 0; |
|
|
return 0; |
|
@ -1267,6 +1269,16 @@ void SSLWrap<Base>::GetTLSTicket(const FunctionCallbackInfo<Value>& args) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template <class Base> |
|
|
|
|
|
void SSLWrap<Base>::NewSessionDone(const FunctionCallbackInfo<Value>& args) { |
|
|
|
|
|
HandleScope scope(args.GetIsolate()); |
|
|
|
|
|
|
|
|
|
|
|
Base* w = Unwrap<Base>(args.This()); |
|
|
|
|
|
w->new_session_wait_ = false; |
|
|
|
|
|
w->NewSessionDoneCb(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef SSL_set_max_send_fragment |
|
|
#ifdef SSL_set_max_send_fragment |
|
|
template <class Base> |
|
|
template <class Base> |
|
|
void SSLWrap<Base>::SetMaxSendFragment( |
|
|
void SSLWrap<Base>::SetMaxSendFragment( |
|
@ -1651,6 +1663,13 @@ void Connection::SetShutdownFlags() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Connection::NewSessionDoneCb() { |
|
|
|
|
|
HandleScope scope(env()->isolate()); |
|
|
|
|
|
|
|
|
|
|
|
MakeCallback(env()->onnewsessiondone_string(), 0, NULL); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Connection::Initialize(Environment* env, Handle<Object> target) { |
|
|
void Connection::Initialize(Environment* env, Handle<Object> target) { |
|
|
Local<FunctionTemplate> t = FunctionTemplate::New(Connection::New); |
|
|
Local<FunctionTemplate> t = FunctionTemplate::New(Connection::New); |
|
|
t->InstanceTemplate()->SetInternalFieldCount(1); |
|
|
t->InstanceTemplate()->SetInternalFieldCount(1); |
|
|