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 b622534

Browse filesBrowse files
danbevMylesBorins
authored andcommitted
src: use unqualified names in node_crypto.cc
This commit removes the usage of qualified names for consistency. PR-URL: #20799 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 8317a46 commit b622534
Copy full SHA for b622534

File tree

Expand file treeCollapse file tree

1 file changed

+14
-19
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+14
-19
lines changed
Open diff view settings
Collapse file

‎src/node_crypto.cc‎

Copy file name to clipboardExpand all lines: src/node_crypto.cc
+14-19Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ bool EntropySource(unsigned char* buffer, size_t length) {
311311

312312

313313
void SecureContext::Initialize(Environment* env, Local<Object> target) {
314-
Local<FunctionTemplate> t = env->NewFunctionTemplate(SecureContext::New);
314+
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
315315
t->InstanceTemplate()->SetInternalFieldCount(1);
316316
Local<String> secureContextString =
317317
FIXED_ONE_BYTE_STRING(env->isolate(), "SecureContext");
@@ -464,8 +464,7 @@ void SecureContext::Init(const FunctionCallbackInfo<Value>& args) {
464464
RAND_bytes(sc->ticket_key_aes_, sizeof(sc->ticket_key_aes_)) <= 0) {
465465
return env->ThrowError("Error generating ticket keys");
466466
}
467-
SSL_CTX_set_tlsext_ticket_key_cb(sc->ctx_.get(),
468-
SecureContext::TicketCompatibilityCallback);
467+
SSL_CTX_set_tlsext_ticket_key_cb(sc->ctx_.get(), TicketCompatibilityCallback);
469468
}
470469

471470

@@ -1916,8 +1915,7 @@ void SSLWrap<Base>::SetSession(const FunctionCallbackInfo<Value>& args) {
19161915
sbuf.assign(p, p + slen);
19171916

19181917
const unsigned char* p = reinterpret_cast<const unsigned char*>(sbuf.data());
1919-
SSLSessionPointer sess(
1920-
d2i_SSL_SESSION(nullptr, &p, slen));
1918+
SSLSessionPointer sess(d2i_SSL_SESSION(nullptr, &p, slen));
19211919

19221920
if (sess == nullptr)
19231921
return;
@@ -2020,8 +2018,7 @@ void SSLWrap<Base>::NewSessionDone(const FunctionCallbackInfo<Value>& args) {
20202018

20212019

20222020
template <class Base>
2023-
void SSLWrap<Base>::SetOCSPResponse(
2024-
const v8::FunctionCallbackInfo<v8::Value>& args) {
2021+
void SSLWrap<Base>::SetOCSPResponse(const FunctionCallbackInfo<Value>& args) {
20252022
#ifdef NODE__HAVE_TLSEXT_STATUS_CB
20262023
Base* w;
20272024
ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
@@ -2038,8 +2035,7 @@ void SSLWrap<Base>::SetOCSPResponse(
20382035

20392036

20402037
template <class Base>
2041-
void SSLWrap<Base>::RequestOCSP(
2042-
const v8::FunctionCallbackInfo<v8::Value>& args) {
2038+
void SSLWrap<Base>::RequestOCSP(const FunctionCallbackInfo<Value>& args) {
20432039
#ifdef NODE__HAVE_TLSEXT_STATUS_CB
20442040
Base* w;
20452041
ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
@@ -2051,7 +2047,7 @@ void SSLWrap<Base>::RequestOCSP(
20512047

20522048
template <class Base>
20532049
void SSLWrap<Base>::GetEphemeralKeyInfo(
2054-
const v8::FunctionCallbackInfo<v8::Value>& args) {
2050+
const FunctionCallbackInfo<Value>& args) {
20552051
Base* w;
20562052
ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
20572053
Environment* env = Environment::GetCurrent(args);
@@ -2111,7 +2107,7 @@ void SSLWrap<Base>::GetEphemeralKeyInfo(
21112107
#ifdef SSL_set_max_send_fragment
21122108
template <class Base>
21132109
void SSLWrap<Base>::SetMaxSendFragment(
2114-
const v8::FunctionCallbackInfo<v8::Value>& args) {
2110+
const FunctionCallbackInfo<Value>& args) {
21152111
CHECK(args.Length() >= 1 && args[0]->IsNumber());
21162112

21172113
Base* w;
@@ -2265,7 +2261,7 @@ int SSLWrap<Base>::SelectALPNCallback(SSL* s,
22652261

22662262
template <class Base>
22672263
void SSLWrap<Base>::GetALPNNegotiatedProto(
2268-
const FunctionCallbackInfo<v8::Value>& args) {
2264+
const FunctionCallbackInfo<Value>& args) {
22692265
#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
22702266
Base* w;
22712267
ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
@@ -2285,8 +2281,7 @@ void SSLWrap<Base>::GetALPNNegotiatedProto(
22852281

22862282

22872283
template <class Base>
2288-
void SSLWrap<Base>::SetALPNProtocols(
2289-
const FunctionCallbackInfo<v8::Value>& args) {
2284+
void SSLWrap<Base>::SetALPNProtocols(const FunctionCallbackInfo<Value>& args) {
22902285
#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
22912286
Base* w;
22922287
ASSIGN_OR_RETURN_UNWRAP(&w, args.Holder());
@@ -3162,7 +3157,7 @@ void CipherBase::Final(const FunctionCallbackInfo<Value>& args) {
31623157
}
31633158

31643159

3165-
void Hmac::Initialize(Environment* env, v8::Local<v8::Object> target) {
3160+
void Hmac::Initialize(Environment* env, v8::Local<Object> target) {
31663161
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
31673162

31683163
t->InstanceTemplate()->SetInternalFieldCount(1);
@@ -3282,7 +3277,7 @@ void Hmac::HmacDigest(const FunctionCallbackInfo<Value>& args) {
32823277
}
32833278

32843279

3285-
void Hash::Initialize(Environment* env, v8::Local<v8::Object> target) {
3280+
void Hash::Initialize(Environment* env, v8::Local<Object> target) {
32863281
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
32873282

32883283
t->InstanceTemplate()->SetInternalFieldCount(1);
@@ -3474,7 +3469,7 @@ static bool ApplyRSAOptions(const EVPKeyPointer& pkey,
34743469

34753470

34763471

3477-
void Sign::Initialize(Environment* env, v8::Local<v8::Object> target) {
3472+
void Sign::Initialize(Environment* env, v8::Local<Object> target) {
34783473
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
34793474

34803475
t->InstanceTemplate()->SetInternalFieldCount(1);
@@ -3640,7 +3635,7 @@ void Sign::SignFinal(const FunctionCallbackInfo<Value>& args) {
36403635
}
36413636

36423637

3643-
void Verify::Initialize(Environment* env, v8::Local<v8::Object> target) {
3638+
void Verify::Initialize(Environment* env, v8::Local<Object> target) {
36443639
Local<FunctionTemplate> t = env->NewFunctionTemplate(New);
36453640

36463641
t->InstanceTemplate()->SetInternalFieldCount(1);
@@ -4220,7 +4215,7 @@ void DiffieHellman::ComputeSecret(const FunctionCallbackInfo<Value>& args) {
42204215
Buffer::New(env->isolate(), data.release(), data.size).ToLocalChecked());
42214216
}
42224217

4223-
void DiffieHellman::SetKey(const v8::FunctionCallbackInfo<v8::Value>& args,
4218+
void DiffieHellman::SetKey(const v8::FunctionCallbackInfo<Value>& args,
42244219
int (*set_field)(DH*, BIGNUM*), const char* what) {
42254220
Environment* env = Environment::GetCurrent(args);
42264221

0 commit comments

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