Skip to content

Commit 3110d15

Browse files
danbevMylesBorins
authored andcommitted
src: make pointers lean left in node_crypto.cc
PR-URL: #20799 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent b622534 commit 3110d15

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/node_crypto.cc

+7-7
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ template int SSLWrap<TLSWrap>::SelectALPNCallback(
153153
#endif // TLSEXT_TYPE_application_layer_protocol_negotiation
154154

155155

156-
static int PasswordCallback(char *buf, int size, int rwflag, void *u) {
156+
static int PasswordCallback(char* buf, int size, int rwflag, void* u) {
157157
if (u) {
158158
size_t buflen = static_cast<size_t>(size);
159159
size_t len = strlen(static_cast<const char*>(u));
@@ -206,7 +206,7 @@ static ENGINE* LoadEngineById(const char* engine_id, char (*errmsg)[1024]) {
206206
// for the OpenSSL CLI, but works poorly for Node.js because it involves
207207
// synchronous interaction with the controlling terminal, something we never
208208
// want, and use this function to avoid it.
209-
static int NoPasswordCallback(char *buf, int size, int rwflag, void *u) {
209+
static int NoPasswordCallback(char* buf, int size, int rwflag, void* u) {
210210
return 0;
211211
}
212212

@@ -726,7 +726,7 @@ static X509_STORE* NewRootCertStore() {
726726
if (root_certs_vector.empty()) {
727727
for (size_t i = 0; i < arraysize(root_certs); i++) {
728728
BIO* bp = NodeBIO::NewFixed(root_certs[i], strlen(root_certs[i]));
729-
X509 *x509 = PEM_read_bio_X509(bp, nullptr, NoPasswordCallback, nullptr);
729+
X509* x509 = PEM_read_bio_X509(bp, nullptr, NoPasswordCallback, nullptr);
730730
BIO_free(bp);
731731

732732
// Parse errors from the built-in roots are fatal.
@@ -743,7 +743,7 @@ static X509_STORE* NewRootCertStore() {
743743
if (ssl_openssl_cert_store) {
744744
X509_STORE_set_default_paths(store);
745745
} else {
746-
for (X509 *cert : root_certs_vector) {
746+
for (X509* cert : root_certs_vector) {
747747
X509_up_ref(cert);
748748
X509_STORE_add_cert(store, cert);
749749
}
@@ -1994,7 +1994,7 @@ void SSLWrap<Base>::GetTLSTicket(const FunctionCallbackInfo<Value>& args) {
19941994
if (sess == nullptr)
19951995
return;
19961996

1997-
const unsigned char *ticket;
1997+
const unsigned char* ticket;
19981998
size_t length;
19991999
SSL_SESSION_get0_ticket(sess, &ticket, &length);
20002000

@@ -2771,7 +2771,7 @@ static bool IsValidGCMTagLength(unsigned int tag_len) {
27712771
return tag_len == 4 || tag_len == 8 || (tag_len >= 12 && tag_len <= 16);
27722772
}
27732773

2774-
bool CipherBase::InitAuthenticated(const char *cipher_type, int iv_len,
2774+
bool CipherBase::InitAuthenticated(const char* cipher_type, int iv_len,
27752775
unsigned int auth_tag_len) {
27762776
CHECK(IsAuthenticatedMode());
27772777

@@ -3085,7 +3085,7 @@ void CipherBase::SetAutoPadding(const FunctionCallbackInfo<Value>& args) {
30853085
}
30863086

30873087

3088-
bool CipherBase::Final(unsigned char** out, int *out_len) {
3088+
bool CipherBase::Final(unsigned char** out, int* out_len) {
30893089
if (!ctx_)
30903090
return false;
30913091

0 commit comments

Comments
 (0)