src: fix -Wundefined-inline warnings
Fix compiler warnings introduced in commit 47edfd9c3c ("crypto: move node_crypto_clienthello-inl.h to cc") by moving constructors around. They were defined inline but depended on definitions from `node_crypto_clienthello-inl.h`. PR-URL: https://github.com/nodejs/node/pull/17649 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
parent
e989cd1faf
commit
98a6f63e45
@ -2849,6 +2849,24 @@ int SSLWrap<Base>::SetCACerts(SecureContext* sc) {
|
||||
}
|
||||
|
||||
|
||||
Connection::Connection(Environment* env,
|
||||
v8::Local<v8::Object> wrap,
|
||||
SecureContext* sc,
|
||||
SSLWrap<Connection>::Kind kind)
|
||||
: AsyncWrap(env, wrap, AsyncWrap::PROVIDER_SSLCONNECTION),
|
||||
SSLWrap<Connection>(env, sc, kind),
|
||||
bio_read_(nullptr),
|
||||
bio_write_(nullptr),
|
||||
hello_offset_(0) {
|
||||
MakeWeak<Connection>(this);
|
||||
Wrap(wrap, this);
|
||||
hello_parser_.Start(SSLWrap<Connection>::OnClientHello,
|
||||
OnClientHelloParseEnd,
|
||||
this);
|
||||
enable_session_callbacks();
|
||||
}
|
||||
|
||||
|
||||
void Connection::OnClientHelloParseEnd(void* arg) {
|
||||
Connection* conn = static_cast<Connection*>(arg);
|
||||
|
||||
|
@ -432,19 +432,7 @@ class Connection : public AsyncWrap, public SSLWrap<Connection> {
|
||||
Connection(Environment* env,
|
||||
v8::Local<v8::Object> wrap,
|
||||
SecureContext* sc,
|
||||
SSLWrap<Connection>::Kind kind)
|
||||
: AsyncWrap(env, wrap, AsyncWrap::PROVIDER_SSLCONNECTION),
|
||||
SSLWrap<Connection>(env, sc, kind),
|
||||
bio_read_(nullptr),
|
||||
bio_write_(nullptr),
|
||||
hello_offset_(0) {
|
||||
MakeWeak<Connection>(this);
|
||||
Wrap(wrap, this);
|
||||
hello_parser_.Start(SSLWrap<Connection>::OnClientHello,
|
||||
OnClientHelloParseEnd,
|
||||
this);
|
||||
enable_session_callbacks();
|
||||
}
|
||||
SSLWrap<Connection>::Kind kind);
|
||||
|
||||
private:
|
||||
static void SSLInfoCallback(const SSL *ssl, int where, int ret);
|
||||
|
@ -30,6 +30,21 @@
|
||||
namespace node {
|
||||
namespace crypto {
|
||||
|
||||
inline ClientHelloParser::ClientHelloParser()
|
||||
: state_(kEnded),
|
||||
onhello_cb_(nullptr),
|
||||
onend_cb_(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();
|
||||
}
|
||||
|
||||
inline void ClientHelloParser::Reset() {
|
||||
frame_len_ = 0;
|
||||
body_offset_ = 0;
|
||||
|
@ -33,19 +33,7 @@ namespace crypto {
|
||||
|
||||
class ClientHelloParser {
|
||||
public:
|
||||
ClientHelloParser() : state_(kEnded),
|
||||
onhello_cb_(nullptr),
|
||||
onend_cb_(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();
|
||||
}
|
||||
inline ClientHelloParser();
|
||||
|
||||
class ClientHello {
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user