Skip to content

Commit 79592fe

Browse files
danbevMylesBorins
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 fa20932 commit 79592fe

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

src/node_crypto.cc

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,26 +1554,26 @@ static Local<Object> X509ToObject(Environment* env, X509* cert) {
15541554
rsa = EVP_PKEY_get1_RSA(pkey);
15551555

15561556
if (rsa != nullptr) {
1557-
BN_print(bio, rsa->n);
1558-
BIO_get_mem_ptr(bio, &mem);
1559-
info->Set(env->modulus_string(),
1560-
String::NewFromUtf8(env->isolate(), mem->data,
1561-
String::kNormalString, mem->length));
1562-
(void) BIO_reset(bio);
1563-
1564-
uint64_t exponent_word = static_cast<uint64_t>(BN_get_word(rsa->e));
1565-
uint32_t lo = static_cast<uint32_t>(exponent_word);
1566-
uint32_t hi = static_cast<uint32_t>(exponent_word >> 32);
1567-
if (hi == 0) {
1568-
BIO_printf(bio, "0x%x", lo);
1569-
} else {
1570-
BIO_printf(bio, "0x%x%08x", hi, lo);
1571-
}
1572-
BIO_get_mem_ptr(bio, &mem);
1573-
info->Set(env->exponent_string(),
1574-
String::NewFromUtf8(env->isolate(), mem->data,
1575-
String::kNormalString, mem->length));
1576-
(void) BIO_reset(bio);
1557+
BN_print(bio, rsa->n);
1558+
BIO_get_mem_ptr(bio, &mem);
1559+
info->Set(env->modulus_string(),
1560+
String::NewFromUtf8(env->isolate(), mem->data,
1561+
String::kNormalString, mem->length));
1562+
(void) BIO_reset(bio);
1563+
1564+
uint64_t exponent_word = static_cast<uint64_t>(BN_get_word(rsa->e));
1565+
uint32_t lo = static_cast<uint32_t>(exponent_word);
1566+
uint32_t hi = static_cast<uint32_t>(exponent_word >> 32);
1567+
if (hi == 0) {
1568+
BIO_printf(bio, "0x%x", lo);
1569+
} else {
1570+
BIO_printf(bio, "0x%x%08x", hi, lo);
1571+
}
1572+
BIO_get_mem_ptr(bio, &mem);
1573+
info->Set(env->exponent_string(),
1574+
String::NewFromUtf8(env->isolate(), mem->data,
1575+
String::kNormalString, mem->length));
1576+
(void) BIO_reset(bio);
15771577
}
15781578

15791579
if (pkey != nullptr) {

0 commit comments

Comments
 (0)