Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6b08128

Browse filesBrowse files
davidbenMylesBorins
authored andcommitted
crypto: use SSL_SESSION_get_id
This accessor exists in OpenSSL 1.0.2, so it may be used already. This is cherry-picked from PR #8491. PR-URL: #15348 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent 78dc928 commit 6b08128
Copy full SHA for 6b08128

File tree

Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Open diff view settings
Collapse file

‎src/node_crypto.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto.cc
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,10 +1410,13 @@ int SSLWrap<Base>::NewSessionCallback(SSL* s, SSL_SESSION* sess) {
14101410
memset(serialized, 0, size);
14111411
i2d_SSL_SESSION(sess, &serialized);
14121412

1413+
unsigned int session_id_length;
1414+
const unsigned char* session_id = SSL_SESSION_get_id(sess,
1415+
&session_id_length);
14131416
Local<Object> session = Buffer::Copy(
14141417
env,
1415-
reinterpret_cast<char*>(sess->session_id),
1416-
sess->session_id_length).ToLocalChecked();
1418+
reinterpret_cast<const char*>(session_id),
1419+
session_id_length).ToLocalChecked();
14171420
Local<Value> argv[] = { session, buff };
14181421
w->new_session_wait_ = true;
14191422
w->MakeCallback(env->onnewsession_string(), arraysize(argv), argv);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.