Skip to content

Commit f134c9d

Browse files
danbevaddaleax
authored andcommitted
src: correct indentation for X509ToObject
The indentation in one of the if statements blocks is four spaces instead of two. This commit changes the indentation to two spaces. PR-URL: #13543 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 61c7308 commit f134c9d

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/node_crypto.cc

+20-20
Original file line numberDiff line numberDiff line change
@@ -1581,26 +1581,26 @@ static Local<Object> X509ToObject(Environment* env, X509* cert) {
15811581
rsa = EVP_PKEY_get1_RSA(pkey);
15821582

15831583
if (rsa != nullptr) {
1584-
BN_print(bio, rsa->n);
1585-
BIO_get_mem_ptr(bio, &mem);
1586-
info->Set(env->modulus_string(),
1587-
String::NewFromUtf8(env->isolate(), mem->data,
1588-
String::kNormalString, mem->length));
1589-
(void) BIO_reset(bio);
1590-
1591-
uint64_t exponent_word = static_cast<uint64_t>(BN_get_word(rsa->e));
1592-
uint32_t lo = static_cast<uint32_t>(exponent_word);
1593-
uint32_t hi = static_cast<uint32_t>(exponent_word >> 32);
1594-
if (hi == 0) {
1595-
BIO_printf(bio, "0x%x", lo);
1596-
} else {
1597-
BIO_printf(bio, "0x%x%08x", hi, lo);
1598-
}
1599-
BIO_get_mem_ptr(bio, &mem);
1600-
info->Set(env->exponent_string(),
1601-
String::NewFromUtf8(env->isolate(), mem->data,
1602-
String::kNormalString, mem->length));
1603-
(void) BIO_reset(bio);
1584+
BN_print(bio, rsa->n);
1585+
BIO_get_mem_ptr(bio, &mem);
1586+
info->Set(env->modulus_string(),
1587+
String::NewFromUtf8(env->isolate(), mem->data,
1588+
String::kNormalString, mem->length));
1589+
(void) BIO_reset(bio);
1590+
1591+
uint64_t exponent_word = static_cast<uint64_t>(BN_get_word(rsa->e));
1592+
uint32_t lo = static_cast<uint32_t>(exponent_word);
1593+
uint32_t hi = static_cast<uint32_t>(exponent_word >> 32);
1594+
if (hi == 0) {
1595+
BIO_printf(bio, "0x%x", lo);
1596+
} else {
1597+
BIO_printf(bio, "0x%x%08x", hi, lo);
1598+
}
1599+
BIO_get_mem_ptr(bio, &mem);
1600+
info->Set(env->exponent_string(),
1601+
String::NewFromUtf8(env->isolate(), mem->data,
1602+
String::kNormalString, mem->length));
1603+
(void) BIO_reset(bio);
16041604
}
16051605

16061606
if (pkey != nullptr) {

0 commit comments

Comments
 (0)