Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions lib/internal/tls/wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ function loadSession(hello) {
return owner.destroy(new ERR_SOCKET_CLOSED());

owner._handle.loadSession(session);
// Session is loaded. End the parser to allow handshaking to continue.
owner._handle.endParser();
// Session is loaded. Let the handshake continue.
owner._handle.clientHelloDone();
}

if (hello.sessionId.length <= 0 ||
Expand All @@ -281,8 +281,8 @@ function loadSession(hello) {
// Sessions with tickets can be resumed directly from the ticket, no server
// session storage is necessary.
// Without a call to a resumeSession listener, a session will never be
// loaded, so end the parser to allow handshaking to continue.
owner._handle.endParser();
// loaded, so let the handshake continue.
owner._handle.clientHelloDone();
}
}

Expand Down Expand Up @@ -970,7 +970,6 @@ TLSSocket.prototype._init = function(socket, wrap) {
if (this.server) {
if (this.server.listenerCount('resumeSession') > 0 ||
this.server.listenerCount('newSession') > 0) {
// Also starts the client hello parser as a side effect.
ssl.enableSessionCallbacks();
}
if (this.server.listenerCount('OCSPRequest') > 0)
Expand Down
52 changes: 0 additions & 52 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@
'src/crypto/crypto_rsa.cc',
'src/crypto/crypto_spkac.cc',
'src/crypto/crypto_util.cc',
'src/crypto/crypto_clienthello.cc',
'src/crypto/crypto_dh.cc',
'src/crypto/crypto_hash.cc',
'src/crypto/crypto_keys.cc',
Expand All @@ -425,7 +424,6 @@
'src/crypto/crypto_x509.cc',
'src/crypto/crypto_argon2.h',
'src/crypto/crypto_bio.h',
'src/crypto/crypto_clienthello-inl.h',
'src/crypto/crypto_dh.h',
'src/crypto/crypto_hmac.h',
'src/crypto/crypto_kmac.h',
Expand All @@ -441,7 +439,6 @@
'src/crypto/crypto_keygen.h',
'src/crypto/crypto_scrypt.h',
'src/crypto/crypto_tls.h',
'src/crypto/crypto_clienthello.h',
'src/crypto/crypto_context.h',
'src/crypto/crypto_ec.h',
'src/crypto/crypto_pqc.h',
Expand Down Expand Up @@ -471,7 +468,6 @@
'src/tracing/trace_event_legacy.h',
],
'node_cctest_openssl_sources': [
'test/cctest/test_crypto_clienthello.cc',
'test/cctest/test_node_crypto.cc',
'test/cctest/test_node_crypto_env.cc',
],
Expand Down Expand Up @@ -1309,54 +1305,6 @@
}],
],
}, # fuzz_env
{ # fuzz_ClientHelloParser.cc
'target_name': 'fuzz_ClientHelloParser',
'type': 'executable',
'dependencies': [
'<(node_lib_target_name)',
],
'includes': [
'node.gypi'
],
'include_dirs': [
'src',
'tools/msvs/genfiles',
'deps/v8/include',
'deps/cares/include',
'deps/uv/include',
'test/cctest',
],
'defines': [
'NODE_ARCH="<(target_arch)"',
'NODE_PLATFORM="<(OS)"',
'NODE_WANT_INTERNALS=1',
],
'sources': [
'test/fuzzers/fuzz_ClientHelloParser.cc',
],
'conditions': [
[ 'node_shared_hdr_histogram=="false"', {
'dependencies': [
'deps/histogram/histogram.gyp:histogram',
],
}],
[ 'node_shared_uvwasi=="false"', {
'dependencies': [ 'deps/uvwasi/uvwasi.gyp:uvwasi' ],
'include_dirs': [ 'deps/uvwasi/include' ],
}],
['OS=="linux" or OS=="openharmony"', {
'ldflags': [ '-fsanitize=fuzzer' ]
}],
# Ensure that ossfuzz flag has been set and that we are on Linux
[ 'OS not in "linux openharmony" or ossfuzz!="true"', {
'type': 'none',
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
}, # fuzz_ClientHelloParser.cc
{ # fuzz_strings
'target_name': 'fuzz_strings',
'type': 'executable',
Expand Down
41 changes: 20 additions & 21 deletions src/crypto/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,26 @@ throughout the rest of the code.
The rest of the files are structured by their function, as detailed in the
following table:

| File (\*.h/\*.cc) | Description |
| -------------------- | -------------------------------------------------------------------------- |
| `crypto_aes` | AES Cipher support. |
| `crypto_argon2` | Argon2 key / bit generation implementation. |
| `crypto_cipher` | General Encryption/Decryption utilities. |
| `crypto_clienthello` | TLS/SSL client hello parser implementation. Used during SSL/TLS handshake. |
| `crypto_context` | Implementation of the `SecureContext` object. |
| `crypto_dh` | Diffie-Hellman Key Agreement implementation. |
| `crypto_dsa` | DSA (Digital Signature) Key Generation functions. |
| `crypto_ec` | Elliptic-curve cryptography implementation. |
| `crypto_hash` | Basic hash (e.g. SHA-256) functions. |
| `crypto_hkdf` | HKDF (Key derivation) implementation. |
| `crypto_hmac` | HMAC implementations. |
| `crypto_keys` | Utilities for using and generating secret, private, and public keys. |
| `crypto_pbkdf2` | PBKDF2 key / bit generation implementation. |
| `crypto_rsa` | RSA Key Generation functions. |
| `crypto_scrypt` | Scrypt key / bit generation implementation. |
| `crypto_sig` | General digital signature and verification utilities. |
| `crypto_spkac` | Netscape SPKAC certificate utilities. |
| `crypto_ssl` | Implementation of the `SSLWrap` object. |
| `crypto_timing` | Implementation of the TimingSafeEqual. |
| File (\*.h/\*.cc) | Description |
| ----------------- | -------------------------------------------------------------------- |
| `crypto_aes` | AES Cipher support. |
| `crypto_argon2` | Argon2 key / bit generation implementation. |
| `crypto_cipher` | General Encryption/Decryption utilities. |
| `crypto_context` | Implementation of the `SecureContext` object. |
| `crypto_dh` | Diffie-Hellman Key Agreement implementation. |
| `crypto_dsa` | DSA (Digital Signature) Key Generation functions. |
| `crypto_ec` | Elliptic-curve cryptography implementation. |
| `crypto_hash` | Basic hash (e.g. SHA-256) functions. |
| `crypto_hkdf` | HKDF (Key derivation) implementation. |
| `crypto_hmac` | HMAC implementations. |
| `crypto_keys` | Utilities for using and generating secret, private, and public keys. |
| `crypto_pbkdf2` | PBKDF2 key / bit generation implementation. |
| `crypto_rsa` | RSA Key Generation functions. |
| `crypto_scrypt` | Scrypt key / bit generation implementation. |
| `crypto_sig` | General digital signature and verification utilities. |
| `crypto_spkac` | Netscape SPKAC certificate utilities. |
| `crypto_ssl` | Implementation of the `SSLWrap` object. |
| `crypto_timing` | Implementation of the TimingSafeEqual. |

When new crypto protocols are added, they will be added into their own
`crypto_` `*.h` and `*.cc` files.
Expand Down
90 changes: 0 additions & 90 deletions src/crypto/crypto_clienthello-inl.h

This file was deleted.

Loading
Loading