diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 25b47b798d8c9f..48236e0ae2ffb7 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -311,7 +311,7 @@ bool EntropySource(unsigned char* buffer, size_t length) { void SecureContext::Initialize(Environment* env, Local target) { - Local t = env->NewFunctionTemplate(SecureContext::New); + Local t = env->NewFunctionTemplate(New); t->InstanceTemplate()->SetInternalFieldCount(1); Local secureContextString = FIXED_ONE_BYTE_STRING(env->isolate(), "SecureContext"); @@ -464,8 +464,7 @@ void SecureContext::Init(const FunctionCallbackInfo& args) { RAND_bytes(sc->ticket_key_aes_, sizeof(sc->ticket_key_aes_)) <= 0) { return env->ThrowError("Error generating ticket keys"); } - SSL_CTX_set_tlsext_ticket_key_cb(sc->ctx_.get(), - SecureContext::TicketCompatibilityCallback); + SSL_CTX_set_tlsext_ticket_key_cb(sc->ctx_.get(), TicketCompatibilityCallback); } @@ -1916,8 +1915,7 @@ void SSLWrap::SetSession(const FunctionCallbackInfo& args) { sbuf.assign(p, p + slen); const unsigned char* p = reinterpret_cast(sbuf.data()); - SSLSessionPointer sess( - d2i_SSL_SESSION(nullptr, &p, slen)); + SSLSessionPointer sess(d2i_SSL_SESSION(nullptr, &p, slen)); if (sess == nullptr) return; @@ -2020,8 +2018,7 @@ void SSLWrap::NewSessionDone(const FunctionCallbackInfo& args) { template -void SSLWrap::SetOCSPResponse( - const v8::FunctionCallbackInfo& args) { +void SSLWrap::SetOCSPResponse(const FunctionCallbackInfo& args) { #ifdef NODE__HAVE_TLSEXT_STATUS_CB Base* w; ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder()); @@ -2038,8 +2035,7 @@ void SSLWrap::SetOCSPResponse( template -void SSLWrap::RequestOCSP( - const v8::FunctionCallbackInfo& args) { +void SSLWrap::RequestOCSP(const FunctionCallbackInfo& args) { #ifdef NODE__HAVE_TLSEXT_STATUS_CB Base* w; ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder()); @@ -2051,7 +2047,7 @@ void SSLWrap::RequestOCSP( template void SSLWrap::GetEphemeralKeyInfo( - const v8::FunctionCallbackInfo& args) { + const FunctionCallbackInfo& args) { Base* w; ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder()); Environment* env = Environment::GetCurrent(args); @@ -2111,7 +2107,7 @@ void SSLWrap::GetEphemeralKeyInfo( #ifdef SSL_set_max_send_fragment template void SSLWrap::SetMaxSendFragment( - const v8::FunctionCallbackInfo& args) { + const FunctionCallbackInfo& args) { CHECK(args.Length() >= 1 && args[0]->IsNumber()); Base* w; @@ -2265,7 +2261,7 @@ int SSLWrap::SelectALPNCallback(SSL* s, template void SSLWrap::GetALPNNegotiatedProto( - const FunctionCallbackInfo& args) { + const FunctionCallbackInfo& args) { #ifdef TLSEXT_TYPE_application_layer_protocol_negotiation Base* w; ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder()); @@ -2285,8 +2281,7 @@ void SSLWrap::GetALPNNegotiatedProto( template -void SSLWrap::SetALPNProtocols( - const FunctionCallbackInfo& args) { +void SSLWrap::SetALPNProtocols(const FunctionCallbackInfo& args) { #ifdef TLSEXT_TYPE_application_layer_protocol_negotiation Base* w; ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder()); @@ -3162,7 +3157,7 @@ void CipherBase::Final(const FunctionCallbackInfo& args) { } -void Hmac::Initialize(Environment* env, v8::Local target) { +void Hmac::Initialize(Environment* env, v8::Local target) { Local t = env->NewFunctionTemplate(New); t->InstanceTemplate()->SetInternalFieldCount(1); @@ -3282,7 +3277,7 @@ void Hmac::HmacDigest(const FunctionCallbackInfo& args) { } -void Hash::Initialize(Environment* env, v8::Local target) { +void Hash::Initialize(Environment* env, v8::Local target) { Local t = env->NewFunctionTemplate(New); t->InstanceTemplate()->SetInternalFieldCount(1); @@ -3474,7 +3469,7 @@ static bool ApplyRSAOptions(const EVPKeyPointer& pkey, -void Sign::Initialize(Environment* env, v8::Local target) { +void Sign::Initialize(Environment* env, v8::Local target) { Local t = env->NewFunctionTemplate(New); t->InstanceTemplate()->SetInternalFieldCount(1); @@ -3640,7 +3635,7 @@ void Sign::SignFinal(const FunctionCallbackInfo& args) { } -void Verify::Initialize(Environment* env, v8::Local target) { +void Verify::Initialize(Environment* env, v8::Local target) { Local t = env->NewFunctionTemplate(New); t->InstanceTemplate()->SetInternalFieldCount(1); @@ -4220,7 +4215,7 @@ void DiffieHellman::ComputeSecret(const FunctionCallbackInfo& args) { Buffer::New(env->isolate(), data.release(), data.size).ToLocalChecked()); } -void DiffieHellman::SetKey(const v8::FunctionCallbackInfo& args, +void DiffieHellman::SetKey(const v8::FunctionCallbackInfo& args, int (*set_field)(DH*, BIGNUM*), const char* what) { Environment* env = Environment::GetCurrent(args);