crypto: move field initialization to class
PR-URL: https://github.com/nodejs/node/pull/23610 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
This commit is contained in:
parent
ea9df8b4a4
commit
98afca92a9
@ -34,14 +34,7 @@ inline ClientHelloParser::ClientHelloParser()
|
|||||||
: state_(kEnded),
|
: state_(kEnded),
|
||||||
onhello_cb_(nullptr),
|
onhello_cb_(nullptr),
|
||||||
onend_cb_(nullptr),
|
onend_cb_(nullptr),
|
||||||
cb_arg_(nullptr),
|
cb_arg_(nullptr) {
|
||||||
session_size_(0),
|
|
||||||
session_id_(nullptr),
|
|
||||||
servername_size_(0),
|
|
||||||
servername_(nullptr),
|
|
||||||
ocsp_request_(0),
|
|
||||||
tls_ticket_size_(0),
|
|
||||||
tls_ticket_(nullptr) {
|
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,16 +108,16 @@ class ClientHelloParser {
|
|||||||
OnHelloCb onhello_cb_;
|
OnHelloCb onhello_cb_;
|
||||||
OnEndCb onend_cb_;
|
OnEndCb onend_cb_;
|
||||||
void* cb_arg_;
|
void* cb_arg_;
|
||||||
size_t frame_len_;
|
size_t frame_len_ = 0;
|
||||||
size_t body_offset_;
|
size_t body_offset_ = 0;
|
||||||
size_t extension_offset_;
|
size_t extension_offset_ = 0;
|
||||||
uint8_t session_size_;
|
uint8_t session_size_ = 0;
|
||||||
const uint8_t* session_id_;
|
const uint8_t* session_id_ = nullptr;
|
||||||
uint16_t servername_size_;
|
uint16_t servername_size_ = 0;
|
||||||
const uint8_t* servername_;
|
const uint8_t* servername_ = nullptr;
|
||||||
uint8_t ocsp_request_;
|
uint8_t ocsp_request_ = 0;
|
||||||
uint16_t tls_ticket_size_;
|
uint16_t tls_ticket_size_ = -1;
|
||||||
const uint8_t* tls_ticket_;
|
const uint8_t* tls_ticket_ = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace crypto
|
} // namespace crypto
|
||||||
|
Loading…
x
Reference in New Issue
Block a user