8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78dc928 commit 6b08128Copy full SHA for 6b08128
src/node_crypto.cc
@@ -1410,10 +1410,13 @@ int SSLWrap<Base>::NewSessionCallback(SSL* s, SSL_SESSION* sess) {
1410
memset(serialized, 0, size);
1411
i2d_SSL_SESSION(sess, &serialized);
1412
1413
+ unsigned int session_id_length;
1414
+ const unsigned char* session_id = SSL_SESSION_get_id(sess,
1415
+ &session_id_length);
1416
Local<Object> session = Buffer::Copy(
1417
env,
- reinterpret_cast<char*>(sess->session_id),
- sess->session_id_length).ToLocalChecked();
1418
+ reinterpret_cast<const char*>(session_id),
1419
+ session_id_length).ToLocalChecked();
1420
Local<Value> argv[] = { session, buff };
1421
w->new_session_wait_ = true;
1422
w->MakeCallback(env->onnewsession_string(), arraysize(argv), argv);