| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f412b1f commit 3f29cbb
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1457,9 +1457,14 @@ static Local<Object> X509ToObject(Environment* env, X509* cert) { | |||
| 1457 | 1457 | String::kNormalString, mem->length)); | |
| 1458 | 1458 | (void) BIO_reset(bio); | |
| 1459 | 1459 | ||
| 1460 | - BN_ULONG exponent_word = BN_get_word(rsa->e); | ||
| 1461 | - BIO_printf(bio, "0x%lx", exponent_word); | ||
| 1462 | - | ||
| 1460 | + uint64_t exponent_word = static_cast<uint64_t>(BN_get_word(rsa->e)); | ||
| 1461 | + uint32_t lo = static_cast<uint32_t>(exponent_word); | ||
| 1462 | + uint32_t hi = static_cast<uint32_t>(exponent_word >> 32); | ||
| 1463 | + if (hi == 0) { | ||
| 1464 | + BIO_printf(bio, "0x%x", lo); | ||
| 1465 | + } else { | ||
| 1466 | + BIO_printf(bio, "0x%x%08x", hi, lo); | ||
| 1467 | + } | ||
| 1463 | 1468 | BIO_get_mem_ptr(bio, &mem); | |
| 1464 | 1469 | info->Set(env->exponent_string(), | |
| 1465 | 1470 | String::NewFromUtf8(env->isolate(), mem->data, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments