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 acf7802

Browse filesBrowse files
sam-githubtargos
authored andcommitted
tls: remove unused ocsp extension parsing
The OCSP info from parsing the TLS ClientHello has not been used since 550c263, remove it. See: #1464 PR-URL: #25153 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
1 parent 56e7e4f commit acf7802
Copy full SHA for acf7802

File tree

Expand file treeCollapse file tree

4 files changed

+0
-22
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

4 files changed

+0
-22
lines changed
Open diff view settings
Collapse file

‎src/node_crypto.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto.cc
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,9 +1532,6 @@ void SSLWrap<Base>::OnClientHello(void* arg,
15321532
hello_obj->Set(context,
15331533
env->tls_ticket_string(),
15341534
Boolean::New(env->isolate(), hello.has_ticket())).FromJust();
1535-
hello_obj->Set(context,
1536-
env->ocsp_request_string(),
1537-
Boolean::New(env->isolate(), hello.ocsp_request())).FromJust();
15381535

15391536
Local<Value> argv[] = { hello_obj };
15401537
w->MakeCallback(env->onclienthello_string(), arraysize(argv), argv);
Collapse file

‎src/node_crypto_clienthello-inl.h‎

Copy file name to clipboardExpand all lines: src/node_crypto_clienthello-inl.h
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ inline void ClientHelloParser::Reset() {
4848
tls_ticket_ = nullptr;
4949
servername_size_ = 0;
5050
servername_ = nullptr;
51-
ocsp_request_ = 0;
5251
}
5352

5453
inline void ClientHelloParser::Start(ClientHelloParser::OnHelloCb onhello_cb,
Collapse file

‎src/node_crypto_clienthello.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto_clienthello.cc
-13Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ void ClientHelloParser::ParseHeader(const uint8_t* data, size_t avail) {
112112
hello.session_id_ = session_id_;
113113
hello.session_size_ = session_size_;
114114
hello.has_ticket_ = tls_ticket_ != nullptr && tls_ticket_size_ != 0;
115-
hello.ocsp_request_ = ocsp_request_;
116115
hello.servername_ = servername_;
117116
hello.servername_size_ = static_cast<uint8_t>(servername_size_);
118117
onhello_cb_(cb_arg_, hello);
@@ -149,18 +148,6 @@ void ClientHelloParser::ParseExtension(const uint16_t type,
149148
}
150149
}
151150
break;
152-
case kStatusRequest:
153-
// We are ignoring any data, just indicating the presence of extension
154-
if (len < kMinStatusRequestSize)
155-
return;
156-
157-
// Unknown type, ignore it
158-
if (data[0] != kStatusRequestOCSP)
159-
break;
160-
161-
// Ignore extensions, they won't work with caching on backend anyway
162-
ocsp_request_ = 1;
163-
break;
164151
case kTLSSessionTicket:
165152
tls_ticket_size_ = len;
166153
tls_ticket_ = data + len;
Collapse file

‎src/node_crypto_clienthello.h‎

Copy file name to clipboardExpand all lines: src/node_crypto_clienthello.h
-5Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,13 @@ class ClientHelloParser {
4141
inline bool has_ticket() const { return has_ticket_; }
4242
inline uint8_t servername_size() const { return servername_size_; }
4343
inline const uint8_t* servername() const { return servername_; }
44-
inline int ocsp_request() const { return ocsp_request_; }
4544

4645
private:
4746
uint8_t session_size_;
4847
const uint8_t* session_id_;
4948
bool has_ticket_;
5049
uint8_t servername_size_;
5150
const uint8_t* servername_;
52-
int ocsp_request_;
5351

5452
friend class ClientHelloParser;
5553
};
@@ -69,7 +67,6 @@ class ClientHelloParser {
6967
static const size_t kMaxTLSFrameLen = 16 * 1024 + 5;
7068
static const size_t kMaxSSLExFrameLen = 32 * 1024;
7169
static const uint8_t kServernameHostname = 0;
72-
static const uint8_t kStatusRequestOCSP = 1;
7370
static const size_t kMinStatusRequestSize = 5;
7471

7572
enum ParseState {
@@ -93,7 +90,6 @@ class ClientHelloParser {
9390

9491
enum ExtensionType {
9592
kServerName = 0,
96-
kStatusRequest = 5,
9793
kTLSSessionTicket = 35
9894
};
9995

@@ -115,7 +111,6 @@ class ClientHelloParser {
115111
const uint8_t* session_id_ = nullptr;
116112
uint16_t servername_size_ = 0;
117113
const uint8_t* servername_ = nullptr;
118-
uint8_t ocsp_request_ = 0;
119114
uint16_t tls_ticket_size_ = -1;
120115
const uint8_t* tls_ticket_ = nullptr;
121116
};

0 commit comments

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