| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 115e667 commit 739e5dd
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1489,9 +1489,14 @@ static Local<Object> X509ToObject(Environment* env, X509* cert) { | |||
| 1489 | 1489 | String::kNormalString, mem->length)); | |
| 1490 | 1490 | (void) BIO_reset(bio); | |
| 1491 | 1491 | ||
| 1492 | - BN_ULONG exponent_word = BN_get_word(rsa->e); | ||
| 1493 | - BIO_printf(bio, "0x%lx", exponent_word); | ||
| 1494 | - | ||
| 1492 | + uint64_t exponent_word = static_cast<uint64_t>(BN_get_word(rsa->e)); | ||
| 1493 | + uint32_t lo = static_cast<uint32_t>(exponent_word); | ||
| 1494 | + uint32_t hi = static_cast<uint32_t>(exponent_word >> 32); | ||
| 1495 | + if (hi == 0) { | ||
| 1496 | + BIO_printf(bio, "0x%x", lo); | ||
| 1497 | + } else { | ||
| 1498 | + BIO_printf(bio, "0x%x%08x", hi, lo); | ||
| 1499 | + } | ||
| 1495 | 1500 | BIO_get_mem_ptr(bio, &mem); | |
| 1496 | 1501 | info->Set(env->exponent_string(), | |
| 1497 | 1502 | String::NewFromUtf8(env->isolate(), mem->data, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments